Salome HOME
0022373: EDF 2691 GEOM: Publish the shapes with error in Check Shape
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2014  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, "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, ("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
258 from salome.geom.gsketcher import Sketcher3D, Sketcher2D
259
260 # service function
261 def _toListOfNames(_names, _size=-1):
262     l = []
263     import types
264     if type(_names) in [types.ListType, types.TupleType]:
265         for i in _names: l.append(i)
266     elif _names:
267         l.append(_names)
268     if l and len(l) < _size:
269         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
270     return l
271
272 ## Raise an Error, containing the Method_name, if Operation is Failed
273 ## @ingroup l1_geomBuilder_auxiliary
274 def RaiseIfFailed (Method_name, Operation):
275     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
276         Operation.AbortOperation()
277         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
278     else:
279         Operation.FinishOperation()
280         pass
281
282 ## Return list of variables value from salome notebook
283 ## @ingroup l1_geomBuilder_auxiliary
284 def ParseParameters(*parameters):
285     Result = []
286     StringResult = []
287     for parameter in parameters:
288         if isinstance(parameter, list):
289             lResults = ParseParameters(*parameter)
290             if len(lResults) > 0:
291                 Result.append(lResults[:-1])
292                 StringResult += lResults[-1].split(":")
293                 pass
294             pass
295         else:
296             if isinstance(parameter,str):
297                 if notebook.isVariable(parameter):
298                     Result.append(notebook.get(parameter))
299                 else:
300                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
301                 pass
302             else:
303                 Result.append(parameter)
304                 pass
305             StringResult.append(str(parameter))
306             pass
307         pass
308     if Result:
309         Result.append(":".join(StringResult))
310     else:
311         Result = ":".join(StringResult)
312     return Result
313
314 ## Return list of variables value from salome notebook
315 ## @ingroup l1_geomBuilder_auxiliary
316 def ParseList(list):
317     Result = []
318     StringResult = ""
319     for parameter in list:
320         if isinstance(parameter,str) and notebook.isVariable(parameter):
321             Result.append(str(notebook.get(parameter)))
322             pass
323         else:
324             Result.append(str(parameter))
325             pass
326
327         StringResult = StringResult + str(parameter)
328         StringResult = StringResult + ":"
329         pass
330     StringResult = StringResult[:len(StringResult)-1]
331     return Result, StringResult
332
333 ## Return list of variables value from salome notebook
334 ## @ingroup l1_geomBuilder_auxiliary
335 def ParseSketcherCommand(command):
336     Result = ""
337     StringResult = ""
338     sections = command.split(":")
339     for section in sections:
340         parameters = section.split(" ")
341         paramIndex = 1
342         for parameter in parameters:
343             if paramIndex > 1 and parameter.find("'") != -1:
344                 parameter = parameter.replace("'","")
345                 if notebook.isVariable(parameter):
346                     Result = Result + str(notebook.get(parameter)) + " "
347                     pass
348                 else:
349                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
350                     pass
351                 pass
352             else:
353                 Result = Result + str(parameter) + " "
354                 pass
355             if paramIndex > 1:
356                 StringResult = StringResult + parameter
357                 StringResult = StringResult + ":"
358                 pass
359             paramIndex = paramIndex + 1
360             pass
361         Result = Result[:len(Result)-1] + ":"
362         pass
363     Result = Result[:len(Result)-1]
364     return Result, StringResult
365
366 ## Helper function which can be used to pack the passed string to the byte data.
367 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
368 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
369 ## For example,
370 ## \code
371 ## val = PackData("10001110") # val = 0xAE
372 ## val = PackData("1")        # val = 0x80
373 ## \endcode
374 ## @param data unpacked data - a string containing '1' and '0' symbols
375 ## @return data packed to the byte stream
376 ## @ingroup l1_geomBuilder_auxiliary
377 def PackData(data):
378     """
379     Helper function which can be used to pack the passed string to the byte data.
380     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
381     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
382
383     Parameters:
384         data unpacked data - a string containing '1' and '0' symbols
385
386     Returns:
387         data packed to the byte stream
388         
389     Example of usage:
390         val = PackData("10001110") # val = 0xAE
391         val = PackData("1")        # val = 0x80
392     """
393     bytes = len(data)/8
394     if len(data)%8: bytes += 1
395     res = ""
396     for b in range(bytes):
397         d = data[b*8:(b+1)*8]
398         val = 0
399         for i in range(8):
400             val *= 2
401             if i < len(d):
402                 if d[i] == "1": val += 1
403                 elif d[i] != "0":
404                     raise "Invalid symbol %s" % d[i]
405                 pass
406             pass
407         res += chr(val)
408         pass
409     return res
410
411 ## Read bitmap texture from the text file.
412 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
413 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
414 ## The function returns width and height of the pixmap in pixels and byte stream representing
415 ## texture bitmap itself.
416 ##
417 ## This function can be used to read the texture to the byte stream in order to pass it to
418 ## the AddTexture() function of geomBuilder class.
419 ## For example,
420 ## \code
421 ## from salome.geom import geomBuilder
422 ## geompy = geomBuilder.New(salome.myStudy)
423 ## texture = geompy.readtexture('mytexture.dat')
424 ## texture = geompy.AddTexture(*texture)
425 ## obj.SetMarkerTexture(texture)
426 ## \endcode
427 ## @param fname texture file name
428 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
429 ## @ingroup l1_geomBuilder_auxiliary
430 def ReadTexture(fname):
431     """
432     Read bitmap texture from the text file.
433     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
434     A zero symbol ('0') represents transparent pixel of the texture bitmap.
435     The function returns width and height of the pixmap in pixels and byte stream representing
436     texture bitmap itself.
437     This function can be used to read the texture to the byte stream in order to pass it to
438     the AddTexture() function of geomBuilder class.
439     
440     Parameters:
441         fname texture file name
442
443     Returns:
444         sequence of tree values: texture's width, height in pixels and its byte stream
445     
446     Example of usage:
447         from salome.geom import geomBuilder
448         geompy = geomBuilder.New(salome.myStudy)
449         texture = geompy.readtexture('mytexture.dat')
450         texture = geompy.AddTexture(*texture)
451         obj.SetMarkerTexture(texture)
452     """
453     try:
454         f = open(fname)
455         lines = [ l.strip() for l in f.readlines()]
456         f.close()
457         maxlen = 0
458         if lines: maxlen = max([len(x) for x in lines])
459         lenbytes = maxlen/8
460         if maxlen%8: lenbytes += 1
461         bytedata=""
462         for line in lines:
463             if len(line)%8:
464                 lenline = (len(line)/8+1)*8
465                 pass
466             else:
467                 lenline = (len(line)/8)*8
468                 pass
469             for i in range(lenline/8):
470                 byte=""
471                 for j in range(8):
472                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
473                     else: byte += "0"
474                     pass
475                 bytedata += PackData(byte)
476                 pass
477             for i in range(lenline/8, lenbytes):
478                 bytedata += PackData("0")
479             pass
480         return lenbytes*8, len(lines), bytedata
481     except:
482         pass
483     return 0, 0, ""
484
485 ## Returns a long value from enumeration type
486 #  Can be used for CORBA enumerator types like GEOM.shape_type
487 #  @param theItem enumeration type
488 #  @ingroup l1_geomBuilder_auxiliary
489 def EnumToLong(theItem):
490     """
491     Returns a long value from enumeration type
492     Can be used for CORBA enumerator types like geomBuilder.ShapeType
493
494     Parameters:
495         theItem enumeration type
496     """
497     ret = theItem
498     if hasattr(theItem, "_v"): ret = theItem._v
499     return ret
500
501 ## Information about closed/unclosed state of shell or wire
502 #  @ingroup l1_geomBuilder_auxiliary
503 class info:
504     """
505     Information about closed/unclosed state of shell or wire
506     """
507     UNKNOWN  = 0
508     CLOSED   = 1
509     UNCLOSED = 2
510
511 ## Private class used to bind calls of plugin operations to geomBuilder
512 class PluginOperation:
513   def __init__(self, operation, function):
514     self.operation = operation
515     self.function = function
516     pass
517
518   def __call__(self, *args):
519     res = self.function(self.operation, *args)
520     RaiseIfFailed(self.function.__name__, self.operation)
521     return res
522
523 # Warning: geom is a singleton
524 geom = None
525 engine = None
526 doLcc = False
527 created = False
528
529 class geomBuilder(object, GEOM._objref_GEOM_Gen):
530
531         ## Enumeration ShapeType as a dictionary. \n
532         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
533         #  @ingroup l1_geomBuilder_auxiliary
534         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
535
536         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
537         #  and a list of parameters, describing the shape.
538         #  List of parameters, describing the shape:
539         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
540         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
541         #
542         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
543         #
544         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
545         #
546         #  - SPHERE:       [xc yc zc            R]
547         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
548         #  - BOX:          [xc yc zc                      ax ay az]
549         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
550         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
551         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
552         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
553         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
554         #
555         #  - SPHERE2D:     [xc yc zc            R]
556         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
557         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
558         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
559         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
560         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
561         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
562         #  - PLANE:        [xo yo zo  dx dy dz]
563         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
564         #  - FACE:                                       [nb_edges  nb_vertices]
565         #
566         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
567         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
568         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
569         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
570         #  - LINE:         [xo yo zo  dx dy dz]
571         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
572         #  - EDGE:                                                 [nb_vertices]
573         #
574         #  - VERTEX:       [x  y  z]
575         #  @ingroup l1_geomBuilder_auxiliary
576         kind = GEOM.GEOM_IKindOfShape
577
578         def __new__(cls):
579             global engine
580             global geom
581             global doLcc
582             global created
583             #print "==== __new__ ", engine, geom, doLcc, created
584             if geom is None:
585                 # geom engine is either retrieved from engine, or created
586                 geom = engine
587                 # Following test avoids a recursive loop
588                 if doLcc:
589                     if geom is not None:
590                         # geom engine not created: existing engine found
591                         doLcc = False
592                     if doLcc and not created:
593                         doLcc = False
594                         # FindOrLoadComponent called:
595                         # 1. CORBA resolution of server
596                         # 2. the __new__ method is called again
597                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
598                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
599                         #print "====1 ",geom
600                 else:
601                     # FindOrLoadComponent not called
602                     if geom is None:
603                         # geomBuilder instance is created from lcc.FindOrLoadComponent
604                         #print "==== super ", engine, geom, doLcc, created
605                         geom = super(geomBuilder,cls).__new__(cls)
606                         #print "====2 ",geom
607                     else:
608                         # geom engine not created: existing engine found
609                         #print "==== existing ", engine, geom, doLcc, created
610                         pass
611                 #print "return geom 1 ", geom
612                 return geom
613
614             #print "return geom 2 ", geom
615             return geom
616
617         def __init__(self):
618             global created
619             #print "-------- geomBuilder __init__ --- ", created, self
620             if not created:
621               created = True
622               GEOM._objref_GEOM_Gen.__init__(self)
623               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
624               self.myBuilder = None
625               self.myStudyId = 0
626               self.father    = None
627
628               self.BasicOp  = None
629               self.CurvesOp = None
630               self.PrimOp   = None
631               self.ShapesOp = None
632               self.HealOp   = None
633               self.InsertOp = None
634               self.BoolOp   = None
635               self.TrsfOp   = None
636               self.LocalOp  = None
637               self.MeasuOp  = None
638               self.BlocksOp = None
639               self.GroupOp  = None
640               self.AdvOp    = None
641               self.FieldOp  = None
642             pass
643
644         ## Process object publication in the study, as follows:
645         #  - if @a theName is specified (not None), the object is published in the study
646         #    with this name, not taking into account "auto-publishing" option;
647         #  - if @a theName is NOT specified, the object is published in the study
648         #    (using default name, which can be customized using @a theDefaultName parameter)
649         #    only if auto-publishing is switched on.
650         #
651         #  @param theObj  object, a subject for publishing
652         #  @param theName object name for study
653         #  @param theDefaultName default name for the auto-publishing
654         #
655         #  @sa addToStudyAuto()
656         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
657             # ---
658             def _item_name(_names, _defname, _idx=-1):
659                 if not _names: _names = _defname
660                 if type(_names) in [types.ListType, types.TupleType]:
661                     if _idx >= 0:
662                         if _idx >= len(_names) or not _names[_idx]:
663                             if type(_defname) not in [types.ListType, types.TupleType]:
664                                 _name = "%s_%d"%(_defname, _idx+1)
665                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
666                                 _name = _defname[_idx]
667                             else:
668                                 _name = "%noname_%d"%(dn, _idx+1)
669                             pass
670                         else:
671                             _name = _names[_idx]
672                         pass
673                     else:
674                         # must be wrong  usage
675                         _name = _names[0]
676                     pass
677                 else:
678                     if _idx >= 0:
679                         _name = "%s_%d"%(_names, _idx+1)
680                     else:
681                         _name = _names
682                     pass
683                 return _name
684             # ---
685             def _publish( _name, _obj ):
686                 fatherObj = None
687                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
688                     fatherObj = _obj.GetShape()
689                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
690                     fatherObj = _obj.GetField()
691                 elif not _obj.IsMainShape():
692                     fatherObj = _obj.GetMainShape()
693                     pass
694                 if fatherObj and fatherObj.GetStudyEntry():
695                     self.addToStudyInFather(fatherObj, _obj, _name)
696                 else:
697                     self.addToStudy(_obj, _name)
698                     pass
699                 return
700             # ---
701             if not theObj:
702                 return # null object
703             if not theName and not self.myMaxNbSubShapesAllowed:
704                 return # nothing to do: auto-publishing is disabled
705             if not theName and not theDefaultName:
706                 return # neither theName nor theDefaultName is given
707             import types
708             if type(theObj) in [types.ListType, types.TupleType]:
709                 # list of objects is being published
710                 idx = 0
711                 for obj in theObj:
712                     if not obj: continue # bad object
713                     name = _item_name(theName, theDefaultName, idx)
714                     _publish( name, obj )
715                     idx = idx+1
716                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
717                     pass
718                 pass
719             else:
720                 # single object is published
721                 name = _item_name(theName, theDefaultName)
722                 _publish( name, theObj )
723             pass
724
725         ## @addtogroup l1_geomBuilder_auxiliary
726         ## @{
727         def init_geom(self,theStudy):
728             self.myStudy = theStudy
729             self.myStudyId = self.myStudy._get_StudyId()
730             self.myBuilder = self.myStudy.NewBuilder()
731             self.father = self.myStudy.FindComponent("GEOM")
732             if self.father is None:
733                 self.father = self.myBuilder.NewComponent("GEOM")
734                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
735                 FName = A1._narrow(SALOMEDS.AttributeName)
736                 FName.SetValue("Geometry")
737                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
738                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
739                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
740                 self.myBuilder.DefineComponentInstance(self.father,self)
741                 pass
742             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
743             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
744             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
745             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
746             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
747             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
748             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
749             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
750             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
751             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
752             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
753             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
754             self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
755
756             # The below line is a right way to map all plugin functions to geomBuilder,
757             # but AdvancedOperations are already mapped, that is why this line is commented
758             # and presents here only as an axample
759             #self.AdvOp    = self.GetPluginOperations (self.myStudyId, "AdvancedEngine")
760
761             # self.AdvOp is used by functions MakePipeTShape*, MakeDividedDisk, etc.
762             self.AdvOp = GEOM._objref_GEOM_Gen.GetPluginOperations (self, self.myStudyId, "AdvancedEngine")
763
764             # set GEOM as root in the use case tree
765             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
766             self.myUseCaseBuilder.SetRootCurrent()
767             self.myUseCaseBuilder.Append(self.father)
768             pass
769
770         def GetPluginOperations(self, studyID, libraryName):
771             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
772             if op:
773                 # bind methods of operations to self
774                 methods = op.__class__.__dict__['__methods__']
775                 avoid_methods = self.BasicOp.__class__.__dict__['__methods__']
776                 for meth_name in methods:
777                     if not meth_name in avoid_methods: # avoid basic methods
778                         function = getattr(op.__class__, meth_name)
779                         if callable(function):
780                             #self.__dict__[meth_name] = self.__PluginOperation(op, function)
781                             self.__dict__[meth_name] = PluginOperation(op, function)
782             return op
783
784         ## Enable / disable results auto-publishing
785         # 
786         #  The automatic publishing is managed in the following way:
787         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
788         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
789         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
790         #  value passed as parameter has the same effect.
791         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
792         #  maximum number of sub-shapes allowed for publishing is set to specified value.
793         #
794         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
795         #  @ingroup l1_publish_data
796         def addToStudyAuto(self, maxNbSubShapes=-1):
797             """
798             Enable / disable results auto-publishing
799
800             The automatic publishing is managed in the following way:
801             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
802             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
803             maximum number of sub-shapes allowed for publishing is unlimited; any negative
804             value passed as parameter has the same effect.
805             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
806             maximum number of sub-shapes allowed for publishing is set to this value.
807
808             Parameters:
809                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
810
811             Example of usage:
812                 geompy.addToStudyAuto()   # enable auto-publishing
813                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
814                 geompy.addToStudyAuto(0)  # disable auto-publishing
815             """
816             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
817             pass
818
819         ## Dump component to the Python script
820         #  This method overrides IDL function to allow default values for the parameters.
821         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
822             """
823             Dump component to the Python script
824             This method overrides IDL function to allow default values for the parameters.
825             """
826             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
827
828         ## Get name for sub-shape aSubObj of shape aMainObj
829         #
830         # @ref swig_SubShapeName "Example"
831         def SubShapeName(self,aSubObj, aMainObj):
832             """
833             Get name for sub-shape aSubObj of shape aMainObj
834             """
835             # Example: see GEOM_TestAll.py
836
837             #aSubId  = orb.object_to_string(aSubObj)
838             #aMainId = orb.object_to_string(aMainObj)
839             #index = gg.getIndexTopology(aSubId, aMainId)
840             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
841             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
842             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
843             return name
844
845         ## Publish in study aShape with name aName
846         #
847         #  \param aShape the shape to be published
848         #  \param aName  the name for the shape
849         #  \param doRestoreSubShapes if True, finds and publishes also
850         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
851         #         and published sub-shapes of arguments
852         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
853         #                                                  these arguments description
854         #  \return study entry of the published shape in form of string
855         #
856         #  @ingroup l1_publish_data
857         #  @ref swig_all_addtostudy "Example"
858         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
859                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
860             """
861             Publish in study aShape with name aName
862
863             Parameters:
864                 aShape the shape to be published
865                 aName  the name for the shape
866                 doRestoreSubShapes if True, finds and publishes also
867                                    sub-shapes of aShape, corresponding to its arguments
868                                    and published sub-shapes of arguments
869                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
870                                                          these arguments description
871
872             Returns:
873                 study entry of the published shape in form of string
874
875             Example of usage:
876                 id_block1 = geompy.addToStudy(Block1, "Block 1")
877             """
878             # Example: see GEOM_TestAll.py
879             try:
880                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
881                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
882                 if doRestoreSubShapes:
883                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
884                                             theFindMethod, theInheritFirstArg, True )
885             except:
886                 print "addToStudy() failed"
887                 return ""
888             return aShape.GetStudyEntry()
889
890         ## Publish in study aShape with name aName as sub-object of previously published aFather
891         #  \param aFather previously published object
892         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
893         #  \param aName  the name for the shape
894         #
895         #  \return study entry of the published shape in form of string
896         #
897         #  @ingroup l1_publish_data
898         #  @ref swig_all_addtostudyInFather "Example"
899         def addToStudyInFather(self, aFather, aShape, aName):
900             """
901             Publish in study aShape with name aName as sub-object of previously published aFather
902
903             Parameters:
904                 aFather previously published object
905                 aShape the shape to be published as sub-object of aFather
906                 aName  the name for the shape
907
908             Returns:
909                 study entry of the published shape in form of string
910             """
911             # Example: see GEOM_TestAll.py
912             try:
913                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
914                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
915             except:
916                 print "addToStudyInFather() failed"
917                 return ""
918             return aShape.GetStudyEntry()
919
920         ## Unpublish object in study
921         #
922         #  \param obj the object to be unpublished
923         def hideInStudy(self, obj):
924             """
925             Unpublish object in study
926
927             Parameters:
928                 obj the object to be unpublished
929             """
930             ior = salome.orb.object_to_string(obj)
931             aSObject = self.myStudy.FindObjectIOR(ior)
932             if aSObject is not None:
933                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
934                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
935                 drwAttribute.SetDrawable(False)
936                 pass
937
938         # end of l1_geomBuilder_auxiliary
939         ## @}
940
941         ## @addtogroup l3_restore_ss
942         ## @{
943
944         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
945         #  To be used from python scripts out of addToStudy() (non-default usage)
946         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
947         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
948         #                   If this list is empty, all operation arguments will be published
949         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
950         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
951         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
952         #                            Do not publish sub-shapes in place of arguments, but only
953         #                            in place of sub-shapes of the first argument,
954         #                            because the whole shape corresponds to the first argument.
955         #                            Mainly to be used after transformations, but it also can be
956         #                            usefull after partition with one object shape, and some other
957         #                            operations, where only the first argument has to be considered.
958         #                            If theObject has only one argument shape, this flag is automatically
959         #                            considered as True, not regarding really passed value.
960         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
961         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
962         #  \return list of published sub-shapes
963         #
964         #  @ref tui_restore_prs_params "Example"
965         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
966                               theInheritFirstArg=False, theAddPrefix=True):
967             """
968             Publish sub-shapes, standing for arguments and sub-shapes of arguments
969             To be used from python scripts out of geompy.addToStudy (non-default usage)
970
971             Parameters:
972                 theObject published GEOM.GEOM_Object, arguments of which will be published
973                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
974                           If this list is empty, all operation arguments will be published
975                 theFindMethod method to search sub-shapes, corresponding to arguments and
976                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
977                 theInheritFirstArg set properties of the first argument for theObject.
978                                    Do not publish sub-shapes in place of arguments, but only
979                                    in place of sub-shapes of the first argument,
980                                    because the whole shape corresponds to the first argument.
981                                    Mainly to be used after transformations, but it also can be
982                                    usefull after partition with one object shape, and some other
983                                    operations, where only the first argument has to be considered.
984                                    If theObject has only one argument shape, this flag is automatically
985                                    considered as True, not regarding really passed value.
986                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
987                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
988             Returns:
989                 list of published sub-shapes
990             """
991             # Example: see GEOM_TestAll.py
992             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
993                                           theFindMethod, theInheritFirstArg, theAddPrefix)
994
995         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
996         #  To be used from python scripts out of addToStudy() (non-default usage)
997         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
998         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
999         #                   If this list is empty, all operation arguments will be published
1000         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1001         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1002         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1003         #                            Do not publish sub-shapes in place of arguments, but only
1004         #                            in place of sub-shapes of the first argument,
1005         #                            because the whole shape corresponds to the first argument.
1006         #                            Mainly to be used after transformations, but it also can be
1007         #                            usefull after partition with one object shape, and some other
1008         #                            operations, where only the first argument has to be considered.
1009         #                            If theObject has only one argument shape, this flag is automatically
1010         #                            considered as True, not regarding really passed value.
1011         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1012         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1013         #  \return list of published sub-shapes
1014         #
1015         #  @ref tui_restore_prs_params "Example"
1016         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1017                                    theInheritFirstArg=False, theAddPrefix=True):
1018             """
1019             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1020             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1021
1022             Parameters:
1023                 theObject published GEOM.GEOM_Object, arguments of which will be published
1024                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1025                           If this list is empty, all operation arguments will be published
1026                 theFindMethod method to search sub-shapes, corresponding to arguments and
1027                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1028                 theInheritFirstArg set properties of the first argument for theObject.
1029                                    Do not publish sub-shapes in place of arguments, but only
1030                                    in place of sub-shapes of the first argument,
1031                                    because the whole shape corresponds to the first argument.
1032                                    Mainly to be used after transformations, but it also can be
1033                                    usefull after partition with one object shape, and some other
1034                                    operations, where only the first argument has to be considered.
1035                                    If theObject has only one argument shape, this flag is automatically
1036                                    considered as True, not regarding really passed value.
1037                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1038                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1039
1040             Returns: 
1041                 list of published sub-shapes
1042             """
1043             # Example: see GEOM_TestAll.py
1044             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
1045                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1046
1047         # end of l3_restore_ss
1048         ## @}
1049
1050         ## @addtogroup l3_basic_go
1051         ## @{
1052
1053         ## Create point by three coordinates.
1054         #  @param theX The X coordinate of the point.
1055         #  @param theY The Y coordinate of the point.
1056         #  @param theZ The Z coordinate of the point.
1057         #  @param theName Object name; when specified, this parameter is used
1058         #         for result publication in the study. Otherwise, if automatic
1059         #         publication is switched on, default value is used for result name.
1060         #
1061         #  @return New GEOM.GEOM_Object, containing the created point.
1062         #
1063         #  @ref tui_creation_point "Example"
1064         def MakeVertex(self, theX, theY, theZ, theName=None):
1065             """
1066             Create point by three coordinates.
1067
1068             Parameters:
1069                 theX The X coordinate of the point.
1070                 theY The Y coordinate of the point.
1071                 theZ The Z coordinate of the point.
1072                 theName Object name; when specified, this parameter is used
1073                         for result publication in the study. Otherwise, if automatic
1074                         publication is switched on, default value is used for result name.
1075                 
1076             Returns: 
1077                 New GEOM.GEOM_Object, containing the created point.
1078             """
1079             # Example: see GEOM_TestAll.py
1080             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1081             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1082             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1083             anObj.SetParameters(Parameters)
1084             self._autoPublish(anObj, theName, "vertex")
1085             return anObj
1086
1087         ## Create a point, distant from the referenced point
1088         #  on the given distances along the coordinate axes.
1089         #  @param theReference The referenced point.
1090         #  @param theX Displacement from the referenced point along OX axis.
1091         #  @param theY Displacement from the referenced point along OY axis.
1092         #  @param theZ Displacement from the referenced point along OZ axis.
1093         #  @param theName Object name; when specified, this parameter is used
1094         #         for result publication in the study. Otherwise, if automatic
1095         #         publication is switched on, default value is used for result name.
1096         #
1097         #  @return New GEOM.GEOM_Object, containing the created point.
1098         #
1099         #  @ref tui_creation_point "Example"
1100         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1101             """
1102             Create a point, distant from the referenced point
1103             on the given distances along the coordinate axes.
1104
1105             Parameters:
1106                 theReference The referenced point.
1107                 theX Displacement from the referenced point along OX axis.
1108                 theY Displacement from the referenced point along OY axis.
1109                 theZ Displacement from the referenced point along OZ axis.
1110                 theName Object name; when specified, this parameter is used
1111                         for result publication in the study. Otherwise, if automatic
1112                         publication is switched on, default value is used for result name.
1113
1114             Returns:
1115                 New GEOM.GEOM_Object, containing the created point.
1116             """
1117             # Example: see GEOM_TestAll.py
1118             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1119             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1120             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1121             anObj.SetParameters(Parameters)
1122             self._autoPublish(anObj, theName, "vertex")
1123             return anObj
1124
1125         ## Create a point, corresponding to the given parameter on the given curve.
1126         #  @param theRefCurve The referenced curve.
1127         #  @param theParameter Value of parameter on the referenced curve.
1128         #  @param theName Object name; when specified, this parameter is used
1129         #         for result publication in the study. Otherwise, if automatic
1130         #         publication is switched on, default value is used for result name.
1131         #
1132         #  @return New GEOM.GEOM_Object, containing the created point.
1133         #
1134         #  @ref tui_creation_point "Example"
1135         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1136             """
1137             Create a point, corresponding to the given parameter on the given curve.
1138
1139             Parameters:
1140                 theRefCurve The referenced curve.
1141                 theParameter Value of parameter on the referenced curve.
1142                 theName Object name; when specified, this parameter is used
1143                         for result publication in the study. Otherwise, if automatic
1144                         publication is switched on, default value is used for result name.
1145
1146             Returns:
1147                 New GEOM.GEOM_Object, containing the created point.
1148
1149             Example of usage:
1150                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1151             """
1152             # Example: see GEOM_TestAll.py
1153             theParameter, Parameters = ParseParameters(theParameter)
1154             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1155             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1156             anObj.SetParameters(Parameters)
1157             self._autoPublish(anObj, theName, "vertex")
1158             return anObj
1159
1160         ## Create a point by projection give coordinates on the given curve
1161         #  @param theRefCurve The referenced curve.
1162         #  @param theX X-coordinate in 3D space
1163         #  @param theY Y-coordinate in 3D space
1164         #  @param theZ Z-coordinate in 3D space
1165         #  @param theName Object name; when specified, this parameter is used
1166         #         for result publication in the study. Otherwise, if automatic
1167         #         publication is switched on, default value is used for result name.
1168         #
1169         #  @return New GEOM.GEOM_Object, containing the created point.
1170         #
1171         #  @ref tui_creation_point "Example"
1172         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1173             """
1174             Create a point by projection give coordinates on the given curve
1175             
1176             Parameters:
1177                 theRefCurve The referenced curve.
1178                 theX X-coordinate in 3D space
1179                 theY Y-coordinate in 3D space
1180                 theZ Z-coordinate in 3D space
1181                 theName Object name; when specified, this parameter is used
1182                         for result publication in the study. Otherwise, if automatic
1183                         publication is switched on, default value is used for result name.
1184
1185             Returns:
1186                 New GEOM.GEOM_Object, containing the created point.
1187
1188             Example of usage:
1189                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1190             """
1191             # Example: see GEOM_TestAll.py
1192             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1193             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1194             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1195             anObj.SetParameters(Parameters)
1196             self._autoPublish(anObj, theName, "vertex")
1197             return anObj
1198
1199         ## Create a point, corresponding to the given length on the given curve.
1200         #  @param theRefCurve The referenced curve.
1201         #  @param theLength Length on the referenced curve. It can be negative.
1202         #  @param theStartPoint Point allowing to choose the direction for the calculation
1203         #                       of the length. If None, start from the first point of theRefCurve.
1204         #  @param theName Object name; when specified, this parameter is used
1205         #         for result publication in the study. Otherwise, if automatic
1206         #         publication is switched on, default value is used for result name.
1207         #
1208         #  @return New GEOM.GEOM_Object, containing the created point.
1209         #
1210         #  @ref tui_creation_point "Example"
1211         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1212             """
1213             Create a point, corresponding to the given length on the given curve.
1214
1215             Parameters:
1216                 theRefCurve The referenced curve.
1217                 theLength Length on the referenced curve. It can be negative.
1218                 theStartPoint Point allowing to choose the direction for the calculation
1219                               of the length. If None, start from the first point of theRefCurve.
1220                 theName Object name; when specified, this parameter is used
1221                         for result publication in the study. Otherwise, if automatic
1222                         publication is switched on, default value is used for result name.
1223
1224             Returns:
1225                 New GEOM.GEOM_Object, containing the created point.
1226             """
1227             # Example: see GEOM_TestAll.py
1228             theLength, Parameters = ParseParameters(theLength)
1229             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1230             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1231             anObj.SetParameters(Parameters)
1232             self._autoPublish(anObj, theName, "vertex")
1233             return anObj
1234
1235         ## Create a point, corresponding to the given parameters on the
1236         #    given surface.
1237         #  @param theRefSurf The referenced surface.
1238         #  @param theUParameter Value of U-parameter on the referenced surface.
1239         #  @param theVParameter Value of V-parameter on the referenced surface.
1240         #  @param theName Object name; when specified, this parameter is used
1241         #         for result publication in the study. Otherwise, if automatic
1242         #         publication is switched on, default value is used for result name.
1243         #
1244         #  @return New GEOM.GEOM_Object, containing the created point.
1245         #
1246         #  @ref swig_MakeVertexOnSurface "Example"
1247         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1248             """
1249             Create a point, corresponding to the given parameters on the
1250             given surface.
1251
1252             Parameters:
1253                 theRefSurf The referenced surface.
1254                 theUParameter Value of U-parameter on the referenced surface.
1255                 theVParameter Value of V-parameter on the referenced surface.
1256                 theName Object name; when specified, this parameter is used
1257                         for result publication in the study. Otherwise, if automatic
1258                         publication is switched on, default value is used for result name.
1259
1260             Returns:
1261                 New GEOM.GEOM_Object, containing the created point.
1262
1263             Example of usage:
1264                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1265             """
1266             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1267             # Example: see GEOM_TestAll.py
1268             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1269             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1270             anObj.SetParameters(Parameters);
1271             self._autoPublish(anObj, theName, "vertex")
1272             return anObj
1273
1274         ## Create a point by projection give coordinates on the given surface
1275         #  @param theRefSurf The referenced surface.
1276         #  @param theX X-coordinate in 3D space
1277         #  @param theY Y-coordinate in 3D space
1278         #  @param theZ Z-coordinate in 3D space
1279         #  @param theName Object name; when specified, this parameter is used
1280         #         for result publication in the study. Otherwise, if automatic
1281         #         publication is switched on, default value is used for result name.
1282         #
1283         #  @return New GEOM.GEOM_Object, containing the created point.
1284         #
1285         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1286         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1287             """
1288             Create a point by projection give coordinates on the given surface
1289
1290             Parameters:
1291                 theRefSurf The referenced surface.
1292                 theX X-coordinate in 3D space
1293                 theY Y-coordinate in 3D space
1294                 theZ Z-coordinate in 3D space
1295                 theName Object name; when specified, this parameter is used
1296                         for result publication in the study. Otherwise, if automatic
1297                         publication is switched on, default value is used for result name.
1298
1299             Returns:
1300                 New GEOM.GEOM_Object, containing the created point.
1301
1302             Example of usage:
1303                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1304             """
1305             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1306             # Example: see GEOM_TestAll.py
1307             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1308             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1309             anObj.SetParameters(Parameters);
1310             self._autoPublish(anObj, theName, "vertex")
1311             return anObj
1312
1313         ## Create a point, which lays on the given face.
1314         #  The point will lay in arbitrary place of the face.
1315         #  The only condition on it is a non-zero distance to the face boundary.
1316         #  Such point can be used to uniquely identify the face inside any
1317         #  shape in case, when the shape does not contain overlapped faces.
1318         #  @param theFace The referenced face.
1319         #  @param theName Object name; when specified, this parameter is used
1320         #         for result publication in the study. Otherwise, if automatic
1321         #         publication is switched on, default value is used for result name.
1322         #
1323         #  @return New GEOM.GEOM_Object, containing the created point.
1324         #
1325         #  @ref swig_MakeVertexInsideFace "Example"
1326         def MakeVertexInsideFace (self, theFace, theName=None):
1327             """
1328             Create a point, which lays on the given face.
1329             The point will lay in arbitrary place of the face.
1330             The only condition on it is a non-zero distance to the face boundary.
1331             Such point can be used to uniquely identify the face inside any
1332             shape in case, when the shape does not contain overlapped faces.
1333
1334             Parameters:
1335                 theFace The referenced face.
1336                 theName Object name; when specified, this parameter is used
1337                         for result publication in the study. Otherwise, if automatic
1338                         publication is switched on, default value is used for result name.
1339
1340             Returns:
1341                 New GEOM.GEOM_Object, containing the created point.
1342
1343             Example of usage:
1344                 p_on_face = geompy.MakeVertexInsideFace(Face)
1345             """
1346             # Example: see GEOM_TestAll.py
1347             anObj = self.BasicOp.MakePointOnFace(theFace)
1348             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1349             self._autoPublish(anObj, theName, "vertex")
1350             return anObj
1351
1352         ## Create a point on intersection of two lines.
1353         #  @param theRefLine1, theRefLine2 The referenced lines.
1354         #  @param theName Object name; when specified, this parameter is used
1355         #         for result publication in the study. Otherwise, if automatic
1356         #         publication is switched on, default value is used for result name.
1357         #
1358         #  @return New GEOM.GEOM_Object, containing the created point.
1359         #
1360         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1361         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1362             """
1363             Create a point on intersection of two lines.
1364
1365             Parameters:
1366                 theRefLine1, theRefLine2 The referenced lines.
1367                 theName Object name; when specified, this parameter is used
1368                         for result publication in the study. Otherwise, if automatic
1369                         publication is switched on, default value is used for result name.
1370
1371             Returns:
1372                 New GEOM.GEOM_Object, containing the created point.
1373             """
1374             # Example: see GEOM_TestAll.py
1375             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1376             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1377             self._autoPublish(anObj, theName, "vertex")
1378             return anObj
1379
1380         ## Create a tangent, corresponding to the given parameter on the given curve.
1381         #  @param theRefCurve The referenced curve.
1382         #  @param theParameter Value of parameter on the referenced curve.
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 tangent.
1388         #
1389         #  @ref swig_MakeTangentOnCurve "Example"
1390         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1391             """
1392             Create a tangent, corresponding to the given parameter on the given curve.
1393
1394             Parameters:
1395                 theRefCurve The referenced curve.
1396                 theParameter Value of parameter on the referenced curve.
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 tangent.
1403
1404             Example of usage:
1405                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1406             """
1407             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1408             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1409             self._autoPublish(anObj, theName, "tangent")
1410             return anObj
1411
1412         ## Create a tangent plane, corresponding to the given parameter on the given face.
1413         #  @param theFace The face for which tangent plane should be built.
1414         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1415         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1416         #  @param theTrimSize the size of plane.
1417         #  @param theName Object name; when specified, this parameter is used
1418         #         for result publication in the study. Otherwise, if automatic
1419         #         publication is switched on, default value is used for result name.
1420         #
1421         #  @return New GEOM.GEOM_Object, containing the created tangent.
1422         #
1423         #  @ref swig_MakeTangentPlaneOnFace "Example"
1424         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1425             """
1426             Create a tangent plane, corresponding to the given parameter on the given face.
1427
1428             Parameters:
1429                 theFace The face for which tangent plane should be built.
1430                 theParameterV vertical value of the center point (0.0 - 1.0).
1431                 theParameterU horisontal value of the center point (0.0 - 1.0).
1432                 theTrimSize the size of plane.
1433                 theName Object name; when specified, this parameter is used
1434                         for result publication in the study. Otherwise, if automatic
1435                         publication is switched on, default value is used for result name.
1436
1437            Returns: 
1438                 New GEOM.GEOM_Object, containing the created tangent.
1439
1440            Example of usage:
1441                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1442             """
1443             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1444             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1445             self._autoPublish(anObj, theName, "tangent")
1446             return anObj
1447
1448         ## Create a vector with the given components.
1449         #  @param theDX X component of the vector.
1450         #  @param theDY Y component of the vector.
1451         #  @param theDZ Z component of the vector.
1452         #  @param theName Object name; when specified, this parameter is used
1453         #         for result publication in the study. Otherwise, if automatic
1454         #         publication is switched on, default value is used for result name.
1455         #
1456         #  @return New GEOM.GEOM_Object, containing the created vector.
1457         #
1458         #  @ref tui_creation_vector "Example"
1459         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1460             """
1461             Create a vector with the given components.
1462
1463             Parameters:
1464                 theDX X component of the vector.
1465                 theDY Y component of the vector.
1466                 theDZ Z component of the vector.
1467                 theName Object name; when specified, this parameter is used
1468                         for result publication in the study. Otherwise, if automatic
1469                         publication is switched on, default value is used for result name.
1470
1471             Returns:     
1472                 New GEOM.GEOM_Object, containing the created vector.
1473             """
1474             # Example: see GEOM_TestAll.py
1475             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1476             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1477             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1478             anObj.SetParameters(Parameters)
1479             self._autoPublish(anObj, theName, "vector")
1480             return anObj
1481
1482         ## Create a vector between two points.
1483         #  @param thePnt1 Start point for the vector.
1484         #  @param thePnt2 End point for the vector.
1485         #  @param theName Object name; when specified, this parameter is used
1486         #         for result publication in the study. Otherwise, if automatic
1487         #         publication is switched on, default value is used for result name.
1488         #
1489         #  @return New GEOM.GEOM_Object, containing the created vector.
1490         #
1491         #  @ref tui_creation_vector "Example"
1492         def MakeVector(self, thePnt1, thePnt2, theName=None):
1493             """
1494             Create a vector between two points.
1495
1496             Parameters:
1497                 thePnt1 Start point for the vector.
1498                 thePnt2 End point for the vector.
1499                 theName Object name; when specified, this parameter is used
1500                         for result publication in the study. Otherwise, if automatic
1501                         publication is switched on, default value is used for result name.
1502
1503             Returns:        
1504                 New GEOM.GEOM_Object, containing the created vector.
1505             """
1506             # Example: see GEOM_TestAll.py
1507             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1508             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1509             self._autoPublish(anObj, theName, "vector")
1510             return anObj
1511
1512         ## Create a line, passing through the given point
1513         #  and parrallel to the given direction
1514         #  @param thePnt Point. The resulting line will pass through it.
1515         #  @param theDir Direction. The resulting line will be parallel to it.
1516         #  @param theName Object name; when specified, this parameter is used
1517         #         for result publication in the study. Otherwise, if automatic
1518         #         publication is switched on, default value is used for result name.
1519         #
1520         #  @return New GEOM.GEOM_Object, containing the created line.
1521         #
1522         #  @ref tui_creation_line "Example"
1523         def MakeLine(self, thePnt, theDir, theName=None):
1524             """
1525             Create a line, passing through the given point
1526             and parrallel to the given direction
1527
1528             Parameters:
1529                 thePnt Point. The resulting line will pass through it.
1530                 theDir Direction. The resulting line will be parallel to it.
1531                 theName Object name; when specified, this parameter is used
1532                         for result publication in the study. Otherwise, if automatic
1533                         publication is switched on, default value is used for result name.
1534
1535             Returns:
1536                 New GEOM.GEOM_Object, containing the created line.
1537             """
1538             # Example: see GEOM_TestAll.py
1539             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1540             RaiseIfFailed("MakeLine", self.BasicOp)
1541             self._autoPublish(anObj, theName, "line")
1542             return anObj
1543
1544         ## Create a line, passing through the given points
1545         #  @param thePnt1 First of two points, defining the line.
1546         #  @param thePnt2 Second of two points, defining the line.
1547         #  @param theName Object name; when specified, this parameter is used
1548         #         for result publication in the study. Otherwise, if automatic
1549         #         publication is switched on, default value is used for result name.
1550         #
1551         #  @return New GEOM.GEOM_Object, containing the created line.
1552         #
1553         #  @ref tui_creation_line "Example"
1554         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1555             """
1556             Create a line, passing through the given points
1557
1558             Parameters:
1559                 thePnt1 First of two points, defining the line.
1560                 thePnt2 Second of two points, defining the line.
1561                 theName Object name; when specified, this parameter is used
1562                         for result publication in the study. Otherwise, if automatic
1563                         publication is switched on, default value is used for result name.
1564
1565             Returns:
1566                 New GEOM.GEOM_Object, containing the created line.
1567             """
1568             # Example: see GEOM_TestAll.py
1569             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1570             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1571             self._autoPublish(anObj, theName, "line")
1572             return anObj
1573
1574         ## Create a line on two faces intersection.
1575         #  @param theFace1 First of two faces, defining the line.
1576         #  @param theFace2 Second of two faces, defining the line.
1577         #  @param theName Object name; when specified, this parameter is used
1578         #         for result publication in the study. Otherwise, if automatic
1579         #         publication is switched on, default value is used for result name.
1580         #
1581         #  @return New GEOM.GEOM_Object, containing the created line.
1582         #
1583         #  @ref swig_MakeLineTwoFaces "Example"
1584         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1585             """
1586             Create a line on two faces intersection.
1587
1588             Parameters:
1589                 theFace1 First of two faces, defining the line.
1590                 theFace2 Second of two faces, defining the line.
1591                 theName Object name; when specified, this parameter is used
1592                         for result publication in the study. Otherwise, if automatic
1593                         publication is switched on, default value is used for result name.
1594
1595             Returns:
1596                 New GEOM.GEOM_Object, containing the created line.
1597             """
1598             # Example: see GEOM_TestAll.py
1599             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1600             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1601             self._autoPublish(anObj, theName, "line")
1602             return anObj
1603
1604         ## Create a plane, passing through the given point
1605         #  and normal to the given vector.
1606         #  @param thePnt Point, the plane has to pass through.
1607         #  @param theVec Vector, defining the plane normal direction.
1608         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1609         #  @param theName Object name; when specified, this parameter is used
1610         #         for result publication in the study. Otherwise, if automatic
1611         #         publication is switched on, default value is used for result name.
1612         #
1613         #  @return New GEOM.GEOM_Object, containing the created plane.
1614         #
1615         #  @ref tui_creation_plane "Example"
1616         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1617             """
1618             Create a plane, passing through the given point
1619             and normal to the given vector.
1620
1621             Parameters:
1622                 thePnt Point, the plane has to pass through.
1623                 theVec Vector, defining the plane normal direction.
1624                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1625                 theName Object name; when specified, this parameter is used
1626                         for result publication in the study. Otherwise, if automatic
1627                         publication is switched on, default value is used for result name.
1628
1629             Returns:    
1630                 New GEOM.GEOM_Object, containing the created plane.
1631             """
1632             # Example: see GEOM_TestAll.py
1633             theTrimSize, Parameters = ParseParameters(theTrimSize);
1634             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1635             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1636             anObj.SetParameters(Parameters)
1637             self._autoPublish(anObj, theName, "plane")
1638             return anObj
1639
1640         ## Create a plane, passing through the three given points
1641         #  @param thePnt1 First of three points, defining the plane.
1642         #  @param thePnt2 Second of three points, defining the plane.
1643         #  @param thePnt3 Fird of three points, defining the plane.
1644         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1645         #  @param theName Object name; when specified, this parameter is used
1646         #         for result publication in the study. Otherwise, if automatic
1647         #         publication is switched on, default value is used for result name.
1648         #
1649         #  @return New GEOM.GEOM_Object, containing the created plane.
1650         #
1651         #  @ref tui_creation_plane "Example"
1652         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1653             """
1654             Create a plane, passing through the three given points
1655
1656             Parameters:
1657                 thePnt1 First of three points, defining the plane.
1658                 thePnt2 Second of three points, defining the plane.
1659                 thePnt3 Fird of three points, defining the plane.
1660                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1661                 theName Object name; when specified, this parameter is used
1662                         for result publication in the study. Otherwise, if automatic
1663                         publication is switched on, default value is used for result name.
1664
1665             Returns:
1666                 New GEOM.GEOM_Object, containing the created plane.
1667             """
1668             # Example: see GEOM_TestAll.py
1669             theTrimSize, Parameters = ParseParameters(theTrimSize);
1670             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1671             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1672             anObj.SetParameters(Parameters)
1673             self._autoPublish(anObj, theName, "plane")
1674             return anObj
1675
1676         ## Create a plane, similar to the existing one, but with another size of representing face.
1677         #  @param theFace Referenced plane or LCS(Marker).
1678         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1679         #  @param theName Object name; when specified, this parameter is used
1680         #         for result publication in the study. Otherwise, if automatic
1681         #         publication is switched on, default value is used for result name.
1682         #
1683         #  @return New GEOM.GEOM_Object, containing the created plane.
1684         #
1685         #  @ref tui_creation_plane "Example"
1686         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1687             """
1688             Create a plane, similar to the existing one, but with another size of representing face.
1689
1690             Parameters:
1691                 theFace Referenced plane or LCS(Marker).
1692                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1693                 theName Object name; when specified, this parameter is used
1694                         for result publication in the study. Otherwise, if automatic
1695                         publication is switched on, default value is used for result name.
1696
1697             Returns:
1698                 New GEOM.GEOM_Object, containing the created plane.
1699             """
1700             # Example: see GEOM_TestAll.py
1701             theTrimSize, Parameters = ParseParameters(theTrimSize);
1702             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1703             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1704             anObj.SetParameters(Parameters)
1705             self._autoPublish(anObj, theName, "plane")
1706             return anObj
1707
1708         ## Create a plane, passing through the 2 vectors
1709         #  with center in a start point of the first vector.
1710         #  @param theVec1 Vector, defining center point and plane direction.
1711         #  @param theVec2 Vector, defining the plane normal direction.
1712         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1713         #  @param theName Object name; when specified, this parameter is used
1714         #         for result publication in the study. Otherwise, if automatic
1715         #         publication is switched on, default value is used for result name.
1716         #
1717         #  @return New GEOM.GEOM_Object, containing the created plane.
1718         #
1719         #  @ref tui_creation_plane "Example"
1720         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1721             """
1722             Create a plane, passing through the 2 vectors
1723             with center in a start point of the first vector.
1724
1725             Parameters:
1726                 theVec1 Vector, defining center point and plane direction.
1727                 theVec2 Vector, defining the plane normal direction.
1728                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1729                 theName Object name; when specified, this parameter is used
1730                         for result publication in the study. Otherwise, if automatic
1731                         publication is switched on, default value is used for result name.
1732
1733             Returns: 
1734                 New GEOM.GEOM_Object, containing the created plane.
1735             """
1736             # Example: see GEOM_TestAll.py
1737             theTrimSize, Parameters = ParseParameters(theTrimSize);
1738             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1739             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1740             anObj.SetParameters(Parameters)
1741             self._autoPublish(anObj, theName, "plane")
1742             return anObj
1743
1744         ## Create a plane, based on a Local coordinate system.
1745         #  @param theLCS  coordinate system, defining plane.
1746         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1747         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1748         #  @param theName Object name; when specified, this parameter is used
1749         #         for result publication in the study. Otherwise, if automatic
1750         #         publication is switched on, default value is used for result name.
1751         #
1752         #  @return New GEOM.GEOM_Object, containing the created plane.
1753         #
1754         #  @ref tui_creation_plane "Example"
1755         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1756             """
1757             Create a plane, based on a Local coordinate system.
1758
1759            Parameters: 
1760                 theLCS  coordinate system, defining plane.
1761                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1762                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1763                 theName Object name; when specified, this parameter is used
1764                         for result publication in the study. Otherwise, if automatic
1765                         publication is switched on, default value is used for result name.
1766
1767             Returns: 
1768                 New GEOM.GEOM_Object, containing the created plane.
1769             """
1770             # Example: see GEOM_TestAll.py
1771             theTrimSize, Parameters = ParseParameters(theTrimSize);
1772             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1773             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1774             anObj.SetParameters(Parameters)
1775             self._autoPublish(anObj, theName, "plane")
1776             return anObj
1777
1778         ## Create a local coordinate system.
1779         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1780         #  @param XDX,XDY,XDZ Three components of OX direction
1781         #  @param YDX,YDY,YDZ Three components of OY direction
1782         #  @param theName Object name; when specified, this parameter is used
1783         #         for result publication in the study. Otherwise, if automatic
1784         #         publication is switched on, default value is used for result name.
1785         #
1786         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1787         #
1788         #  @ref swig_MakeMarker "Example"
1789         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1790             """
1791             Create a local coordinate system.
1792
1793             Parameters: 
1794                 OX,OY,OZ Three coordinates of coordinate system origin.
1795                 XDX,XDY,XDZ Three components of OX direction
1796                 YDX,YDY,YDZ Three components of OY direction
1797                 theName Object name; when specified, this parameter is used
1798                         for result publication in the study. Otherwise, if automatic
1799                         publication is switched on, default value is used for result name.
1800
1801             Returns: 
1802                 New GEOM.GEOM_Object, containing the created coordinate system.
1803             """
1804             # Example: see GEOM_TestAll.py
1805             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1806             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1807             RaiseIfFailed("MakeMarker", self.BasicOp)
1808             anObj.SetParameters(Parameters)
1809             self._autoPublish(anObj, theName, "lcs")
1810             return anObj
1811
1812         ## Create a local coordinate system from shape.
1813         #  @param theShape The initial shape to detect the coordinate system.
1814         #  @param theName Object name; when specified, this parameter is used
1815         #         for result publication in the study. Otherwise, if automatic
1816         #         publication is switched on, default value is used for result name.
1817         #
1818         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1819         #
1820         #  @ref tui_creation_lcs "Example"
1821         def MakeMarkerFromShape(self, theShape, theName=None):
1822             """
1823             Create a local coordinate system from shape.
1824
1825             Parameters:
1826                 theShape The initial shape to detect the coordinate system.
1827                 theName Object name; when specified, this parameter is used
1828                         for result publication in the study. Otherwise, if automatic
1829                         publication is switched on, default value is used for result name.
1830                 
1831             Returns: 
1832                 New GEOM.GEOM_Object, containing the created coordinate system.
1833             """
1834             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1835             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1836             self._autoPublish(anObj, theName, "lcs")
1837             return anObj
1838
1839         ## Create a local coordinate system from point and two vectors.
1840         #  @param theOrigin Point of coordinate system origin.
1841         #  @param theXVec Vector of X direction
1842         #  @param theYVec Vector of Y direction
1843         #  @param theName Object name; when specified, this parameter is used
1844         #         for result publication in the study. Otherwise, if automatic
1845         #         publication is switched on, default value is used for result name.
1846         #
1847         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1848         #
1849         #  @ref tui_creation_lcs "Example"
1850         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1851             """
1852             Create a local coordinate system from point and two vectors.
1853
1854             Parameters:
1855                 theOrigin Point of coordinate system origin.
1856                 theXVec Vector of X direction
1857                 theYVec Vector of Y direction
1858                 theName Object name; when specified, this parameter is used
1859                         for result publication in the study. Otherwise, if automatic
1860                         publication is switched on, default value is used for result name.
1861
1862             Returns: 
1863                 New GEOM.GEOM_Object, containing the created coordinate system.
1864
1865             """
1866             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1867             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1868             self._autoPublish(anObj, theName, "lcs")
1869             return anObj
1870
1871         # end of l3_basic_go
1872         ## @}
1873
1874         ## @addtogroup l4_curves
1875         ## @{
1876
1877         ##  Create an arc of circle, passing through three given points.
1878         #  @param thePnt1 Start point of the arc.
1879         #  @param thePnt2 Middle point of the arc.
1880         #  @param thePnt3 End point of the arc.
1881         #  @param theName Object name; when specified, this parameter is used
1882         #         for result publication in the study. Otherwise, if automatic
1883         #         publication is switched on, default value is used for result name.
1884         #
1885         #  @return New GEOM.GEOM_Object, containing the created arc.
1886         #
1887         #  @ref swig_MakeArc "Example"
1888         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1889             """
1890             Create an arc of circle, passing through three given points.
1891
1892             Parameters:
1893                 thePnt1 Start point of the arc.
1894                 thePnt2 Middle point of the arc.
1895                 thePnt3 End point of the arc.
1896                 theName Object name; when specified, this parameter is used
1897                         for result publication in the study. Otherwise, if automatic
1898                         publication is switched on, default value is used for result name.
1899
1900             Returns: 
1901                 New GEOM.GEOM_Object, containing the created arc.
1902             """
1903             # Example: see GEOM_TestAll.py
1904             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1905             RaiseIfFailed("MakeArc", self.CurvesOp)
1906             self._autoPublish(anObj, theName, "arc")
1907             return anObj
1908
1909         ##  Create an arc of circle from a center and 2 points.
1910         #  @param thePnt1 Center of the arc
1911         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1912         #  @param thePnt3 End point of the arc (Gives also a direction)
1913         #  @param theSense Orientation of the arc
1914         #  @param theName Object name; when specified, this parameter is used
1915         #         for result publication in the study. Otherwise, if automatic
1916         #         publication is switched on, default value is used for result name.
1917         #
1918         #  @return New GEOM.GEOM_Object, containing the created arc.
1919         #
1920         #  @ref swig_MakeArc "Example"
1921         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1922             """
1923             Create an arc of circle from a center and 2 points.
1924
1925             Parameters:
1926                 thePnt1 Center of the arc
1927                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1928                 thePnt3 End point of the arc (Gives also a direction)
1929                 theSense Orientation of the arc
1930                 theName Object name; when specified, this parameter is used
1931                         for result publication in the study. Otherwise, if automatic
1932                         publication is switched on, default value is used for result name.
1933
1934             Returns:
1935                 New GEOM.GEOM_Object, containing the created arc.
1936             """
1937             # Example: see GEOM_TestAll.py
1938             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1939             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1940             self._autoPublish(anObj, theName, "arc")
1941             return anObj
1942
1943         ##  Create an arc of ellipse, of center and two points.
1944         #  @param theCenter Center of the arc.
1945         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1946         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1947         #  @param theName Object name; when specified, this parameter is used
1948         #         for result publication in the study. Otherwise, if automatic
1949         #         publication is switched on, default value is used for result name.
1950         #
1951         #  @return New GEOM.GEOM_Object, containing the created arc.
1952         #
1953         #  @ref swig_MakeArc "Example"
1954         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
1955             """
1956             Create an arc of ellipse, of center and two points.
1957
1958             Parameters:
1959                 theCenter Center of the arc.
1960                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1961                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1962                 theName Object name; when specified, this parameter is used
1963                         for result publication in the study. Otherwise, if automatic
1964                         publication is switched on, default value is used for result name.
1965
1966             Returns:
1967                 New GEOM.GEOM_Object, containing the created arc.
1968             """
1969             # Example: see GEOM_TestAll.py
1970             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
1971             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
1972             self._autoPublish(anObj, theName, "arc")
1973             return anObj
1974
1975         ## Create a circle with given center, normal vector and radius.
1976         #  @param thePnt Circle center.
1977         #  @param theVec Vector, normal to the plane of the circle.
1978         #  @param theR Circle radius.
1979         #  @param theName Object name; when specified, this parameter is used
1980         #         for result publication in the study. Otherwise, if automatic
1981         #         publication is switched on, default value is used for result name.
1982         #
1983         #  @return New GEOM.GEOM_Object, containing the created circle.
1984         #
1985         #  @ref tui_creation_circle "Example"
1986         def MakeCircle(self, thePnt, theVec, theR, theName=None):
1987             """
1988             Create a circle with given center, normal vector and radius.
1989
1990             Parameters:
1991                 thePnt Circle center.
1992                 theVec Vector, normal to the plane of the circle.
1993                 theR Circle radius.
1994                 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             Returns:
1999                 New GEOM.GEOM_Object, containing the created circle.
2000             """
2001             # Example: see GEOM_TestAll.py
2002             theR, Parameters = ParseParameters(theR)
2003             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2004             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2005             anObj.SetParameters(Parameters)
2006             self._autoPublish(anObj, theName, "circle")
2007             return anObj
2008
2009         ## Create a circle with given radius.
2010         #  Center of the circle will be in the origin of global
2011         #  coordinate system and normal vector will be codirected with Z axis
2012         #  @param theR Circle radius.
2013         #  @param theName Object name; when specified, this parameter is used
2014         #         for result publication in the study. Otherwise, if automatic
2015         #         publication is switched on, default value is used for result name.
2016         #
2017         #  @return New GEOM.GEOM_Object, containing the created circle.
2018         def MakeCircleR(self, theR, theName=None):
2019             """
2020             Create a circle with given radius.
2021             Center of the circle will be in the origin of global
2022             coordinate system and normal vector will be codirected with Z axis
2023
2024             Parameters:
2025                 theR Circle radius.
2026                 theName Object name; when specified, this parameter is used
2027                         for result publication in the study. Otherwise, if automatic
2028                         publication is switched on, default value is used for result name.
2029
2030             Returns:
2031                 New GEOM.GEOM_Object, containing the created circle.
2032             """
2033             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2034             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2035             self._autoPublish(anObj, theName, "circle")
2036             return anObj
2037
2038         ## Create a circle, passing through three given points
2039         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2040         #  @param theName Object name; when specified, this parameter is used
2041         #         for result publication in the study. Otherwise, if automatic
2042         #         publication is switched on, default value is used for result name.
2043         #
2044         #  @return New GEOM.GEOM_Object, containing the created circle.
2045         #
2046         #  @ref tui_creation_circle "Example"
2047         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2048             """
2049             Create a circle, passing through three given points
2050
2051             Parameters:
2052                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2053                 theName Object name; when specified, this parameter is used
2054                         for result publication in the study. Otherwise, if automatic
2055                         publication is switched on, default value is used for result name.
2056
2057             Returns:
2058                 New GEOM.GEOM_Object, containing the created circle.
2059             """
2060             # Example: see GEOM_TestAll.py
2061             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2062             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2063             self._autoPublish(anObj, theName, "circle")
2064             return anObj
2065
2066         ## Create a circle, with given point1 as center,
2067         #  passing through the point2 as radius and laying in the plane,
2068         #  defined by all three given points.
2069         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2070         #  @param theName Object name; when specified, this parameter is used
2071         #         for result publication in the study. Otherwise, if automatic
2072         #         publication is switched on, default value is used for result name.
2073         #
2074         #  @return New GEOM.GEOM_Object, containing the created circle.
2075         #
2076         #  @ref swig_MakeCircle "Example"
2077         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2078             """
2079             Create a circle, with given point1 as center,
2080             passing through the point2 as radius and laying in the plane,
2081             defined by all three given points.
2082
2083             Parameters:
2084                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2085                 theName Object name; when specified, this parameter is used
2086                         for result publication in the study. Otherwise, if automatic
2087                         publication is switched on, default value is used for result name.
2088
2089             Returns:
2090                 New GEOM.GEOM_Object, containing the created circle.
2091             """
2092             # Example: see GEOM_example6.py
2093             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2094             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2095             self._autoPublish(anObj, theName, "circle")
2096             return anObj
2097
2098         ## Create an ellipse with given center, normal vector and radiuses.
2099         #  @param thePnt Ellipse center.
2100         #  @param theVec Vector, normal to the plane of the ellipse.
2101         #  @param theRMajor Major ellipse radius.
2102         #  @param theRMinor Minor ellipse radius.
2103         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2104         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2109         #
2110         #  @ref tui_creation_ellipse "Example"
2111         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2112             """
2113             Create an ellipse with given center, normal vector and radiuses.
2114
2115             Parameters:
2116                 thePnt Ellipse center.
2117                 theVec Vector, normal to the plane of the ellipse.
2118                 theRMajor Major ellipse radius.
2119                 theRMinor Minor ellipse radius.
2120                 theVecMaj Vector, direction of the ellipse's main axis.
2121                 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             Returns:    
2126                 New GEOM.GEOM_Object, containing the created ellipse.
2127             """
2128             # Example: see GEOM_TestAll.py
2129             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2130             if theVecMaj is not None:
2131                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2132             else:
2133                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2134                 pass
2135             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2136             anObj.SetParameters(Parameters)
2137             self._autoPublish(anObj, theName, "ellipse")
2138             return anObj
2139
2140         ## Create an ellipse with given radiuses.
2141         #  Center of the ellipse will be in the origin of global
2142         #  coordinate system and normal vector will be codirected with Z axis
2143         #  @param theRMajor Major ellipse radius.
2144         #  @param theRMinor Minor ellipse radius.
2145         #  @param theName Object name; when specified, this parameter is used
2146         #         for result publication in the study. Otherwise, if automatic
2147         #         publication is switched on, default value is used for result name.
2148         #
2149         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2150         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2151             """
2152             Create an ellipse with given radiuses.
2153             Center of the ellipse will be in the origin of global
2154             coordinate system and normal vector will be codirected with Z axis
2155
2156             Parameters:
2157                 theRMajor Major ellipse radius.
2158                 theRMinor Minor ellipse radius.
2159                 theName Object name; when specified, this parameter is used
2160                         for result publication in the study. Otherwise, if automatic
2161                         publication is switched on, default value is used for result name.
2162
2163             Returns:
2164             New GEOM.GEOM_Object, containing the created ellipse.
2165             """
2166             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2167             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2168             self._autoPublish(anObj, theName, "ellipse")
2169             return anObj
2170
2171         ## Create a polyline on the set of points.
2172         #  @param thePoints Sequence of points for the polyline.
2173         #  @param theIsClosed If True, build a closed wire.
2174         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created polyline.
2179         #
2180         #  @ref tui_creation_curve "Example"
2181         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2182             """
2183             Create a polyline on the set of points.
2184
2185             Parameters:
2186                 thePoints Sequence of points for the polyline.
2187                 theIsClosed If True, build a closed wire.
2188                 theName Object name; when specified, this parameter is used
2189                         for result publication in the study. Otherwise, if automatic
2190                         publication is switched on, default value is used for result name.
2191
2192             Returns:
2193                 New GEOM.GEOM_Object, containing the created polyline.
2194             """
2195             # Example: see GEOM_TestAll.py
2196             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2197             RaiseIfFailed("MakePolyline", self.CurvesOp)
2198             self._autoPublish(anObj, theName, "polyline")
2199             return anObj
2200
2201         ## Create bezier curve on the set of points.
2202         #  @param thePoints Sequence of points for the bezier curve.
2203         #  @param theIsClosed If True, build a closed curve.
2204         #  @param theName Object name; when specified, this parameter is used
2205         #         for result publication in the study. Otherwise, if automatic
2206         #         publication is switched on, default value is used for result name.
2207         #
2208         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2209         #
2210         #  @ref tui_creation_curve "Example"
2211         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2212             """
2213             Create bezier curve on the set of points.
2214
2215             Parameters:
2216                 thePoints Sequence of points for the bezier curve.
2217                 theIsClosed If True, build a closed curve.
2218                 theName Object name; when specified, this parameter is used
2219                         for result publication in the study. Otherwise, if automatic
2220                         publication is switched on, default value is used for result name.
2221
2222             Returns:
2223                 New GEOM.GEOM_Object, containing the created bezier curve.
2224             """
2225             # Example: see GEOM_TestAll.py
2226             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2227             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2228             self._autoPublish(anObj, theName, "bezier")
2229             return anObj
2230
2231         ## Create B-Spline curve on the set of points.
2232         #  @param thePoints Sequence of points for the B-Spline curve.
2233         #  @param theIsClosed If True, build a closed curve.
2234         #  @param theDoReordering If TRUE, the algo does not follow the order of
2235         #                         \a thePoints but searches for the closest vertex.
2236         #  @param theName Object name; when specified, this parameter is used
2237         #         for result publication in the study. Otherwise, if automatic
2238         #         publication is switched on, default value is used for result name.
2239         #
2240         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2241         #
2242         #  @ref tui_creation_curve "Example"
2243         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2244             """
2245             Create B-Spline curve on the set of points.
2246
2247             Parameters:
2248                 thePoints Sequence of points for the B-Spline curve.
2249                 theIsClosed If True, build a closed curve.
2250                 theDoReordering If True, the algo does not follow the order of
2251                                 thePoints but searches for the closest vertex.
2252                 theName Object name; when specified, this parameter is used
2253                         for result publication in the study. Otherwise, if automatic
2254                         publication is switched on, default value is used for result name.
2255
2256             Returns:                     
2257                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2258             """
2259             # Example: see GEOM_TestAll.py
2260             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2261             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2262             self._autoPublish(anObj, theName, "bspline")
2263             return anObj
2264
2265         ## Create B-Spline curve on the set of points.
2266         #  @param thePoints Sequence of points for the B-Spline curve.
2267         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2268         #  @param theLastVec Vector object, defining the curve direction at its last point.
2269         #  @param theName Object name; when specified, this parameter is used
2270         #         for result publication in the study. Otherwise, if automatic
2271         #         publication is switched on, default value is used for result name.
2272         #
2273         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2274         #
2275         #  @ref tui_creation_curve "Example"
2276         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2277             """
2278             Create B-Spline curve on the set of points.
2279
2280             Parameters:
2281                 thePoints Sequence of points for the B-Spline curve.
2282                 theFirstVec Vector object, defining the curve direction at its first point.
2283                 theLastVec Vector object, defining the curve direction at its last point.
2284                 theName Object name; when specified, this parameter is used
2285                         for result publication in the study. Otherwise, if automatic
2286                         publication is switched on, default value is used for result name.
2287
2288             Returns:                     
2289                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2290             """
2291             # Example: see GEOM_TestAll.py
2292             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2293             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2294             self._autoPublish(anObj, theName, "bspline")
2295             return anObj
2296
2297         ## Creates a curve using the parametric definition of the basic points.
2298         #  @param thexExpr parametric equation of the coordinates X.
2299         #  @param theyExpr parametric equation of the coordinates Y.
2300         #  @param thezExpr parametric equation of the coordinates Z.
2301         #  @param theParamMin the minimal value of the parameter.
2302         #  @param theParamMax the maximum value of the parameter.
2303         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2304         #  @param theCurveType the type of the curve,
2305         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2306         #  @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.
2307         #  @param theName Object name; when specified, this parameter is used
2308         #         for result publication in the study. Otherwise, if automatic
2309         #         publication is switched on, default value is used for result name.
2310         #
2311         #  @return New GEOM.GEOM_Object, containing the created curve.
2312         #
2313         #  @ref tui_creation_curve "Example"
2314         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2315                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2316             """
2317             Creates a curve using the parametric definition of the basic points.
2318
2319             Parameters:
2320                 thexExpr parametric equation of the coordinates X.
2321                 theyExpr parametric equation of the coordinates Y.
2322                 thezExpr parametric equation of the coordinates Z.
2323                 theParamMin the minimal value of the parameter.
2324                 theParamMax the maximum value of the parameter.
2325                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2326                 theCurveType the type of the curve,
2327                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2328                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2329                              method is used which can lead to a bug.
2330                 theName Object name; when specified, this parameter is used
2331                         for result publication in the study. Otherwise, if automatic
2332                         publication is switched on, default value is used for result name.
2333
2334             Returns:
2335                 New GEOM.GEOM_Object, containing the created curve.
2336             """
2337             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2338             if theNewMethod:
2339               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2340             else:
2341               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
2342             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2343             anObj.SetParameters(Parameters)
2344             self._autoPublish(anObj, theName, "curve")
2345             return anObj
2346
2347         ## Create an isoline curve on a face.
2348         #  @param theFace the face for which an isoline is created.
2349         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2350         #         creation.
2351         #  @param theParameter the U parameter for U-isoline or V parameter
2352         #         for V-isoline.
2353         #  @param theName Object name; when specified, this parameter is used
2354         #         for result publication in the study. Otherwise, if automatic
2355         #         publication is switched on, default value is used for result name.
2356         #
2357         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2358         #          a compound of edges.
2359         #
2360         #  @ref tui_creation_curve "Example"
2361         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2362             """
2363             Create an isoline curve on a face.
2364
2365             Parameters:
2366                 theFace the face for which an isoline is created.
2367                 IsUIsoline True for U-isoline creation; False for V-isoline
2368                            creation.
2369                 theParameter the U parameter for U-isoline or V parameter
2370                              for V-isoline.
2371                 theName Object name; when specified, this parameter is used
2372                         for result publication in the study. Otherwise, if automatic
2373                         publication is switched on, default value is used for result name.
2374
2375             Returns:
2376                 New GEOM.GEOM_Object, containing the created isoline edge or a
2377                 compound of edges.
2378             """
2379             # Example: see GEOM_TestAll.py
2380             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2381             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2382             if IsUIsoline:
2383                 self._autoPublish(anObj, theName, "U-Isoline")
2384             else:
2385                 self._autoPublish(anObj, theName, "V-Isoline")
2386             return anObj
2387
2388         # end of l4_curves
2389         ## @}
2390
2391         ## @addtogroup l3_sketcher
2392         ## @{
2393
2394         ## Create a sketcher (wire or face), following the textual description,
2395         #  passed through <VAR>theCommand</VAR> argument. \n
2396         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2397         #  Format of the description string have to be the following:
2398         #
2399         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2400         #
2401         #  Where:
2402         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2403         #  - CMD is one of
2404         #     - "R angle" : Set the direction by angle
2405         #     - "D dx dy" : Set the direction by DX & DY
2406         #     .
2407         #       \n
2408         #     - "TT x y" : Create segment by point at X & Y
2409         #     - "T dx dy" : Create segment by point with DX & DY
2410         #     - "L length" : Create segment by direction & Length
2411         #     - "IX x" : Create segment by direction & Intersect. X
2412         #     - "IY y" : Create segment by direction & Intersect. Y
2413         #     .
2414         #       \n
2415         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2416         #     - "AA x y": Create arc by point at X & Y
2417         #     - "A dx dy" : Create arc by point with DX & DY
2418         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2419         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2420         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2421         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2422         #     .
2423         #       \n
2424         #     - "WW" : Close Wire (to finish)
2425         #     - "WF" : Close Wire and build face (to finish)
2426         #     .
2427         #        \n
2428         #  - Flag1 (= reverse) is 0 or 2 ...
2429         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2430         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2431         #     .
2432         #        \n
2433         #  - Flag2 (= control tolerance) is 0 or 1 ...
2434         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2435         #     - if 1 the wire is built only if the end point is on the arc
2436         #       with a tolerance of 10^-7 on the distance else the creation fails
2437         #
2438         #  @param theCommand String, defining the sketcher in local
2439         #                    coordinates of the working plane.
2440         #  @param theWorkingPlane Nine double values, defining origin,
2441         #                         OZ and OX directions of the working plane.
2442         #  @param theName Object name; when specified, this parameter is used
2443         #         for result publication in the study. Otherwise, if automatic
2444         #         publication is switched on, default value is used for result name.
2445         #
2446         #  @return New GEOM.GEOM_Object, containing the created wire.
2447         #
2448         #  @ref tui_sketcher_page "Example"
2449         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2450             """
2451             Create a sketcher (wire or face), following the textual description, passed
2452             through theCommand argument.
2453             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2454             Format of the description string have to be the following:
2455                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2456             Where:
2457             - x1, y1 are coordinates of the first sketcher point (zero by default),
2458             - CMD is one of
2459                - "R angle" : Set the direction by angle
2460                - "D dx dy" : Set the direction by DX & DY
2461                
2462                - "TT x y" : Create segment by point at X & Y
2463                - "T dx dy" : Create segment by point with DX & DY
2464                - "L length" : Create segment by direction & Length
2465                - "IX x" : Create segment by direction & Intersect. X
2466                - "IY y" : Create segment by direction & Intersect. Y
2467
2468                - "C radius length" : Create arc by direction, radius and length(in degree)
2469                - "AA x y": Create arc by point at X & Y
2470                - "A dx dy" : Create arc by point with DX & DY
2471                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2472                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2473                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2474                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2475
2476                - "WW" : Close Wire (to finish)
2477                - "WF" : Close Wire and build face (to finish)
2478             
2479             - Flag1 (= reverse) is 0 or 2 ...
2480                - if 0 the drawn arc is the one of lower angle (< Pi)
2481                - if 2 the drawn arc ius the one of greater angle (> Pi)
2482         
2483             - Flag2 (= control tolerance) is 0 or 1 ...
2484                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2485                - if 1 the wire is built only if the end point is on the arc
2486                  with a tolerance of 10^-7 on the distance else the creation fails
2487
2488             Parameters:
2489                 theCommand String, defining the sketcher in local
2490                            coordinates of the working plane.
2491                 theWorkingPlane Nine double values, defining origin,
2492                                 OZ and OX directions of the working plane.
2493                 theName Object name; when specified, this parameter is used
2494                         for result publication in the study. Otherwise, if automatic
2495                         publication is switched on, default value is used for result name.
2496
2497             Returns:
2498                 New GEOM.GEOM_Object, containing the created wire.
2499             """
2500             # Example: see GEOM_TestAll.py
2501             theCommand,Parameters = ParseSketcherCommand(theCommand)
2502             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2503             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2504             anObj.SetParameters(Parameters)
2505             self._autoPublish(anObj, theName, "wire")
2506             return anObj
2507
2508         ## Create a sketcher (wire or face), following the textual description,
2509         #  passed through <VAR>theCommand</VAR> argument. \n
2510         #  For format of the description string see MakeSketcher() method.\n
2511         #  @param theCommand String, defining the sketcher in local
2512         #                    coordinates of the working plane.
2513         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2514         #  @param theName Object name; when specified, this parameter is used
2515         #         for result publication in the study. Otherwise, if automatic
2516         #         publication is switched on, default value is used for result name.
2517         #
2518         #  @return New GEOM.GEOM_Object, containing the created wire.
2519         #
2520         #  @ref tui_sketcher_page "Example"
2521         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2522             """
2523             Create a sketcher (wire or face), following the textual description,
2524             passed through theCommand argument.
2525             For format of the description string see geompy.MakeSketcher() method.
2526
2527             Parameters:
2528                 theCommand String, defining the sketcher in local
2529                            coordinates of the working plane.
2530                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2531                 theName Object name; when specified, this parameter is used
2532                         for result publication in the study. Otherwise, if automatic
2533                         publication is switched on, default value is used for result name.
2534
2535             Returns:
2536                 New GEOM.GEOM_Object, containing the created wire.
2537             """
2538             theCommand,Parameters = ParseSketcherCommand(theCommand)
2539             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2540             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2541             anObj.SetParameters(Parameters)
2542             self._autoPublish(anObj, theName, "wire")
2543             return anObj
2544
2545         ## Obtain a 2D sketcher interface
2546         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface      
2547         def Sketcher2D (self):
2548             """
2549             Obtain a 2D sketcher interface.
2550
2551             Example of usage:
2552                sk = geompy.Sketcher2D()
2553                sk.addPoint(20, 20)
2554                sk.addSegmentRelative(15, 70)
2555                sk.addSegmentPerpY(50)
2556                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2557                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2558                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2559                sk.close()
2560                Sketch_1 = sk.wire(geomObj_1)
2561             """
2562             sk = Sketcher2D (self)
2563             return sk
2564         
2565         ## Create a sketcher wire, following the numerical description,
2566         #  passed through <VAR>theCoordinates</VAR> argument. \n
2567         #  @param theCoordinates double values, defining points to create a wire,
2568         #                                                      passing from it.
2569         #  @param theName Object name; when specified, this parameter is used
2570         #         for result publication in the study. Otherwise, if automatic
2571         #         publication is switched on, default value is used for result name.
2572         #
2573         #  @return New GEOM.GEOM_Object, containing the created wire.
2574         #
2575         #  @ref tui_3dsketcher_page "Example"
2576         def Make3DSketcher(self, theCoordinates, theName=None):
2577             """
2578             Create a sketcher wire, following the numerical description,
2579             passed through theCoordinates argument.
2580
2581             Parameters:
2582                 theCoordinates double values, defining points to create a wire,
2583                                passing from it.
2584                 theName Object name; when specified, this parameter is used
2585                         for result publication in the study. Otherwise, if automatic
2586                         publication is switched on, default value is used for result name.
2587
2588             Returns:
2589                 New GEOM_Object, containing the created wire.
2590             """
2591             theCoordinates,Parameters = ParseParameters(theCoordinates)
2592             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2593             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2594             anObj.SetParameters(Parameters)
2595             self._autoPublish(anObj, theName, "wire")
2596             return anObj
2597
2598         ## Obtain a 3D sketcher interface
2599         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2600         #
2601         #  @ref tui_3dsketcher_page "Example"
2602         def Sketcher3D (self):
2603             """
2604             Obtain a 3D sketcher interface.
2605
2606             Example of usage:
2607                 sk = geompy.Sketcher3D()
2608                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2609                 sk.addPointsRelative(0, 0, 130)
2610                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2611                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2612                 sk.close()
2613                 a3D_Sketcher_1 = sk.wire()
2614             """
2615             sk = Sketcher3D (self)
2616             return sk
2617
2618         # end of l3_sketcher
2619         ## @}
2620
2621         ## @addtogroup l3_3d_primitives
2622         ## @{
2623
2624         ## Create a box by coordinates of two opposite vertices.
2625         #
2626         #  @param x1,y1,z1 double values, defining first point it.
2627         #  @param x2,y2,z2 double values, defining first point it.
2628         #  @param theName Object name; when specified, this parameter is used
2629         #         for result publication in the study. Otherwise, if automatic
2630         #         publication is switched on, default value is used for result name.
2631         #
2632         #  @return New GEOM.GEOM_Object, containing the created box.
2633         #
2634         #  @ref tui_creation_box "Example"
2635         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2636             """
2637             Create a box by coordinates of two opposite vertices.
2638             
2639             Parameters:
2640                 x1,y1,z1 double values, defining first point.
2641                 x2,y2,z2 double values, defining second point.
2642                 theName Object name; when specified, this parameter is used
2643                         for result publication in the study. Otherwise, if automatic
2644                         publication is switched on, default value is used for result name.
2645                 
2646             Returns:
2647                 New GEOM.GEOM_Object, containing the created box.
2648             """
2649             # Example: see GEOM_TestAll.py
2650             pnt1 = self.MakeVertex(x1,y1,z1)
2651             pnt2 = self.MakeVertex(x2,y2,z2)
2652             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2653             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2654
2655         ## Create a box with specified dimensions along the coordinate axes
2656         #  and with edges, parallel to the coordinate axes.
2657         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2658         #  @param theDX Length of Box edges, parallel to OX axis.
2659         #  @param theDY Length of Box edges, parallel to OY axis.
2660         #  @param theDZ Length of Box edges, parallel to OZ axis.
2661         #  @param theName Object name; when specified, this parameter is used
2662         #         for result publication in the study. Otherwise, if automatic
2663         #         publication is switched on, default value is used for result name.
2664         #
2665         #  @return New GEOM.GEOM_Object, containing the created box.
2666         #
2667         #  @ref tui_creation_box "Example"
2668         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2669             """
2670             Create a box with specified dimensions along the coordinate axes
2671             and with edges, parallel to the coordinate axes.
2672             Center of the box will be at point (DX/2, DY/2, DZ/2).
2673
2674             Parameters:
2675                 theDX Length of Box edges, parallel to OX axis.
2676                 theDY Length of Box edges, parallel to OY axis.
2677                 theDZ Length of Box edges, parallel to OZ axis.
2678                 theName Object name; when specified, this parameter is used
2679                         for result publication in the study. Otherwise, if automatic
2680                         publication is switched on, default value is used for result name.
2681
2682             Returns:   
2683                 New GEOM.GEOM_Object, containing the created box.
2684             """
2685             # Example: see GEOM_TestAll.py
2686             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2687             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2688             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2689             anObj.SetParameters(Parameters)
2690             self._autoPublish(anObj, theName, "box")
2691             return anObj
2692
2693         ## Create a box with two specified opposite vertices,
2694         #  and with edges, parallel to the coordinate axes
2695         #  @param thePnt1 First of two opposite vertices.
2696         #  @param thePnt2 Second of two opposite vertices.
2697         #  @param theName Object name; when specified, this parameter is used
2698         #         for result publication in the study. Otherwise, if automatic
2699         #         publication is switched on, default value is used for result name.
2700         #
2701         #  @return New GEOM.GEOM_Object, containing the created box.
2702         #
2703         #  @ref tui_creation_box "Example"
2704         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2705             """
2706             Create a box with two specified opposite vertices,
2707             and with edges, parallel to the coordinate axes
2708
2709             Parameters:
2710                 thePnt1 First of two opposite vertices.
2711                 thePnt2 Second of two opposite vertices.
2712                 theName Object name; when specified, this parameter is used
2713                         for result publication in the study. Otherwise, if automatic
2714                         publication is switched on, default value is used for result name.
2715
2716             Returns:
2717                 New GEOM.GEOM_Object, containing the created box.
2718             """
2719             # Example: see GEOM_TestAll.py
2720             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2721             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2722             self._autoPublish(anObj, theName, "box")
2723             return anObj
2724
2725         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2726         #  @param theH height of Face.
2727         #  @param theW width of Face.
2728         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2729         #  @param theName Object name; when specified, this parameter is used
2730         #         for result publication in the study. Otherwise, if automatic
2731         #         publication is switched on, default value is used for result name.
2732         #
2733         #  @return New GEOM.GEOM_Object, containing the created face.
2734         #
2735         #  @ref tui_creation_face "Example"
2736         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2737             """
2738             Create a face with specified dimensions with edges parallel to coordinate axes.
2739
2740             Parameters:
2741                 theH height of Face.
2742                 theW width of Face.
2743                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2744                 theName Object name; when specified, this parameter is used
2745                         for result publication in the study. Otherwise, if automatic
2746                         publication is switched on, default value is used for result name.
2747
2748             Returns:
2749                 New GEOM.GEOM_Object, containing the created face.
2750             """
2751             # Example: see GEOM_TestAll.py
2752             theH,theW,Parameters = ParseParameters(theH, theW)
2753             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2754             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2755             anObj.SetParameters(Parameters)
2756             self._autoPublish(anObj, theName, "rectangle")
2757             return anObj
2758
2759         ## Create a face from another plane and two sizes,
2760         #  vertical size and horisontal size.
2761         #  @param theObj   Normale vector to the creating face or
2762         #  the face object.
2763         #  @param theH     Height (vertical size).
2764         #  @param theW     Width (horisontal size).
2765         #  @param theName Object name; when specified, this parameter is used
2766         #         for result publication in the study. Otherwise, if automatic
2767         #         publication is switched on, default value is used for result name.
2768         #
2769         #  @return New GEOM.GEOM_Object, containing the created face.
2770         #
2771         #  @ref tui_creation_face "Example"
2772         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2773             """
2774             Create a face from another plane and two sizes,
2775             vertical size and horisontal size.
2776
2777             Parameters:
2778                 theObj   Normale vector to the creating face or
2779                          the face object.
2780                 theH     Height (vertical size).
2781                 theW     Width (horisontal size).
2782                 theName Object name; when specified, this parameter is used
2783                         for result publication in the study. Otherwise, if automatic
2784                         publication is switched on, default value is used for result name.
2785
2786             Returns:
2787                 New GEOM_Object, containing the created face.
2788             """
2789             # Example: see GEOM_TestAll.py
2790             theH,theW,Parameters = ParseParameters(theH, theW)
2791             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2792             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2793             anObj.SetParameters(Parameters)
2794             self._autoPublish(anObj, theName, "rectangle")
2795             return anObj
2796
2797         ## Create a disk with given center, normal vector and radius.
2798         #  @param thePnt Disk center.
2799         #  @param theVec Vector, normal to the plane of the disk.
2800         #  @param theR Disk radius.
2801         #  @param theName Object name; when specified, this parameter is used
2802         #         for result publication in the study. Otherwise, if automatic
2803         #         publication is switched on, default value is used for result name.
2804         #
2805         #  @return New GEOM.GEOM_Object, containing the created disk.
2806         #
2807         #  @ref tui_creation_disk "Example"
2808         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2809             """
2810             Create a disk with given center, normal vector and radius.
2811
2812             Parameters:
2813                 thePnt Disk center.
2814                 theVec Vector, normal to the plane of the disk.
2815                 theR Disk radius.
2816                 theName Object name; when specified, this parameter is used
2817                         for result publication in the study. Otherwise, if automatic
2818                         publication is switched on, default value is used for result name.
2819
2820             Returns:    
2821                 New GEOM.GEOM_Object, containing the created disk.
2822             """
2823             # Example: see GEOM_TestAll.py
2824             theR,Parameters = ParseParameters(theR)
2825             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2826             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2827             anObj.SetParameters(Parameters)
2828             self._autoPublish(anObj, theName, "disk")
2829             return anObj
2830
2831         ## Create a disk, passing through three given points
2832         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2833         #  @param theName Object name; when specified, this parameter is used
2834         #         for result publication in the study. Otherwise, if automatic
2835         #         publication is switched on, default value is used for result name.
2836         #
2837         #  @return New GEOM.GEOM_Object, containing the created disk.
2838         #
2839         #  @ref tui_creation_disk "Example"
2840         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2841             """
2842             Create a disk, passing through three given points
2843
2844             Parameters:
2845                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2846                 theName Object name; when specified, this parameter is used
2847                         for result publication in the study. Otherwise, if automatic
2848                         publication is switched on, default value is used for result name.
2849
2850             Returns:    
2851                 New GEOM.GEOM_Object, containing the created disk.
2852             """
2853             # Example: see GEOM_TestAll.py
2854             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2855             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2856             self._autoPublish(anObj, theName, "disk")
2857             return anObj
2858
2859         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2860         #  @param theR Radius of Face.
2861         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2862         #  @param theName Object name; when specified, this parameter is used
2863         #         for result publication in the study. Otherwise, if automatic
2864         #         publication is switched on, default value is used for result name.
2865         #
2866         #  @return New GEOM.GEOM_Object, containing the created disk.
2867         #
2868         #  @ref tui_creation_face "Example"
2869         def MakeDiskR(self, theR, theOrientation, theName=None):
2870             """
2871             Create a disk with specified dimensions along OX-OY coordinate axes.
2872
2873             Parameters:
2874                 theR Radius of Face.
2875                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2876                 theName Object name; when specified, this parameter is used
2877                         for result publication in the study. Otherwise, if automatic
2878                         publication is switched on, default value is used for result name.
2879
2880             Returns: 
2881                 New GEOM.GEOM_Object, containing the created disk.
2882
2883             Example of usage:
2884                 Disk3 = geompy.MakeDiskR(100., 1)
2885             """
2886             # Example: see GEOM_TestAll.py
2887             theR,Parameters = ParseParameters(theR)
2888             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2889             RaiseIfFailed("MakeDiskR", self.PrimOp)
2890             anObj.SetParameters(Parameters)
2891             self._autoPublish(anObj, theName, "disk")
2892             return anObj
2893
2894         ## Create a cylinder with given base point, axis, radius and height.
2895         #  @param thePnt Central point of cylinder base.
2896         #  @param theAxis Cylinder axis.
2897         #  @param theR Cylinder radius.
2898         #  @param theH Cylinder height.
2899         #  @param theName Object name; when specified, this parameter is used
2900         #         for result publication in the study. Otherwise, if automatic
2901         #         publication is switched on, default value is used for result name.
2902         #
2903         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2904         #
2905         #  @ref tui_creation_cylinder "Example"
2906         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2907             """
2908             Create a cylinder with given base point, axis, radius and height.
2909
2910             Parameters:
2911                 thePnt Central point of cylinder base.
2912                 theAxis Cylinder axis.
2913                 theR Cylinder radius.
2914                 theH Cylinder height.
2915                 theName Object name; when specified, this parameter is used
2916                         for result publication in the study. Otherwise, if automatic
2917                         publication is switched on, default value is used for result name.
2918
2919             Returns: 
2920                 New GEOM.GEOM_Object, containing the created cylinder.
2921             """
2922             # Example: see GEOM_TestAll.py
2923             theR,theH,Parameters = ParseParameters(theR, theH)
2924             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
2925             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
2926             anObj.SetParameters(Parameters)
2927             self._autoPublish(anObj, theName, "cylinder")
2928             return anObj
2929
2930         ## Create a cylinder with given radius and height at
2931         #  the origin of coordinate system. Axis of the cylinder
2932         #  will be collinear to the OZ axis of the coordinate system.
2933         #  @param theR Cylinder radius.
2934         #  @param theH Cylinder height.
2935         #  @param theName Object name; when specified, this parameter is used
2936         #         for result publication in the study. Otherwise, if automatic
2937         #         publication is switched on, default value is used for result name.
2938         #
2939         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2940         #
2941         #  @ref tui_creation_cylinder "Example"
2942         def MakeCylinderRH(self, theR, theH, theName=None):
2943             """
2944             Create a cylinder with given radius and height at
2945             the origin of coordinate system. Axis of the cylinder
2946             will be collinear to the OZ axis of the coordinate system.
2947
2948             Parameters:
2949                 theR Cylinder radius.
2950                 theH Cylinder height.
2951                 theName Object name; when specified, this parameter is used
2952                         for result publication in the study. Otherwise, if automatic
2953                         publication is switched on, default value is used for result name.
2954
2955             Returns:    
2956                 New GEOM.GEOM_Object, containing the created cylinder.
2957             """
2958             # Example: see GEOM_TestAll.py
2959             theR,theH,Parameters = ParseParameters(theR, theH)
2960             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
2961             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
2962             anObj.SetParameters(Parameters)
2963             self._autoPublish(anObj, theName, "cylinder")
2964             return anObj
2965
2966         ## Create a sphere with given center and radius.
2967         #  @param thePnt Sphere center.
2968         #  @param theR Sphere radius.
2969         #  @param theName Object name; when specified, this parameter is used
2970         #         for result publication in the study. Otherwise, if automatic
2971         #         publication is switched on, default value is used for result name.
2972         #
2973         #  @return New GEOM.GEOM_Object, containing the created sphere.
2974         #
2975         #  @ref tui_creation_sphere "Example"
2976         def MakeSpherePntR(self, thePnt, theR, theName=None):
2977             """
2978             Create a sphere with given center and radius.
2979
2980             Parameters:
2981                 thePnt Sphere center.
2982                 theR Sphere radius.
2983                 theName Object name; when specified, this parameter is used
2984                         for result publication in the study. Otherwise, if automatic
2985                         publication is switched on, default value is used for result name.
2986
2987             Returns:    
2988                 New GEOM.GEOM_Object, containing the created sphere.            
2989             """
2990             # Example: see GEOM_TestAll.py
2991             theR,Parameters = ParseParameters(theR)
2992             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
2993             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
2994             anObj.SetParameters(Parameters)
2995             self._autoPublish(anObj, theName, "sphere")
2996             return anObj
2997
2998         ## Create a sphere with given center and radius.
2999         #  @param x,y,z Coordinates of sphere center.
3000         #  @param theR Sphere radius.
3001         #  @param theName Object name; when specified, this parameter is used
3002         #         for result publication in the study. Otherwise, if automatic
3003         #         publication is switched on, default value is used for result name.
3004         #
3005         #  @return New GEOM.GEOM_Object, containing the created sphere.
3006         #
3007         #  @ref tui_creation_sphere "Example"
3008         def MakeSphere(self, x, y, z, theR, theName=None):
3009             """
3010             Create a sphere with given center and radius.
3011
3012             Parameters: 
3013                 x,y,z Coordinates of sphere center.
3014                 theR Sphere radius.
3015                 theName Object name; when specified, this parameter is used
3016                         for result publication in the study. Otherwise, if automatic
3017                         publication is switched on, default value is used for result name.
3018
3019             Returns:
3020                 New GEOM.GEOM_Object, containing the created sphere.
3021             """
3022             # Example: see GEOM_TestAll.py
3023             point = self.MakeVertex(x, y, z)
3024             # note: auto-publishing is done in self.MakeSpherePntR()
3025             anObj = self.MakeSpherePntR(point, theR, theName)
3026             return anObj
3027
3028         ## Create a sphere with given radius at the origin of coordinate system.
3029         #  @param theR Sphere radius.
3030         #  @param theName Object name; when specified, this parameter is used
3031         #         for result publication in the study. Otherwise, if automatic
3032         #         publication is switched on, default value is used for result name.
3033         #
3034         #  @return New GEOM.GEOM_Object, containing the created sphere.
3035         #
3036         #  @ref tui_creation_sphere "Example"
3037         def MakeSphereR(self, theR, theName=None):
3038             """
3039             Create a sphere with given radius at the origin of coordinate system.
3040
3041             Parameters: 
3042                 theR Sphere radius.
3043                 theName Object name; when specified, this parameter is used
3044                         for result publication in the study. Otherwise, if automatic
3045                         publication is switched on, default value is used for result name.
3046
3047             Returns:
3048                 New GEOM.GEOM_Object, containing the created sphere.            
3049             """
3050             # Example: see GEOM_TestAll.py
3051             theR,Parameters = ParseParameters(theR)
3052             anObj = self.PrimOp.MakeSphereR(theR)
3053             RaiseIfFailed("MakeSphereR", self.PrimOp)
3054             anObj.SetParameters(Parameters)
3055             self._autoPublish(anObj, theName, "sphere")
3056             return anObj
3057
3058         ## Create a cone with given base point, axis, height and radiuses.
3059         #  @param thePnt Central point of the first cone base.
3060         #  @param theAxis Cone axis.
3061         #  @param theR1 Radius of the first cone base.
3062         #  @param theR2 Radius of the second cone base.
3063         #    \note If both radiuses are non-zero, the cone will be truncated.
3064         #    \note If the radiuses are equal, a cylinder will be created instead.
3065         #  @param theH Cone height.
3066         #  @param theName Object name; when specified, this parameter is used
3067         #         for result publication in the study. Otherwise, if automatic
3068         #         publication is switched on, default value is used for result name.
3069         #
3070         #  @return New GEOM.GEOM_Object, containing the created cone.
3071         #
3072         #  @ref tui_creation_cone "Example"
3073         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3074             """
3075             Create a cone with given base point, axis, height and radiuses.
3076
3077             Parameters: 
3078                 thePnt Central point of the first cone base.
3079                 theAxis Cone axis.
3080                 theR1 Radius of the first cone base.
3081                 theR2 Radius of the second cone base.
3082                 theH Cone height.
3083                 theName Object name; when specified, this parameter is used
3084                         for result publication in the study. Otherwise, if automatic
3085                         publication is switched on, default value is used for result name.
3086
3087             Note:
3088                 If both radiuses are non-zero, the cone will be truncated.
3089                 If the radiuses are equal, a cylinder will be created instead.
3090
3091             Returns:
3092                 New GEOM.GEOM_Object, containing the created cone.
3093             """
3094             # Example: see GEOM_TestAll.py
3095             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3096             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3097             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3098             anObj.SetParameters(Parameters)
3099             self._autoPublish(anObj, theName, "cone")
3100             return anObj
3101
3102         ## Create a cone with given height and radiuses at
3103         #  the origin of coordinate system. Axis of the cone will
3104         #  be collinear to the OZ axis of the coordinate system.
3105         #  @param theR1 Radius of the first cone base.
3106         #  @param theR2 Radius of the second cone base.
3107         #    \note If both radiuses are non-zero, the cone will be truncated.
3108         #    \note If the radiuses are equal, a cylinder will be created instead.
3109         #  @param theH Cone height.
3110         #  @param theName Object name; when specified, this parameter is used
3111         #         for result publication in the study. Otherwise, if automatic
3112         #         publication is switched on, default value is used for result name.
3113         #
3114         #  @return New GEOM.GEOM_Object, containing the created cone.
3115         #
3116         #  @ref tui_creation_cone "Example"
3117         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3118             """
3119             Create a cone with given height and radiuses at
3120             the origin of coordinate system. Axis of the cone will
3121             be collinear to the OZ axis of the coordinate system.
3122
3123             Parameters: 
3124                 theR1 Radius of the first cone base.
3125                 theR2 Radius of the second cone base.
3126                 theH Cone height.
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             Note:
3132                 If both radiuses are non-zero, the cone will be truncated.
3133                 If the radiuses are equal, a cylinder will be created instead.
3134
3135             Returns:
3136                 New GEOM.GEOM_Object, containing the created cone.
3137             """
3138             # Example: see GEOM_TestAll.py
3139             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3140             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3141             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3142             anObj.SetParameters(Parameters)
3143             self._autoPublish(anObj, theName, "cone")
3144             return anObj
3145
3146         ## Create a torus with given center, normal vector and radiuses.
3147         #  @param thePnt Torus central point.
3148         #  @param theVec Torus axis of symmetry.
3149         #  @param theRMajor Torus major radius.
3150         #  @param theRMinor Torus minor radius.
3151         #  @param theName Object name; when specified, this parameter is used
3152         #         for result publication in the study. Otherwise, if automatic
3153         #         publication is switched on, default value is used for result name.
3154         #
3155         #  @return New GEOM.GEOM_Object, containing the created torus.
3156         #
3157         #  @ref tui_creation_torus "Example"
3158         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3159             """
3160             Create a torus with given center, normal vector and radiuses.
3161
3162             Parameters: 
3163                 thePnt Torus central point.
3164                 theVec Torus axis of symmetry.
3165                 theRMajor Torus major radius.
3166                 theRMinor Torus minor 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 torus.
3173             """
3174             # Example: see GEOM_TestAll.py
3175             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3176             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3177             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3178             anObj.SetParameters(Parameters)
3179             self._autoPublish(anObj, theName, "torus")
3180             return anObj
3181
3182         ## Create a torus with given radiuses at the origin of coordinate system.
3183         #  @param theRMajor Torus major radius.
3184         #  @param theRMinor Torus minor 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 torus.
3190         #
3191         #  @ref tui_creation_torus "Example"
3192         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3193             """
3194            Create a torus with given radiuses at the origin of coordinate system.
3195
3196            Parameters: 
3197                 theRMajor Torus major radius.
3198                 theRMinor Torus minor 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 torus.            
3205             """
3206             # Example: see GEOM_TestAll.py
3207             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3208             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3209             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3210             anObj.SetParameters(Parameters)
3211             self._autoPublish(anObj, theName, "torus")
3212             return anObj
3213
3214         # end of l3_3d_primitives
3215         ## @}
3216
3217         ## @addtogroup l3_complex
3218         ## @{
3219
3220         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3221         #  @param theBase Base shape to be extruded.
3222         #  @param thePoint1 First end of extrusion vector.
3223         #  @param thePoint2 Second end of extrusion vector.
3224         #  @param theScaleFactor Use it to make prism with scaled second base.
3225         #                        Nagative value means not scaled second base.
3226         #  @param theName Object name; when specified, this parameter is used
3227         #         for result publication in the study. Otherwise, if automatic
3228         #         publication is switched on, default value is used for result name.
3229         #
3230         #  @return New GEOM.GEOM_Object, containing the created prism.
3231         #
3232         #  @ref tui_creation_prism "Example"
3233         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3234             """
3235             Create a shape by extrusion of the base shape along a vector, defined by two points.
3236
3237             Parameters: 
3238                 theBase Base shape to be extruded.
3239                 thePoint1 First end of extrusion vector.
3240                 thePoint2 Second end of extrusion vector.
3241                 theScaleFactor Use it to make prism with scaled second base.
3242                                Nagative value means not scaled second base.
3243                 theName Object name; when specified, this parameter is used
3244                         for result publication in the study. Otherwise, if automatic
3245                         publication is switched on, default value is used for result name.
3246
3247             Returns:
3248                 New GEOM.GEOM_Object, containing the created prism.
3249             """
3250             # Example: see GEOM_TestAll.py
3251             anObj = None
3252             Parameters = ""
3253             if theScaleFactor > 0:
3254                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3255                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3256             else:
3257                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3258             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3259             anObj.SetParameters(Parameters)
3260             self._autoPublish(anObj, theName, "prism")
3261             return anObj
3262
3263         ## Create a shape by extrusion of the base shape along a
3264         #  vector, defined by two points, in 2 Ways (forward/backward).
3265         #  @param theBase Base shape to be extruded.
3266         #  @param thePoint1 First end of extrusion vector.
3267         #  @param thePoint2 Second end of extrusion vector.
3268         #  @param theName Object name; when specified, this parameter is used
3269         #         for result publication in the study. Otherwise, if automatic
3270         #         publication is switched on, default value is used for result name.
3271         #
3272         #  @return New GEOM.GEOM_Object, containing the created prism.
3273         #
3274         #  @ref tui_creation_prism "Example"
3275         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3276             """
3277             Create a shape by extrusion of the base shape along a
3278             vector, defined by two points, in 2 Ways (forward/backward).
3279
3280             Parameters: 
3281                 theBase Base shape to be extruded.
3282                 thePoint1 First end of extrusion vector.
3283                 thePoint2 Second end of extrusion vector.
3284                 theName Object name; when specified, this parameter is used
3285                         for result publication in the study. Otherwise, if automatic
3286                         publication is switched on, default value is used for result name.
3287
3288             Returns:
3289                 New GEOM.GEOM_Object, containing the created prism.
3290             """
3291             # Example: see GEOM_TestAll.py
3292             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3293             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3294             self._autoPublish(anObj, theName, "prism")
3295             return anObj
3296
3297         ## Create a shape by extrusion of the base shape along the vector,
3298         #  i.e. all the space, transfixed by the base shape during its translation
3299         #  along the vector on the given distance.
3300         #  @param theBase Base shape to be extruded.
3301         #  @param theVec Direction of extrusion.
3302         #  @param theH Prism dimension along theVec.
3303         #  @param theScaleFactor Use it to make prism with scaled second base.
3304         #                        Negative value means not scaled second base.
3305         #  @param theName Object name; when specified, this parameter is used
3306         #         for result publication in the study. Otherwise, if automatic
3307         #         publication is switched on, default value is used for result name.
3308         #
3309         #  @return New GEOM.GEOM_Object, containing the created prism.
3310         #
3311         #  @ref tui_creation_prism "Example"
3312         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3313             """
3314             Create a shape by extrusion of the base shape along the vector,
3315             i.e. all the space, transfixed by the base shape during its translation
3316             along the vector on the given distance.
3317
3318             Parameters: 
3319                 theBase Base shape to be extruded.
3320                 theVec Direction of extrusion.
3321                 theH Prism dimension along theVec.
3322                 theScaleFactor Use it to make prism with scaled second base.
3323                                Negative value means not scaled second base.
3324                 theName Object name; when specified, this parameter is used
3325                         for result publication in the study. Otherwise, if automatic
3326                         publication is switched on, default value is used for result name.
3327
3328             Returns:
3329                 New GEOM.GEOM_Object, containing the created prism.
3330             """
3331             # Example: see GEOM_TestAll.py
3332             anObj = None
3333             Parameters = ""
3334             if theScaleFactor > 0:
3335                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3336                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3337             else:
3338                 theH,Parameters = ParseParameters(theH)
3339                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3340             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3341             anObj.SetParameters(Parameters)
3342             self._autoPublish(anObj, theName, "prism")
3343             return anObj
3344
3345         ## Create a shape by extrusion of the base shape along the vector,
3346         #  i.e. all the space, transfixed by the base shape during its translation
3347         #  along the vector on the given distance in 2 Ways (forward/backward).
3348         #  @param theBase Base shape to be extruded.
3349         #  @param theVec Direction of extrusion.
3350         #  @param theH Prism dimension along theVec in forward direction.
3351         #  @param theName Object name; when specified, this parameter is used
3352         #         for result publication in the study. Otherwise, if automatic
3353         #         publication is switched on, default value is used for result name.
3354         #
3355         #  @return New GEOM.GEOM_Object, containing the created prism.
3356         #
3357         #  @ref tui_creation_prism "Example"
3358         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3359             """
3360             Create a shape by extrusion of the base shape along the vector,
3361             i.e. all the space, transfixed by the base shape during its translation
3362             along the vector on the given distance in 2 Ways (forward/backward).
3363
3364             Parameters:
3365                 theBase Base shape to be extruded.
3366                 theVec Direction of extrusion.
3367                 theH Prism dimension along theVec in forward direction.
3368                 theName Object name; when specified, this parameter is used
3369                         for result publication in the study. Otherwise, if automatic
3370                         publication is switched on, default value is used for result name.
3371
3372             Returns:
3373                 New GEOM.GEOM_Object, containing the created prism.
3374             """
3375             # Example: see GEOM_TestAll.py
3376             theH,Parameters = ParseParameters(theH)
3377             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3378             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3379             anObj.SetParameters(Parameters)
3380             self._autoPublish(anObj, theName, "prism")
3381             return anObj
3382
3383         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3384         #  @param theBase Base shape to be extruded.
3385         #  @param theDX, theDY, theDZ Directions of extrusion.
3386         #  @param theScaleFactor Use it to make prism with scaled second base.
3387         #                        Nagative value means not scaled second base.
3388         #  @param theName Object name; when specified, this parameter is used
3389         #         for result publication in the study. Otherwise, if automatic
3390         #         publication is switched on, default value is used for result name.
3391         #
3392         #  @return New GEOM.GEOM_Object, containing the created prism.
3393         #
3394         #  @ref tui_creation_prism "Example"
3395         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3396             """
3397             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3398
3399             Parameters:
3400                 theBase Base shape to be extruded.
3401                 theDX, theDY, theDZ Directions of extrusion.
3402                 theScaleFactor Use it to make prism with scaled second base.
3403                                Nagative value means not scaled second base.
3404                 theName Object name; when specified, this parameter is used
3405                         for result publication in the study. Otherwise, if automatic
3406                         publication is switched on, default value is used for result name.
3407
3408             Returns: 
3409                 New GEOM.GEOM_Object, containing the created prism.
3410             """
3411             # Example: see GEOM_TestAll.py
3412             anObj = None
3413             Parameters = ""
3414             if theScaleFactor > 0:
3415                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3416                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3417             else:
3418                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3419                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3420             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3421             anObj.SetParameters(Parameters)
3422             self._autoPublish(anObj, theName, "prism")
3423             return anObj
3424
3425         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3426         #  i.e. all the space, transfixed by the base shape during its translation
3427         #  along the vector on the given distance in 2 Ways (forward/backward).
3428         #  @param theBase Base shape to be extruded.
3429         #  @param theDX, theDY, theDZ Directions of extrusion.
3430         #  @param theName Object name; when specified, this parameter is used
3431         #         for result publication in the study. Otherwise, if automatic
3432         #         publication is switched on, default value is used for result name.
3433         #
3434         #  @return New GEOM.GEOM_Object, containing the created prism.
3435         #
3436         #  @ref tui_creation_prism "Example"
3437         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3438             """
3439             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3440             i.e. all the space, transfixed by the base shape during its translation
3441             along the vector on the given distance in 2 Ways (forward/backward).
3442
3443             Parameters:
3444                 theBase Base shape to be extruded.
3445                 theDX, theDY, theDZ Directions of extrusion.
3446                 theName Object name; when specified, this parameter is used
3447                         for result publication in the study. Otherwise, if automatic
3448                         publication is switched on, default value is used for result name.
3449
3450             Returns:
3451                 New GEOM.GEOM_Object, containing the created prism.
3452             """
3453             # Example: see GEOM_TestAll.py
3454             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3455             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3456             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3457             anObj.SetParameters(Parameters)
3458             self._autoPublish(anObj, theName, "prism")
3459             return anObj
3460
3461         ## Create a shape by revolution of the base shape around the axis
3462         #  on the given angle, i.e. all the space, transfixed by the base
3463         #  shape during its rotation around the axis on the given angle.
3464         #  @param theBase Base shape to be rotated.
3465         #  @param theAxis Rotation axis.
3466         #  @param theAngle Rotation angle in radians.
3467         #  @param theName Object name; when specified, this parameter is used
3468         #         for result publication in the study. Otherwise, if automatic
3469         #         publication is switched on, default value is used for result name.
3470         #
3471         #  @return New GEOM.GEOM_Object, containing the created revolution.
3472         #
3473         #  @ref tui_creation_revolution "Example"
3474         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3475             """
3476             Create a shape by revolution of the base shape around the axis
3477             on the given angle, i.e. all the space, transfixed by the base
3478             shape during its rotation around the axis on the given angle.
3479
3480             Parameters:
3481                 theBase Base shape to be rotated.
3482                 theAxis Rotation axis.
3483                 theAngle Rotation angle in radians.
3484                 theName Object name; when specified, this parameter is used
3485                         for result publication in the study. Otherwise, if automatic
3486                         publication is switched on, default value is used for result name.
3487
3488             Returns: 
3489                 New GEOM.GEOM_Object, containing the created revolution.
3490             """
3491             # Example: see GEOM_TestAll.py
3492             theAngle,Parameters = ParseParameters(theAngle)
3493             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3494             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3495             anObj.SetParameters(Parameters)
3496             self._autoPublish(anObj, theName, "revolution")
3497             return anObj
3498
3499         ## Create a shape by revolution of the base shape around the axis
3500         #  on the given angle, i.e. all the space, transfixed by the base
3501         #  shape during its rotation around the axis on the given angle in
3502         #  both directions (forward/backward)
3503         #  @param theBase Base shape to be rotated.
3504         #  @param theAxis Rotation axis.
3505         #  @param theAngle Rotation angle in radians.
3506         #  @param theName Object name; when specified, this parameter is used
3507         #         for result publication in the study. Otherwise, if automatic
3508         #         publication is switched on, default value is used for result name.
3509         #
3510         #  @return New GEOM.GEOM_Object, containing the created revolution.
3511         #
3512         #  @ref tui_creation_revolution "Example"
3513         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3514             """
3515             Create a shape by revolution of the base shape around the axis
3516             on the given angle, i.e. all the space, transfixed by the base
3517             shape during its rotation around the axis on the given angle in
3518             both directions (forward/backward).
3519
3520             Parameters:
3521                 theBase Base shape to be rotated.
3522                 theAxis Rotation axis.
3523                 theAngle Rotation angle in radians.
3524                 theName Object name; when specified, this parameter is used
3525                         for result publication in the study. Otherwise, if automatic
3526                         publication is switched on, default value is used for result name.
3527
3528             Returns: 
3529                 New GEOM.GEOM_Object, containing the created revolution.
3530             """
3531             theAngle,Parameters = ParseParameters(theAngle)
3532             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3533             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3534             anObj.SetParameters(Parameters)
3535             self._autoPublish(anObj, theName, "revolution")
3536             return anObj
3537
3538         ## Create a filling from the given compound of contours.
3539         #  @param theShape the compound of contours
3540         #  @param theMinDeg a minimal degree of BSpline surface to create
3541         #  @param theMaxDeg a maximal degree of BSpline surface to create
3542         #  @param theTol2D a 2d tolerance to be reached
3543         #  @param theTol3D a 3d tolerance to be reached
3544         #  @param theNbIter a number of iteration of approximation algorithm
3545         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3546         #  @param isApprox if True, BSpline curves are generated in the process
3547         #                  of surface construction. By default it is False, that means
3548         #                  the surface is created using given curves. The usage of
3549         #                  Approximation makes the algorithm work slower, but allows
3550         #                  building the surface for rather complex cases.
3551         #  @param theName Object name; when specified, this parameter is used
3552         #         for result publication in the study. Otherwise, if automatic
3553         #         publication is switched on, default value is used for result name.
3554         #
3555         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3556         #
3557         #  @ref tui_creation_filling "Example"
3558         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3559                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3560             """
3561             Create a filling from the given compound of contours.
3562
3563             Parameters:
3564                 theShape the compound of contours
3565                 theMinDeg a minimal degree of BSpline surface to create
3566                 theMaxDeg a maximal degree of BSpline surface to create
3567                 theTol2D a 2d tolerance to be reached
3568                 theTol3D a 3d tolerance to be reached
3569                 theNbIter a number of iteration of approximation algorithm
3570                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3571                 isApprox if True, BSpline curves are generated in the process
3572                          of surface construction. By default it is False, that means
3573                          the surface is created using given curves. The usage of
3574                          Approximation makes the algorithm work slower, but allows
3575                          building the surface for rather complex cases
3576                 theName Object name; when specified, this parameter is used
3577                         for result publication in the study. Otherwise, if automatic
3578                         publication is switched on, default value is used for result name.
3579
3580             Returns: 
3581                 New GEOM.GEOM_Object, containing the created filling surface.
3582
3583             Example of usage:
3584                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3585             """
3586             # Example: see GEOM_TestAll.py
3587             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3588             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3589                                             theTol2D, theTol3D, theNbIter,
3590                                             theMethod, isApprox)
3591             RaiseIfFailed("MakeFilling", self.PrimOp)
3592             anObj.SetParameters(Parameters)
3593             self._autoPublish(anObj, theName, "filling")
3594             return anObj
3595
3596
3597         ## Create a filling from the given compound of contours.
3598         #  This method corresponds to MakeFilling with isApprox=True
3599         #  @param theShape the compound of contours
3600         #  @param theMinDeg a minimal degree of BSpline surface to create
3601         #  @param theMaxDeg a maximal degree of BSpline surface to create
3602         #  @param theTol3D a 3d tolerance to be reached
3603         #  @param theName Object name; when specified, this parameter is used
3604         #         for result publication in the study. Otherwise, if automatic
3605         #         publication is switched on, default value is used for result name.
3606         #
3607         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3608         #
3609         #  @ref tui_creation_filling "Example"
3610         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3611             """
3612             Create a filling from the given compound of contours.
3613             This method corresponds to MakeFilling with isApprox=True
3614
3615             Parameters:
3616                 theShape the compound of contours
3617                 theMinDeg a minimal degree of BSpline surface to create
3618                 theMaxDeg a maximal degree of BSpline surface to create
3619                 theTol3D a 3d tolerance to be reached
3620                 theName Object name; when specified, this parameter is used
3621                         for result publication in the study. Otherwise, if automatic
3622                         publication is switched on, default value is used for result name.
3623
3624             Returns: 
3625                 New GEOM.GEOM_Object, containing the created filling surface.
3626
3627             Example of usage:
3628                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3629             """
3630             # Example: see GEOM_TestAll.py
3631             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3632             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3633                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3634             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3635             anObj.SetParameters(Parameters)
3636             self._autoPublish(anObj, theName, "filling")
3637             return anObj
3638
3639         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3640         #  @param theSeqSections - set of specified sections.
3641         #  @param theModeSolid - mode defining building solid or shell
3642         #  @param thePreci - precision 3D used for smoothing
3643         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3644         #  @param theName Object name; when specified, this parameter is used
3645         #         for result publication in the study. Otherwise, if automatic
3646         #         publication is switched on, default value is used for result name.
3647         #
3648         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3649         #
3650         #  @ref swig_todo "Example"
3651         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3652             """
3653             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3654
3655             Parameters:
3656                 theSeqSections - set of specified sections.
3657                 theModeSolid - mode defining building solid or shell
3658                 thePreci - precision 3D used for smoothing
3659                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3660                 theName Object name; when specified, this parameter is used
3661                         for result publication in the study. Otherwise, if automatic
3662                         publication is switched on, default value is used for result name.
3663
3664             Returns:
3665                 New GEOM.GEOM_Object, containing the created shell or solid.
3666             """
3667             # Example: see GEOM_TestAll.py
3668             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3669             RaiseIfFailed("MakeThruSections", self.PrimOp)
3670             self._autoPublish(anObj, theName, "filling")
3671             return anObj
3672
3673         ## Create a shape by extrusion of the base shape along
3674         #  the path shape. The path shape can be a wire or an edge.
3675         #  @param theBase Base shape to be extruded.
3676         #  @param thePath Path shape to extrude the base shape along it.
3677         #  @param theName Object name; when specified, this parameter is used
3678         #         for result publication in the study. Otherwise, if automatic
3679         #         publication is switched on, default value is used for result name.
3680         #
3681         #  @return New GEOM.GEOM_Object, containing the created pipe.
3682         #
3683         #  @ref tui_creation_pipe "Example"
3684         def MakePipe(self, theBase, thePath, theName=None):
3685             """
3686             Create a shape by extrusion of the base shape along
3687             the path shape. The path shape can be a wire or an edge.
3688
3689             Parameters:
3690                 theBase Base shape to be extruded.
3691                 thePath Path shape to extrude the base shape along it.
3692                 theName Object name; when specified, this parameter is used
3693                         for result publication in the study. Otherwise, if automatic
3694                         publication is switched on, default value is used for result name.
3695
3696             Returns:
3697                 New GEOM.GEOM_Object, containing the created pipe.
3698             """
3699             # Example: see GEOM_TestAll.py
3700             anObj = self.PrimOp.MakePipe(theBase, thePath)
3701             RaiseIfFailed("MakePipe", self.PrimOp)
3702             self._autoPublish(anObj, theName, "pipe")
3703             return anObj
3704
3705         ## Create a shape by extrusion of the profile shape along
3706         #  the path shape. The path shape can be a wire or an edge.
3707         #  the several profiles can be specified in the several locations of path.
3708         #  @param theSeqBases - list of  Bases shape to be extruded.
3709         #  @param theLocations - list of locations on the path corresponding
3710         #                        specified list of the Bases shapes. Number of locations
3711         #                        should be equal to number of bases or list of locations can be empty.
3712         #  @param thePath - Path shape to extrude the base shape along it.
3713         #  @param theWithContact - the mode defining that the section is translated to be in
3714         #                          contact with the spine.
3715         #  @param theWithCorrection - defining that the section is rotated to be
3716         #                             orthogonal to the spine tangent in the correspondent point
3717         #  @param theName Object name; when specified, this parameter is used
3718         #         for result publication in the study. Otherwise, if automatic
3719         #         publication is switched on, default value is used for result name.
3720         #
3721         #  @return New GEOM.GEOM_Object, containing the created pipe.
3722         #
3723         #  @ref tui_creation_pipe_with_diff_sec "Example"
3724         def MakePipeWithDifferentSections(self, theSeqBases,
3725                                           theLocations, thePath,
3726                                           theWithContact, theWithCorrection, theName=None):
3727             """
3728             Create a shape by extrusion of the profile shape along
3729             the path shape. The path shape can be a wire or an edge.
3730             the several profiles can be specified in the several locations of path.
3731
3732             Parameters:
3733                 theSeqBases - list of  Bases shape to be extruded.
3734                 theLocations - list of locations on the path corresponding
3735                                specified list of the Bases shapes. Number of locations
3736                                should be equal to number of bases or list of locations can be empty.
3737                 thePath - Path shape to extrude the base shape along it.
3738                 theWithContact - the mode defining that the section is translated to be in
3739                                  contact with the spine(0/1)
3740                 theWithCorrection - defining that the section is rotated to be
3741                                     orthogonal to the spine tangent in the correspondent point (0/1)
3742                 theName Object name; when specified, this parameter is used
3743                         for result publication in the study. Otherwise, if automatic
3744                         publication is switched on, default value is used for result name.
3745
3746             Returns:
3747                 New GEOM.GEOM_Object, containing the created pipe.
3748             """
3749             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3750                                                               theLocations, thePath,
3751                                                               theWithContact, theWithCorrection)
3752             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3753             self._autoPublish(anObj, theName, "pipe")
3754             return anObj
3755
3756         ## Create a shape by extrusion of the profile shape along
3757         #  the path shape. The path shape can be a wire or a edge.
3758         #  the several profiles can be specified in the several locations of path.
3759         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3760         #                       shell or face. If number of faces in neighbour sections
3761         #                       aren't coincided result solid between such sections will
3762         #                       be created using external boundaries of this shells.
3763         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3764         #                          This list is used for searching correspondences between
3765         #                          faces in the sections. Size of this list must be equal
3766         #                          to size of list of base shapes.
3767         #  @param theLocations - list of locations on the path corresponding
3768         #                        specified list of the Bases shapes. Number of locations
3769         #                        should be equal to number of bases. First and last
3770         #                        locations must be coincided with first and last vertexes
3771         #                        of path correspondingly.
3772         #  @param thePath - Path shape to extrude the base shape along it.
3773         #  @param theWithContact - the mode defining that the section is translated to be in
3774         #                          contact with the spine.
3775         #  @param theWithCorrection - defining that the section is rotated to be
3776         #                             orthogonal to the spine tangent in the correspondent point
3777         #  @param theName Object name; when specified, this parameter is used
3778         #         for result publication in the study. Otherwise, if automatic
3779         #         publication is switched on, default value is used for result name.
3780         #
3781         #  @return New GEOM.GEOM_Object, containing the created solids.
3782         #
3783         #  @ref tui_creation_pipe_with_shell_sec "Example"
3784         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3785                                       theLocations, thePath,
3786                                       theWithContact, theWithCorrection, theName=None):
3787             """
3788             Create a shape by extrusion of the profile shape along
3789             the path shape. The path shape can be a wire or a edge.
3790             the several profiles can be specified in the several locations of path.
3791
3792             Parameters:
3793                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3794                               shell or face. If number of faces in neighbour sections
3795                               aren't coincided result solid between such sections will
3796                               be created using external boundaries of this shells.
3797                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3798                                  This list is used for searching correspondences between
3799                                  faces in the sections. Size of this list must be equal
3800                                  to size of list of base shapes.
3801                 theLocations - list of locations on the path corresponding
3802                                specified list of the Bases shapes. Number of locations
3803                                should be equal to number of bases. First and last
3804                                locations must be coincided with first and last vertexes
3805                                of path correspondingly.
3806                 thePath - Path shape to extrude the base shape along it.
3807                 theWithContact - the mode defining that the section is translated to be in
3808                                  contact with the spine (0/1)
3809                 theWithCorrection - defining that the section is rotated to be
3810                                     orthogonal to the spine tangent in the correspondent point (0/1)
3811                 theName Object name; when specified, this parameter is used
3812                         for result publication in the study. Otherwise, if automatic
3813                         publication is switched on, default value is used for result name.
3814
3815             Returns:                           
3816                 New GEOM.GEOM_Object, containing the created solids.
3817             """
3818             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
3819                                                           theLocations, thePath,
3820                                                           theWithContact, theWithCorrection)
3821             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3822             self._autoPublish(anObj, theName, "pipe")
3823             return anObj
3824
3825         ## Create a shape by extrusion of the profile shape along
3826         #  the path shape. This function is used only for debug pipe
3827         #  functionality - it is a version of function MakePipeWithShellSections()
3828         #  which give a possibility to recieve information about
3829         #  creating pipe between each pair of sections step by step.
3830         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
3831                                              theLocations, thePath,
3832                                              theWithContact, theWithCorrection, theName=None):
3833             """
3834             Create a shape by extrusion of the profile shape along
3835             the path shape. This function is used only for debug pipe
3836             functionality - it is a version of previous function
3837             geompy.MakePipeWithShellSections() which give a possibility to
3838             recieve information about creating pipe between each pair of
3839             sections step by step.
3840             """
3841             res = []
3842             nbsect = len(theSeqBases)
3843             nbsubsect = len(theSeqSubBases)
3844             #print "nbsect = ",nbsect
3845             for i in range(1,nbsect):
3846                 #print "  i = ",i
3847                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
3848                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
3849                 tmpSeqSubBases = []
3850                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
3851                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
3852                                                               tmpLocations, thePath,
3853                                                               theWithContact, theWithCorrection)
3854                 if self.PrimOp.IsDone() == 0:
3855                     print "Problems with pipe creation between ",i," and ",i+1," sections"
3856                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3857                     break
3858                 else:
3859                     print "Pipe between ",i," and ",i+1," sections is OK"
3860                     res.append(anObj)
3861                     pass
3862                 pass
3863
3864             resc = self.MakeCompound(res)
3865             #resc = self.MakeSewing(res, 0.001)
3866             #print "resc: ",resc
3867             self._autoPublish(resc, theName, "pipe")
3868             return resc
3869
3870         ## Create solids between given sections
3871         #  @param theSeqBases - list of sections (shell or face).
3872         #  @param theLocations - list of corresponding vertexes
3873         #  @param theName Object name; when specified, this parameter is used
3874         #         for result publication in the study. Otherwise, if automatic
3875         #         publication is switched on, default value is used for result name.
3876         #
3877         #  @return New GEOM.GEOM_Object, containing the created solids.
3878         #
3879         #  @ref tui_creation_pipe_without_path "Example"
3880         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
3881             """
3882             Create solids between given sections
3883
3884             Parameters:
3885                 theSeqBases - list of sections (shell or face).
3886                 theLocations - list of corresponding vertexes
3887                 theName Object name; when specified, this parameter is used
3888                         for result publication in the study. Otherwise, if automatic
3889                         publication is switched on, default value is used for result name.
3890
3891             Returns:
3892                 New GEOM.GEOM_Object, containing the created solids.
3893             """
3894             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
3895             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
3896             self._autoPublish(anObj, theName, "pipe")
3897             return anObj
3898
3899         ## Create a shape by extrusion of the base shape along
3900         #  the path shape with constant bi-normal direction along the given vector.
3901         #  The path shape can be a wire or an edge.
3902         #  @param theBase Base shape to be extruded.
3903         #  @param thePath Path shape to extrude the base shape along it.
3904         #  @param theVec Vector defines a constant binormal direction to keep the
3905         #                same angle beetween the direction and the sections
3906         #                along the sweep surface.
3907         #  @param theName Object name; when specified, this parameter is used
3908         #         for result publication in the study. Otherwise, if automatic
3909         #         publication is switched on, default value is used for result name.
3910         #
3911         #  @return New GEOM.GEOM_Object, containing the created pipe.
3912         #
3913         #  @ref tui_creation_pipe "Example"
3914         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
3915             """
3916             Create a shape by extrusion of the base shape along
3917             the path shape with constant bi-normal direction along the given vector.
3918             The path shape can be a wire or an edge.
3919
3920             Parameters:
3921                 theBase Base shape to be extruded.
3922                 thePath Path shape to extrude the base shape along it.
3923                 theVec Vector defines a constant binormal direction to keep the
3924                        same angle beetween the direction and the sections
3925                        along the sweep surface.
3926                 theName Object name; when specified, this parameter is used
3927                         for result publication in the study. Otherwise, if automatic
3928                         publication is switched on, default value is used for result name.
3929
3930             Returns:              
3931                 New GEOM.GEOM_Object, containing the created pipe.
3932             """
3933             # Example: see GEOM_TestAll.py
3934             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
3935             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
3936             self._autoPublish(anObj, theName, "pipe")
3937             return anObj
3938               
3939         ## Makes a thick solid from a face or a shell
3940         #  @param theShape Face or Shell to be thicken
3941         #  @param theThickness Thickness of the resulting solid
3942         #  @param theName Object name; when specified, this parameter is used
3943         #         for result publication in the study. Otherwise, if automatic
3944         #         publication is switched on, default value is used for result name.
3945         #
3946         #  @return New GEOM.GEOM_Object, containing the created solid
3947         #
3948         def MakeThickSolid(self, theShape, theThickness, theName=None):
3949             """
3950             Make a thick solid from a face or a shell
3951
3952             Parameters:
3953                  theShape Face or Shell to be thicken
3954                  theThickness Thickness of the resulting solid
3955                  theName Object name; when specified, this parameter is used
3956                  for result publication in the study. Otherwise, if automatic
3957                  publication is switched on, default value is used for result name.
3958                  
3959             Returns:
3960                 New GEOM.GEOM_Object, containing the created solid
3961             """
3962             # Example: see GEOM_TestAll.py
3963             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
3964             RaiseIfFailed("MakeThickening", self.PrimOp)
3965             self._autoPublish(anObj, theName, "pipe")
3966             return anObj
3967             
3968
3969         ## Modifies a face or a shell to make it a thick solid
3970         #  @param theShape Face or Shell to be thicken
3971         #  @param theThickness Thickness of the resulting solid
3972         #
3973         #  @return The modified shape
3974         #
3975         def Thicken(self, theShape, theThickness):
3976             """
3977             Modifies a face or a shell to make it a thick solid
3978
3979             Parameters:
3980                 theBase Base shape to be extruded.
3981                 thePath Path shape to extrude the base shape along it.
3982                 theName Object name; when specified, this parameter is used
3983                         for result publication in the study. Otherwise, if automatic
3984                         publication is switched on, default value is used for result name.
3985
3986             Returns:
3987                 The modified shape
3988             """
3989             # Example: see GEOM_TestAll.py
3990             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
3991             RaiseIfFailed("MakeThickening", self.PrimOp)
3992             return anObj
3993
3994         ## Build a middle path of a pipe-like shape.
3995         #  The path shape can be a wire or an edge.
3996         #  @param theShape It can be closed or unclosed pipe-like shell
3997         #                  or a pipe-like solid.
3998         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
3999         #                            should be wires or faces of theShape.
4000         #  @param theName Object name; when specified, this parameter is used
4001         #         for result publication in the study. Otherwise, if automatic
4002         #         publication is switched on, default value is used for result name.
4003         #
4004         #  @note It is not assumed that exact or approximate copy of theShape
4005         #        can be obtained by applying existing Pipe operation on the
4006         #        resulting "Path" wire taking theBase1 as the base - it is not
4007         #        always possible; though in some particular cases it might work
4008         #        it is not guaranteed. Thus, RestorePath function should not be
4009         #        considered as an exact reverse operation of the Pipe.
4010         #
4011         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4012         #                                source pipe's "path".
4013         #
4014         #  @ref tui_creation_pipe_path "Example"
4015         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4016             """
4017             Build a middle path of a pipe-like shape.
4018             The path shape can be a wire or an edge.
4019
4020             Parameters:
4021                 theShape It can be closed or unclosed pipe-like shell
4022                          or a pipe-like solid.
4023                 theBase1, theBase2 Two bases of the supposed pipe. This
4024                                    should be wires or faces of theShape.
4025                 theName Object name; when specified, this parameter is used
4026                         for result publication in the study. Otherwise, if automatic
4027                         publication is switched on, default value is used for result name.
4028
4029             Returns:
4030                 New GEOM_Object, containing an edge or wire that represent
4031                                  source pipe's path.
4032             """
4033             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4034             RaiseIfFailed("RestorePath", self.PrimOp)
4035             self._autoPublish(anObj, theName, "path")
4036             return anObj
4037
4038         ## Build a middle path of a pipe-like shape.
4039         #  The path shape can be a wire or an edge.
4040         #  @param theShape It can be closed or unclosed pipe-like shell
4041         #                  or a pipe-like solid.
4042         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4043         #                                should be lists of edges of theShape.
4044         #  @param theName Object name; when specified, this parameter is used
4045         #         for result publication in the study. Otherwise, if automatic
4046         #         publication is switched on, default value is used for result name.
4047         #
4048         #  @note It is not assumed that exact or approximate copy of theShape
4049         #        can be obtained by applying existing Pipe operation on the
4050         #        resulting "Path" wire taking theBase1 as the base - it is not
4051         #        always possible; though in some particular cases it might work
4052         #        it is not guaranteed. Thus, RestorePath function should not be
4053         #        considered as an exact reverse operation of the Pipe.
4054         #
4055         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4056         #                                source pipe's "path".
4057         #
4058         #  @ref tui_creation_pipe_path "Example"
4059         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4060             """
4061             Build a middle path of a pipe-like shape.
4062             The path shape can be a wire or an edge.
4063
4064             Parameters:
4065                 theShape It can be closed or unclosed pipe-like shell
4066                          or a pipe-like solid.
4067                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4068                                        should be lists of edges of theShape.
4069                 theName Object name; when specified, this parameter is used
4070                         for result publication in the study. Otherwise, if automatic
4071                         publication is switched on, default value is used for result name.
4072
4073             Returns:
4074                 New GEOM_Object, containing an edge or wire that represent
4075                                  source pipe's path.
4076             """
4077             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4078             RaiseIfFailed("RestorePath", self.PrimOp)
4079             self._autoPublish(anObj, theName, "path")
4080             return anObj
4081
4082         # end of l3_complex
4083         ## @}
4084
4085         ## @addtogroup l3_advanced
4086         ## @{
4087
4088         ## Create a linear edge with specified ends.
4089         #  @param thePnt1 Point for the first end of edge.
4090         #  @param thePnt2 Point for the second end of edge.
4091         #  @param theName Object name; when specified, this parameter is used
4092         #         for result publication in the study. Otherwise, if automatic
4093         #         publication is switched on, default value is used for result name.
4094         #
4095         #  @return New GEOM.GEOM_Object, containing the created edge.
4096         #
4097         #  @ref tui_creation_edge "Example"
4098         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4099             """
4100             Create a linear edge with specified ends.
4101
4102             Parameters:
4103                 thePnt1 Point for the first end of edge.
4104                 thePnt2 Point for the second end of edge.
4105                 theName Object name; when specified, this parameter is used
4106                         for result publication in the study. Otherwise, if automatic
4107                         publication is switched on, default value is used for result name.
4108
4109             Returns:           
4110                 New GEOM.GEOM_Object, containing the created edge.
4111             """
4112             # Example: see GEOM_TestAll.py
4113             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4114             RaiseIfFailed("MakeEdge", self.ShapesOp)
4115             self._autoPublish(anObj, theName, "edge")
4116             return anObj
4117
4118         ## Create a new edge, corresponding to the given length on the given curve.
4119         #  @param theRefCurve The referenced curve (edge).
4120         #  @param theLength Length on the referenced curve. It can be negative.
4121         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4122         #                       at the end of \a theRefCurve, close to the selected point.
4123         #                       If None, start from the first point of \a theRefCurve.
4124         #  @param theName Object name; when specified, this parameter is used
4125         #         for result publication in the study. Otherwise, if automatic
4126         #         publication is switched on, default value is used for result name.
4127         #
4128         #  @return New GEOM.GEOM_Object, containing the created edge.
4129         #
4130         #  @ref tui_creation_edge "Example"
4131         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4132             """
4133             Create a new edge, corresponding to the given length on the given curve.
4134
4135             Parameters:
4136                 theRefCurve The referenced curve (edge).
4137                 theLength Length on the referenced curve. It can be negative.
4138                 theStartPoint Any point can be selected for it, the new edge will begin
4139                               at the end of theRefCurve, close to the selected point.
4140                               If None, start from the first point of theRefCurve.
4141                 theName Object name; when specified, this parameter is used
4142                         for result publication in the study. Otherwise, if automatic
4143                         publication is switched on, default value is used for result name.
4144
4145             Returns:              
4146                 New GEOM.GEOM_Object, containing the created edge.
4147             """
4148             # Example: see GEOM_TestAll.py
4149             theLength, Parameters = ParseParameters(theLength)
4150             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4151             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4152             anObj.SetParameters(Parameters)
4153             self._autoPublish(anObj, theName, "edge")
4154             return anObj
4155
4156         ## Create an edge from specified wire.
4157         #  @param theWire source Wire
4158         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4159         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4160         #  @param theName Object name; when specified, this parameter is used
4161         #         for result publication in the study. Otherwise, if automatic
4162         #         publication is switched on, default value is used for result name.
4163         #
4164         #  @return New GEOM.GEOM_Object, containing the created edge.
4165         #
4166         #  @ref tui_creation_edge "Example"
4167         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4168             """
4169             Create an edge from specified wire.
4170
4171             Parameters:
4172                 theWire source Wire
4173                 theLinearTolerance linear tolerance value (default = 1e-07)
4174                 theAngularTolerance angular tolerance value (default = 1e-12)
4175                 theName Object name; when specified, this parameter is used
4176                         for result publication in the study. Otherwise, if automatic
4177                         publication is switched on, default value is used for result name.
4178
4179             Returns:
4180                 New GEOM.GEOM_Object, containing the created edge.
4181             """
4182             # Example: see GEOM_TestAll.py
4183             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4184             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4185             self._autoPublish(anObj, theName, "edge")
4186             return anObj
4187
4188         ## Create a wire from the set of edges and wires.
4189         #  @param theEdgesAndWires List of edges and/or wires.
4190         #  @param theTolerance Maximum distance between vertices, that will be merged.
4191         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4192         #  @param theName Object name; when specified, this parameter is used
4193         #         for result publication in the study. Otherwise, if automatic
4194         #         publication is switched on, default value is used for result name.
4195         #
4196         #  @return New GEOM.GEOM_Object, containing the created wire.
4197         #
4198         #  @ref tui_creation_wire "Example"
4199         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4200             """
4201             Create a wire from the set of edges and wires.
4202
4203             Parameters:
4204                 theEdgesAndWires List of edges and/or wires.
4205                 theTolerance Maximum distance between vertices, that will be merged.
4206                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4207                 theName Object name; when specified, this parameter is used
4208                         for result publication in the study. Otherwise, if automatic
4209                         publication is switched on, default value is used for result name.
4210
4211             Returns:                    
4212                 New GEOM.GEOM_Object, containing the created wire.
4213             """
4214             # Example: see GEOM_TestAll.py
4215             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4216             RaiseIfFailed("MakeWire", self.ShapesOp)
4217             self._autoPublish(anObj, theName, "wire")
4218             return anObj
4219
4220         ## Create a face on the given wire.
4221         #  @param theWire closed Wire or Edge to build the face on.
4222         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4223         #                        If the tolerance of the obtained planar face is less
4224         #                        than 1e-06, this face will be returned, otherwise the
4225         #                        algorithm tries to build any suitable face on the given
4226         #                        wire and prints a warning message.
4227         #  @param theName Object name; when specified, this parameter is used
4228         #         for result publication in the study. Otherwise, if automatic
4229         #         publication is switched on, default value is used for result name.
4230         #
4231         #  @return New GEOM.GEOM_Object, containing the created face.
4232         #
4233         #  @ref tui_creation_face "Example"
4234         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4235             """
4236             Create a face on the given wire.
4237
4238             Parameters:
4239                 theWire closed Wire or Edge to build the face on.
4240                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4241                                If the tolerance of the obtained planar face is less
4242                                than 1e-06, this face will be returned, otherwise the
4243                                algorithm tries to build any suitable face on the given
4244                                wire and prints a warning message.
4245                 theName Object name; when specified, this parameter is used
4246                         for result publication in the study. Otherwise, if automatic
4247                         publication is switched on, default value is used for result name.
4248
4249             Returns:
4250                 New GEOM.GEOM_Object, containing the created face.
4251             """
4252             # Example: see GEOM_TestAll.py
4253             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4254             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4255                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4256             else:
4257                 RaiseIfFailed("MakeFace", self.ShapesOp)
4258             self._autoPublish(anObj, theName, "face")
4259             return anObj
4260
4261         ## Create a face on the given wires set.
4262         #  @param theWires List of closed wires or edges to build the face on.
4263         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4264         #                        If the tolerance of the obtained planar face is less
4265         #                        than 1e-06, this face will be returned, otherwise the
4266         #                        algorithm tries to build any suitable face on the given
4267         #                        wire and prints a warning message.
4268         #  @param theName Object name; when specified, this parameter is used
4269         #         for result publication in the study. Otherwise, if automatic
4270         #         publication is switched on, default value is used for result name.
4271         #
4272         #  @return New GEOM.GEOM_Object, containing the created face.
4273         #
4274         #  @ref tui_creation_face "Example"
4275         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4276             """
4277             Create a face on the given wires set.
4278
4279             Parameters:
4280                 theWires List of closed wires or edges to build the face on.
4281                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4282                                If the tolerance of the obtained planar face is less
4283                                than 1e-06, this face will be returned, otherwise the
4284                                algorithm tries to build any suitable face on the given
4285                                wire and prints a warning message.
4286                 theName Object name; when specified, this parameter is used
4287                         for result publication in the study. Otherwise, if automatic
4288                         publication is switched on, default value is used for result name.
4289
4290             Returns: 
4291                 New GEOM.GEOM_Object, containing the created face.
4292             """
4293             # Example: see GEOM_TestAll.py
4294             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4295             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4296                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4297             else:
4298                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4299             self._autoPublish(anObj, theName, "face")
4300             return anObj
4301
4302         ## See MakeFaceWires() method for details.
4303         #
4304         #  @ref tui_creation_face "Example 1"
4305         #  \n @ref swig_MakeFaces  "Example 2"
4306         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4307             """
4308             See geompy.MakeFaceWires() method for details.
4309             """
4310             # Example: see GEOM_TestOthers.py
4311             # note: auto-publishing is done in self.MakeFaceWires()
4312             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4313             return anObj
4314
4315         ## Create a shell from the set of faces and shells.
4316         #  @param theFacesAndShells List of faces and/or shells.
4317         #  @param theName Object name; when specified, this parameter is used
4318         #         for result publication in the study. Otherwise, if automatic
4319         #         publication is switched on, default value is used for result name.
4320         #
4321         #  @return New GEOM.GEOM_Object, containing the created shell.
4322         #
4323         #  @ref tui_creation_shell "Example"
4324         def MakeShell(self, theFacesAndShells, theName=None):
4325             """
4326             Create a shell from the set of faces and shells.
4327
4328             Parameters:
4329                 theFacesAndShells List of faces and/or shells.
4330                 theName Object name; when specified, this parameter is used
4331                         for result publication in the study. Otherwise, if automatic
4332                         publication is switched on, default value is used for result name.
4333
4334             Returns:
4335                 New GEOM.GEOM_Object, containing the created shell.
4336             """
4337             # Example: see GEOM_TestAll.py
4338             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4339             RaiseIfFailed("MakeShell", self.ShapesOp)
4340             self._autoPublish(anObj, theName, "shell")
4341             return anObj
4342
4343         ## Create a solid, bounded by the given shells.
4344         #  @param theShells Sequence of bounding shells.
4345         #  @param theName Object name; when specified, this parameter is used
4346         #         for result publication in the study. Otherwise, if automatic
4347         #         publication is switched on, default value is used for result name.
4348         #
4349         #  @return New GEOM.GEOM_Object, containing the created solid.
4350         #
4351         #  @ref tui_creation_solid "Example"
4352         def MakeSolid(self, theShells, theName=None):
4353             """
4354             Create a solid, bounded by the given shells.
4355
4356             Parameters:
4357                 theShells Sequence of bounding shells.
4358                 theName Object name; when specified, this parameter is used
4359                         for result publication in the study. Otherwise, if automatic
4360                         publication is switched on, default value is used for result name.
4361
4362             Returns:
4363                 New GEOM.GEOM_Object, containing the created solid.
4364             """
4365             # Example: see GEOM_TestAll.py
4366             if len(theShells) == 1:
4367                 descr = self.MeasuOp.IsGoodForSolid(theShells[0])
4368                 #if len(descr) > 0:
4369                 #    raise RuntimeError, "MakeSolidShells : " + descr
4370                 if descr == "WRN_SHAPE_UNCLOSED":
4371                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4372             anObj = self.ShapesOp.MakeSolidShells(theShells)
4373             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4374             self._autoPublish(anObj, theName, "solid")
4375             return anObj
4376
4377         ## Create a compound of the given shapes.
4378         #  @param theShapes List of shapes to put in compound.
4379         #  @param theName Object name; when specified, this parameter is used
4380         #         for result publication in the study. Otherwise, if automatic
4381         #         publication is switched on, default value is used for result name.
4382         #
4383         #  @return New GEOM.GEOM_Object, containing the created compound.
4384         #
4385         #  @ref tui_creation_compound "Example"
4386         def MakeCompound(self, theShapes, theName=None):
4387             """
4388             Create a compound of the given shapes.
4389
4390             Parameters:
4391                 theShapes List of shapes to put in compound.
4392                 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             Returns:
4397                 New GEOM.GEOM_Object, containing the created compound.
4398             """
4399             # Example: see GEOM_TestAll.py
4400             self.ShapesOp.StartOperation()
4401             anObj = self.ShapesOp.MakeCompound(theShapes)
4402             RaiseIfFailed("MakeCompound", self.ShapesOp)
4403             self._autoPublish(anObj, theName, "compound")
4404             return anObj
4405
4406         # end of l3_advanced
4407         ## @}
4408
4409         ## @addtogroup l2_measure
4410         ## @{
4411
4412         ## Gives quantity of faces in the given shape.
4413         #  @param theShape Shape to count faces of.
4414         #  @return Quantity of faces.
4415         #
4416         #  @ref swig_NumberOf "Example"
4417         def NumberOfFaces(self, theShape):
4418             """
4419             Gives quantity of faces in the given shape.
4420
4421             Parameters:
4422                 theShape Shape to count faces of.
4423
4424             Returns:    
4425                 Quantity of faces.
4426             """
4427             # Example: see GEOM_TestOthers.py
4428             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4429             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4430             return nb_faces
4431
4432         ## Gives quantity of edges in the given shape.
4433         #  @param theShape Shape to count edges of.
4434         #  @return Quantity of edges.
4435         #
4436         #  @ref swig_NumberOf "Example"
4437         def NumberOfEdges(self, theShape):
4438             """
4439             Gives quantity of edges in the given shape.
4440
4441             Parameters:
4442                 theShape Shape to count edges of.
4443
4444             Returns:    
4445                 Quantity of edges.
4446             """
4447             # Example: see GEOM_TestOthers.py
4448             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4449             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4450             return nb_edges
4451
4452         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4453         #  @param theShape Shape to count sub-shapes of.
4454         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4455         #  @return Quantity of sub-shapes of given type.
4456         #
4457         #  @ref swig_NumberOf "Example"
4458         def NumberOfSubShapes(self, theShape, theShapeType):
4459             """
4460             Gives quantity of sub-shapes of type theShapeType in the given shape.
4461
4462             Parameters:
4463                 theShape Shape to count sub-shapes of.
4464                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4465
4466             Returns:
4467                 Quantity of sub-shapes of given type.
4468             """
4469             # Example: see GEOM_TestOthers.py
4470             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4471             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4472             return nb_ss
4473
4474         ## Gives quantity of solids in the given shape.
4475         #  @param theShape Shape to count solids in.
4476         #  @return Quantity of solids.
4477         #
4478         #  @ref swig_NumberOf "Example"
4479         def NumberOfSolids(self, theShape):
4480             """
4481             Gives quantity of solids in the given shape.
4482
4483             Parameters:
4484                 theShape Shape to count solids in.
4485
4486             Returns:
4487                 Quantity of solids.
4488             """
4489             # Example: see GEOM_TestOthers.py
4490             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4491             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4492             return nb_solids
4493
4494         # end of l2_measure
4495         ## @}
4496
4497         ## @addtogroup l3_healing
4498         ## @{
4499
4500         ## Reverses an orientation the given shape.
4501         #  @param theShape Shape to be reversed.
4502         #  @param theName Object name; when specified, this parameter is used
4503         #         for result publication in the study. Otherwise, if automatic
4504         #         publication is switched on, default value is used for result name.
4505         #
4506         #  @return The reversed copy of theShape.
4507         #
4508         #  @ref swig_ChangeOrientation "Example"
4509         def ChangeOrientation(self, theShape, theName=None):
4510             """
4511             Reverses an orientation the given shape.
4512
4513             Parameters:
4514                 theShape Shape to be reversed.
4515                 theName Object name; when specified, this parameter is used
4516                         for result publication in the study. Otherwise, if automatic
4517                         publication is switched on, default value is used for result name.
4518
4519             Returns:   
4520                 The reversed copy of theShape.
4521             """
4522             # Example: see GEOM_TestAll.py
4523             anObj = self.ShapesOp.ChangeOrientation(theShape)
4524             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4525             self._autoPublish(anObj, theName, "reversed")
4526             return anObj
4527
4528         ## See ChangeOrientation() method for details.
4529         #
4530         #  @ref swig_OrientationChange "Example"
4531         def OrientationChange(self, theShape, theName=None):
4532             """
4533             See geompy.ChangeOrientation method for details.
4534             """
4535             # Example: see GEOM_TestOthers.py
4536             # note: auto-publishing is done in self.ChangeOrientation()
4537             anObj = self.ChangeOrientation(theShape, theName)
4538             return anObj
4539
4540         # end of l3_healing
4541         ## @}
4542
4543         ## @addtogroup l4_obtain
4544         ## @{
4545
4546         ## Retrieve all free faces from the given shape.
4547         #  Free face is a face, which is not shared between two shells of the shape.
4548         #  @param theShape Shape to find free faces in.
4549         #  @return List of IDs of all free faces, contained in theShape.
4550         #
4551         #  @ref tui_measurement_tools_page "Example"
4552         def GetFreeFacesIDs(self,theShape):
4553             """
4554             Retrieve all free faces from the given shape.
4555             Free face is a face, which is not shared between two shells of the shape.
4556
4557             Parameters:
4558                 theShape Shape to find free faces in.
4559
4560             Returns:
4561                 List of IDs of all free faces, contained in theShape.
4562             """
4563             # Example: see GEOM_TestOthers.py
4564             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4565             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4566             return anIDs
4567
4568         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4569         #  @param theShape1 Shape to find sub-shapes in.
4570         #  @param theShape2 Shape to find shared sub-shapes with.
4571         #  @param theShapeType Type of sub-shapes to be retrieved.
4572         #  @param 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         #  @return List of sub-shapes of theShape1, shared with theShape2.
4577         #
4578         #  @ref swig_GetSharedShapes "Example"
4579         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4580             """
4581             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4582
4583             Parameters:
4584                 theShape1 Shape to find sub-shapes in.
4585                 theShape2 Shape to find shared sub-shapes with.
4586                 theShapeType Type of sub-shapes to be retrieved.
4587                 theName Object name; when specified, this parameter is used
4588                         for result publication in the study. Otherwise, if automatic
4589                         publication is switched on, default value is used for result name.
4590
4591             Returns:
4592                 List of sub-shapes of theShape1, shared with theShape2.
4593             """
4594             # Example: see GEOM_TestOthers.py
4595             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4596             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4597             self._autoPublish(aList, theName, "shared")
4598             return aList
4599
4600         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4601         #  @param theShapes Shapes to find common sub-shapes of.
4602         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4603         #  @param theName Object name; when specified, this parameter is used
4604         #         for result publication in the study. Otherwise, if automatic
4605         #         publication is switched on, default value is used for result name.
4606         #
4607         #  @return List of objects, that are sub-shapes of all given shapes.
4608         #
4609         #  @ref swig_GetSharedShapes "Example"
4610         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4611             """
4612             Get all sub-shapes, shared by all shapes in the list theShapes.
4613
4614             Parameters:
4615                 theShapes Shapes to find common sub-shapes of.
4616                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4617                 theName Object name; when specified, this parameter is used
4618                         for result publication in the study. Otherwise, if automatic
4619                         publication is switched on, default value is used for result name.
4620
4621             Returns:    
4622                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4623             """
4624             # Example: see GEOM_TestOthers.py
4625             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4626             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4627             self._autoPublish(aList, theName, "shared")
4628             return aList
4629
4630         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4631         #  situated relatively the specified plane by the certain way,
4632         #  defined through <VAR>theState</VAR> parameter.
4633         #  @param theShape Shape to find sub-shapes of.
4634         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4635         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4636         #                direction and location of the plane to find shapes on.
4637         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4638         #  @param theName Object name; when specified, this parameter is used
4639         #         for result publication in the study. Otherwise, if automatic
4640         #         publication is switched on, default value is used for result name.
4641         #
4642         #  @return List of all found sub-shapes.
4643         #
4644         #  @ref swig_GetShapesOnPlane "Example"
4645         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4646             """
4647             Find in theShape all sub-shapes of type theShapeType,
4648             situated relatively the specified plane by the certain way,
4649             defined through theState parameter.
4650
4651             Parameters:
4652                 theShape Shape to find sub-shapes of.
4653                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4654                 theAx1 Vector (or line, or linear edge), specifying normal
4655                        direction and location of the plane to find shapes on.
4656                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4657                 theName Object name; when specified, this parameter is used
4658                         for result publication in the study. Otherwise, if automatic
4659                         publication is switched on, default value is used for result name.
4660
4661             Returns:
4662                 List of all found sub-shapes.
4663             """
4664             # Example: see GEOM_TestOthers.py
4665             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4666             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4667             self._autoPublish(aList, theName, "shapeOnPlane")
4668             return aList
4669
4670         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4671         #  situated relatively the specified plane by the certain way,
4672         #  defined through <VAR>theState</VAR> parameter.
4673         #  @param theShape Shape to find sub-shapes of.
4674         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4675         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4676         #                direction and location of the plane to find shapes on.
4677         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4678         #
4679         #  @return List of all found sub-shapes indices.
4680         #
4681         #  @ref swig_GetShapesOnPlaneIDs "Example"
4682         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4683             """
4684             Find in theShape all sub-shapes of type theShapeType,
4685             situated relatively the specified plane by the certain way,
4686             defined through theState parameter.
4687
4688             Parameters:
4689                 theShape Shape to find sub-shapes of.
4690                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4691                 theAx1 Vector (or line, or linear edge), specifying normal
4692                        direction and location of the plane to find shapes on.
4693                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4694
4695             Returns:
4696                 List of all found sub-shapes indices.
4697             """
4698             # Example: see GEOM_TestOthers.py
4699             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4700             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4701             return aList
4702
4703         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4704         #  situated relatively the specified plane by the certain way,
4705         #  defined through <VAR>theState</VAR> parameter.
4706         #  @param theShape Shape to find sub-shapes of.
4707         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4708         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4709         #                direction of the plane to find shapes on.
4710         #  @param thePnt Point specifying location of the plane to find shapes on.
4711         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4712         #  @param theName Object name; when specified, this parameter is used
4713         #         for result publication in the study. Otherwise, if automatic
4714         #         publication is switched on, default value is used for result name.
4715         #
4716         #  @return List of all found sub-shapes.
4717         #
4718         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4719         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4720             """
4721             Find in theShape all sub-shapes of type theShapeType,
4722             situated relatively the specified plane by the certain way,
4723             defined through theState parameter.
4724
4725             Parameters:
4726                 theShape Shape to find sub-shapes of.
4727                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4728                 theAx1 Vector (or line, or linear edge), specifying normal
4729                        direction and location of the plane to find shapes on.
4730                 thePnt Point specifying location of the plane to find shapes on.
4731                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4732                 theName Object name; when specified, this parameter is used
4733                         for result publication in the study. Otherwise, if automatic
4734                         publication is switched on, default value is used for result name.
4735
4736             Returns:
4737                 List of all found sub-shapes.
4738             """
4739             # Example: see GEOM_TestOthers.py
4740             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4741                                                                theAx1, thePnt, theState)
4742             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4743             self._autoPublish(aList, theName, "shapeOnPlane")
4744             return aList
4745
4746         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4747         #  situated relatively the specified plane by the certain way,
4748         #  defined through <VAR>theState</VAR> parameter.
4749         #  @param theShape Shape to find sub-shapes of.
4750         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4751         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4752         #                direction of the plane to find shapes on.
4753         #  @param thePnt Point specifying location of the plane to find shapes on.
4754         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4755         #
4756         #  @return List of all found sub-shapes indices.
4757         #
4758         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4759         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4760             """
4761             Find in theShape all sub-shapes of type theShapeType,
4762             situated relatively the specified plane by the certain way,
4763             defined through theState parameter.
4764
4765             Parameters:
4766                 theShape Shape to find sub-shapes of.
4767                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4768                 theAx1 Vector (or line, or linear edge), specifying normal
4769                        direction and location of the plane to find shapes on.
4770                 thePnt Point specifying location of the plane to find shapes on.
4771                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4772
4773             Returns:
4774                 List of all found sub-shapes indices.
4775             """
4776             # Example: see GEOM_TestOthers.py
4777             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4778                                                                   theAx1, thePnt, theState)
4779             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4780             return aList
4781
4782         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4783         #  the specified cylinder by the certain way, defined through \a theState parameter.
4784         #  @param theShape Shape to find sub-shapes of.
4785         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4786         #  @param theAxis Vector (or line, or linear edge), specifying
4787         #                 axis of the cylinder to find shapes on.
4788         #  @param theRadius Radius of the cylinder to find shapes on.
4789         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4790         #  @param theName Object name; when specified, this parameter is used
4791         #         for result publication in the study. Otherwise, if automatic
4792         #         publication is switched on, default value is used for result name.
4793         #
4794         #  @return List of all found sub-shapes.
4795         #
4796         #  @ref swig_GetShapesOnCylinder "Example"
4797         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
4798             """
4799             Find in theShape all sub-shapes of type theShapeType, situated relatively
4800             the specified cylinder by the certain way, defined through theState parameter.
4801
4802             Parameters:
4803                 theShape Shape to find sub-shapes of.
4804                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4805                 theAxis Vector (or line, or linear edge), specifying
4806                         axis of the cylinder to find shapes on.
4807                 theRadius Radius of the cylinder to find shapes on.
4808                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4809                 theName Object name; when specified, this parameter is used
4810                         for result publication in the study. Otherwise, if automatic
4811                         publication is switched on, default value is used for result name.
4812
4813             Returns:
4814                 List of all found sub-shapes.
4815             """
4816             # Example: see GEOM_TestOthers.py
4817             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
4818             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
4819             self._autoPublish(aList, theName, "shapeOnCylinder")
4820             return aList
4821
4822         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4823         #  the specified cylinder by the certain way, defined through \a theState parameter.
4824         #  @param theShape Shape to find sub-shapes of.
4825         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4826         #  @param theAxis Vector (or line, or linear edge), specifying
4827         #                 axis of the cylinder to find shapes on.
4828         #  @param theRadius Radius of the cylinder to find shapes on.
4829         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4830         #
4831         #  @return List of all found sub-shapes indices.
4832         #
4833         #  @ref swig_GetShapesOnCylinderIDs "Example"
4834         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
4835             """
4836             Find in theShape all sub-shapes of type theShapeType, situated relatively
4837             the specified cylinder by the certain way, defined through theState parameter.
4838
4839             Parameters:
4840                 theShape Shape to find sub-shapes of.
4841                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4842                 theAxis Vector (or line, or linear edge), specifying
4843                         axis of the cylinder to find shapes on.
4844                 theRadius Radius of the cylinder to find shapes on.
4845                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4846
4847             Returns:
4848                 List of all found sub-shapes indices.
4849             """
4850             # Example: see GEOM_TestOthers.py
4851             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
4852             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
4853             return aList
4854
4855         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4856         #  the specified cylinder by the certain way, defined through \a theState parameter.
4857         #  @param theShape Shape to find sub-shapes of.
4858         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4859         #  @param theAxis Vector (or line, or linear edge), specifying
4860         #                 axis of the cylinder to find shapes on.
4861         #  @param thePnt Point specifying location of the bottom of the cylinder.
4862         #  @param theRadius Radius of the cylinder to find shapes on.
4863         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4864         #  @param theName Object name; when specified, this parameter is used
4865         #         for result publication in the study. Otherwise, if automatic
4866         #         publication is switched on, default value is used for result name.
4867         #
4868         #  @return List of all found sub-shapes.
4869         #
4870         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
4871         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
4872             """
4873             Find in theShape all sub-shapes of type theShapeType, situated relatively
4874             the specified cylinder by the certain way, defined through theState parameter.
4875
4876             Parameters:
4877                 theShape Shape to find sub-shapes of.
4878                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4879                 theAxis Vector (or line, or linear edge), specifying
4880                         axis of the cylinder to find shapes on.
4881                 theRadius Radius of the cylinder to find shapes on.
4882                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4883                 theName Object name; when specified, this parameter is used
4884                         for result publication in the study. Otherwise, if automatic
4885                         publication is switched on, default value is used for result name.
4886
4887             Returns:
4888                 List of all found sub-shapes.
4889             """
4890             # Example: see GEOM_TestOthers.py
4891             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4892             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
4893             self._autoPublish(aList, theName, "shapeOnCylinder")
4894             return aList
4895
4896         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4897         #  the specified cylinder by the certain way, defined through \a theState parameter.
4898         #  @param theShape Shape to find sub-shapes of.
4899         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4900         #  @param theAxis Vector (or line, or linear edge), specifying
4901         #                 axis of the cylinder to find shapes on.
4902         #  @param thePnt Point specifying location of the bottom of the cylinder.
4903         #  @param theRadius Radius of the cylinder to find shapes on.
4904         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4905         #
4906         #  @return List of all found sub-shapes indices
4907         #
4908         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
4909         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
4910             """
4911             Find in theShape all sub-shapes of type theShapeType, situated relatively
4912             the specified cylinder by the certain way, defined through theState parameter.
4913
4914             Parameters:
4915                 theShape Shape to find sub-shapes of.
4916                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4917                 theAxis Vector (or line, or linear edge), specifying
4918                         axis of the cylinder to find shapes on.
4919                 theRadius Radius of the cylinder to find shapes on.
4920                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4921
4922             Returns:
4923                 List of all found sub-shapes indices.            
4924             """
4925             # Example: see GEOM_TestOthers.py
4926             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4927             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
4928             return aList
4929
4930         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4931         #  the specified sphere by the certain way, defined through \a theState parameter.
4932         #  @param theShape Shape to find sub-shapes of.
4933         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4934         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4935         #  @param theRadius Radius of the sphere to find shapes on.
4936         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4937         #  @param theName Object name; when specified, this parameter is used
4938         #         for result publication in the study. Otherwise, if automatic
4939         #         publication is switched on, default value is used for result name.
4940         #
4941         #  @return List of all found sub-shapes.
4942         #
4943         #  @ref swig_GetShapesOnSphere "Example"
4944         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
4945             """
4946             Find in theShape all sub-shapes of type theShapeType, situated relatively
4947             the specified sphere by the certain way, defined through theState parameter.
4948
4949             Parameters:
4950                 theShape Shape to find sub-shapes of.
4951                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4952                 theCenter Point, specifying center of the sphere to find shapes on.
4953                 theRadius Radius of the sphere to find shapes on.
4954                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4955                 theName Object name; when specified, this parameter is used
4956                         for result publication in the study. Otherwise, if automatic
4957                         publication is switched on, default value is used for result name.
4958
4959             Returns:
4960                 List of all found sub-shapes.
4961             """
4962             # Example: see GEOM_TestOthers.py
4963             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
4964             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
4965             self._autoPublish(aList, theName, "shapeOnSphere")
4966             return aList
4967
4968         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4969         #  the specified sphere by the certain way, defined through \a theState parameter.
4970         #  @param theShape Shape to find sub-shapes of.
4971         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4972         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4973         #  @param theRadius Radius of the sphere to find shapes on.
4974         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4975         #
4976         #  @return List of all found sub-shapes indices.
4977         #
4978         #  @ref swig_GetShapesOnSphereIDs "Example"
4979         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
4980             """
4981             Find in theShape all sub-shapes of type theShapeType, situated relatively
4982             the specified sphere by the certain way, defined through theState parameter.
4983
4984             Parameters:
4985                 theShape Shape to find sub-shapes of.
4986                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4987                 theCenter Point, specifying center of the sphere to find shapes on.
4988                 theRadius Radius of the sphere to find shapes on.
4989                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4990
4991             Returns:
4992                 List of all found sub-shapes indices.
4993             """
4994             # Example: see GEOM_TestOthers.py
4995             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
4996             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
4997             return aList
4998
4999         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5000         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5001         #  @param theShape Shape to find sub-shapes of.
5002         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5003         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5004         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5005         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5006         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5007         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5008         #  @param theName Object name; when specified, this parameter is used
5009         #         for result publication in the study. Otherwise, if automatic
5010         #         publication is switched on, default value is used for result name.
5011         #
5012         #  @return List of all found sub-shapes.
5013         #
5014         #  @ref swig_GetShapesOnQuadrangle "Example"
5015         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5016                                   theTopLeftPoint, theTopRigthPoint,
5017                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
5018             """
5019             Find in theShape all sub-shapes of type theShapeType, situated relatively
5020             the specified quadrangle by the certain way, defined through theState parameter.
5021
5022             Parameters:
5023                 theShape Shape to find sub-shapes of.
5024                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5025                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5026                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5027                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5028                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5029                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5030                 theName Object name; when specified, this parameter is used
5031                         for result publication in the study. Otherwise, if automatic
5032                         publication is switched on, default value is used for result name.
5033
5034             Returns:
5035                 List of all found sub-shapes.
5036             """
5037             # Example: see GEOM_TestOthers.py
5038             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5039                                                         theTopLeftPoint, theTopRigthPoint,
5040                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
5041             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5042             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5043             return aList
5044
5045         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5046         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5047         #  @param theShape Shape to find sub-shapes of.
5048         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5049         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5050         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5051         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5052         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5053         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5054         #
5055         #  @return List of all found sub-shapes indices.
5056         #
5057         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5058         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5059                                      theTopLeftPoint, theTopRigthPoint,
5060                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5061             """
5062             Find in theShape all sub-shapes of type theShapeType, situated relatively
5063             the specified quadrangle by the certain way, defined through theState parameter.
5064
5065             Parameters:
5066                 theShape Shape to find sub-shapes of.
5067                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5068                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5069                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5070                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5071                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5072                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5073
5074             Returns:
5075                 List of all found sub-shapes indices.
5076             """
5077
5078             # Example: see GEOM_TestOthers.py
5079             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5080                                                            theTopLeftPoint, theTopRigthPoint,
5081                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5082             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5083             return aList
5084
5085         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5086         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5087         #  @param theBox Shape for relative comparing.
5088         #  @param theShape Shape to find sub-shapes of.
5089         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5090         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5091         #  @param theName Object name; when specified, this parameter is used
5092         #         for result publication in the study. Otherwise, if automatic
5093         #         publication is switched on, default value is used for result name.
5094         #
5095         #  @return List of all found sub-shapes.
5096         #
5097         #  @ref swig_GetShapesOnBox "Example"
5098         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5099             """
5100             Find in theShape all sub-shapes of type theShapeType, situated relatively
5101             the specified theBox by the certain way, defined through theState parameter.
5102
5103             Parameters:
5104                 theBox Shape for relative comparing.
5105                 theShape Shape to find sub-shapes of.
5106                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5107                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5108                 theName Object name; when specified, this parameter is used
5109                         for result publication in the study. Otherwise, if automatic
5110                         publication is switched on, default value is used for result name.
5111
5112             Returns:
5113                 List of all found sub-shapes.
5114             """
5115             # Example: see GEOM_TestOthers.py
5116             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5117             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5118             self._autoPublish(aList, theName, "shapeOnBox")
5119             return aList
5120
5121         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5122         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5123         #  @param theBox Shape for relative comparing.
5124         #  @param theShape Shape to find sub-shapes of.
5125         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5126         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5127         #
5128         #  @return List of all found sub-shapes indices.
5129         #
5130         #  @ref swig_GetShapesOnBoxIDs "Example"
5131         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5132             """
5133             Find in theShape all sub-shapes of type theShapeType, situated relatively
5134             the specified theBox by the certain way, defined through theState parameter.
5135
5136             Parameters:
5137                 theBox Shape for relative comparing.
5138                 theShape Shape to find sub-shapes of.
5139                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5140                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5141
5142             Returns:
5143                 List of all found sub-shapes indices.
5144             """
5145             # Example: see GEOM_TestOthers.py
5146             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5147             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5148             return aList
5149
5150         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5151         #  situated relatively the specified \a theCheckShape by the
5152         #  certain way, defined through \a theState parameter.
5153         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5154         #  @param theShape Shape to find sub-shapes of.
5155         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
5156         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5157         #  @param theName Object name; when specified, this parameter is used
5158         #         for result publication in the study. Otherwise, if automatic
5159         #         publication is switched on, default value is used for result name.
5160         #
5161         #  @return List of all found sub-shapes.
5162         #
5163         #  @ref swig_GetShapesOnShape "Example"
5164         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5165             """
5166             Find in theShape all sub-shapes of type theShapeType,
5167             situated relatively the specified theCheckShape by the
5168             certain way, defined through theState parameter.
5169
5170             Parameters:
5171                 theCheckShape Shape for relative comparing. It must be a solid.
5172                 theShape Shape to find sub-shapes of.
5173                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5174                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5175                 theName Object name; when specified, this parameter is used
5176                         for result publication in the study. Otherwise, if automatic
5177                         publication is switched on, default value is used for result name.
5178
5179             Returns:
5180                 List of all found sub-shapes.
5181             """
5182             # Example: see GEOM_TestOthers.py
5183             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5184                                                    theShapeType, theState)
5185             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5186             self._autoPublish(aList, theName, "shapeOnShape")
5187             return aList
5188
5189         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5190         #  situated relatively the specified \a theCheckShape by the
5191         #  certain way, defined through \a theState parameter.
5192         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5193         #  @param theShape Shape to find sub-shapes of.
5194         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5195         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5196         #  @param theName Object name; when specified, this parameter is used
5197         #         for result publication in the study. Otherwise, if automatic
5198         #         publication is switched on, default value is used for result name.
5199         #
5200         #  @return All found sub-shapes as compound.
5201         #
5202         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5203         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5204             """
5205             Find in theShape all sub-shapes of type theShapeType,
5206             situated relatively the specified theCheckShape by the
5207             certain way, defined through theState parameter.
5208
5209             Parameters:
5210                 theCheckShape Shape for relative comparing. It must be a solid.
5211                 theShape Shape to find sub-shapes of.
5212                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5213                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5214                 theName Object name; when specified, this parameter is used
5215                         for result publication in the study. Otherwise, if automatic
5216                         publication is switched on, default value is used for result name.
5217
5218             Returns:
5219                 All found sub-shapes as compound.
5220             """
5221             # Example: see GEOM_TestOthers.py
5222             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5223                                                              theShapeType, theState)
5224             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5225             self._autoPublish(anObj, theName, "shapeOnShape")
5226             return anObj
5227
5228         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5229         #  situated relatively the specified \a theCheckShape by the
5230         #  certain way, defined through \a theState parameter.
5231         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5232         #  @param theShape Shape to find sub-shapes of.
5233         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5234         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5235         #
5236         #  @return List of all found sub-shapes indices.
5237         #
5238         #  @ref swig_GetShapesOnShapeIDs "Example"
5239         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5240             """
5241             Find in theShape all sub-shapes of type theShapeType,
5242             situated relatively the specified theCheckShape by the
5243             certain way, defined through theState parameter.
5244
5245             Parameters:
5246                 theCheckShape Shape for relative comparing. It must be a solid.
5247                 theShape Shape to find sub-shapes of.
5248                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5249                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5250
5251             Returns:
5252                 List of all found sub-shapes indices.
5253             """
5254             # Example: see GEOM_TestOthers.py
5255             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5256                                                       theShapeType, theState)
5257             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5258             return aList
5259
5260         ## Get sub-shape(s) of theShapeWhere, which are
5261         #  coincident with \a theShapeWhat or could be a part of it.
5262         #  @param theShapeWhere Shape to find sub-shapes of.
5263         #  @param theShapeWhat Shape, specifying what to find.
5264         #  @param isNewImplementation implementation of GetInPlace functionality
5265         #             (default = False, old alghorithm based on shape properties)
5266         #  @param theName Object name; when specified, this parameter is used
5267         #         for result publication in the study. Otherwise, if automatic
5268         #         publication is switched on, default value is used for result name.
5269         #
5270         #  @return Group of all found sub-shapes or a single found sub-shape.
5271         #
5272         #  @note This function has a restriction on argument shapes.
5273         #        If \a theShapeWhere has curved parts with significantly
5274         #        outstanding centres (i.e. the mass centre of a part is closer to
5275         #        \a theShapeWhat than to the part), such parts will not be found.
5276         #        @image html get_in_place_lost_part.png
5277         #
5278         #  @ref swig_GetInPlace "Example"
5279         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5280             """
5281             Get sub-shape(s) of theShapeWhere, which are
5282             coincident with  theShapeWhat or could be a part of it.
5283
5284             Parameters:
5285                 theShapeWhere Shape to find sub-shapes of.
5286                 theShapeWhat Shape, specifying what to find.
5287                 isNewImplementation Implementation of GetInPlace functionality
5288                                     (default = False, old alghorithm based on shape properties)
5289                 theName Object name; when specified, this parameter is used
5290                         for result publication in the study. Otherwise, if automatic
5291                         publication is switched on, default value is used for result name.
5292
5293             Returns:
5294                 Group of all found sub-shapes or a single found sub-shape.
5295
5296                 
5297             Note:
5298                 This function has a restriction on argument shapes.
5299                 If theShapeWhere has curved parts with significantly
5300                 outstanding centres (i.e. the mass centre of a part is closer to
5301                 theShapeWhat than to the part), such parts will not be found.
5302             """
5303             # Example: see GEOM_TestOthers.py
5304             anObj = None
5305             if isNewImplementation:
5306                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5307             else:
5308                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5309                 pass
5310             RaiseIfFailed("GetInPlace", self.ShapesOp)
5311             self._autoPublish(anObj, theName, "inplace")
5312             return anObj
5313
5314         ## Get sub-shape(s) of \a theShapeWhere, which are
5315         #  coincident with \a theShapeWhat or could be a part of it.
5316         #
5317         #  Implementation of this method is based on a saved history of an operation,
5318         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5319         #  arguments (an argument shape or a sub-shape of an argument shape).
5320         #  The operation could be the Partition or one of boolean operations,
5321         #  performed on simple shapes (not on compounds).
5322         #
5323         #  @param theShapeWhere Shape to find sub-shapes of.
5324         #  @param theShapeWhat Shape, specifying what to find (must be in the
5325         #                      building history of the ShapeWhere).
5326         #  @param theName Object name; when specified, this parameter is used
5327         #         for result publication in the study. Otherwise, if automatic
5328         #         publication is switched on, default value is used for result name.
5329         #
5330         #  @return Group of all found sub-shapes or a single found sub-shape.
5331         #
5332         #  @ref swig_GetInPlace "Example"
5333         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5334             """
5335             Implementation of this method is based on a saved history of an operation,
5336             produced theShapeWhere. The theShapeWhat must be among this operation's
5337             arguments (an argument shape or a sub-shape of an argument shape).
5338             The operation could be the Partition or one of boolean operations,
5339             performed on simple shapes (not on compounds).
5340
5341             Parameters:
5342                 theShapeWhere Shape to find sub-shapes of.
5343                 theShapeWhat Shape, specifying what to find (must be in the
5344                                 building history of the ShapeWhere).
5345                 theName Object name; when specified, this parameter is used
5346                         for result publication in the study. Otherwise, if automatic
5347                         publication is switched on, default value is used for result name.
5348
5349             Returns:
5350                 Group of all found sub-shapes or a single found sub-shape.
5351             """
5352             # Example: see GEOM_TestOthers.py
5353             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5354             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5355             self._autoPublish(anObj, theName, "inplace")
5356             return anObj
5357
5358         ## Get sub-shape of theShapeWhere, which is
5359         #  equal to \a theShapeWhat.
5360         #  @param theShapeWhere Shape to find sub-shape of.
5361         #  @param theShapeWhat Shape, specifying what to find.
5362         #  @param theName Object name; when specified, this parameter is used
5363         #         for result publication in the study. Otherwise, if automatic
5364         #         publication is switched on, default value is used for result name.
5365         #
5366         #  @return New GEOM.GEOM_Object for found sub-shape.
5367         #
5368         #  @ref swig_GetSame "Example"
5369         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5370             """
5371             Get sub-shape of theShapeWhere, which is
5372             equal to theShapeWhat.
5373
5374             Parameters:
5375                 theShapeWhere Shape to find sub-shape of.
5376                 theShapeWhat Shape, specifying what to find.
5377                 theName Object name; when specified, this parameter is used
5378                         for result publication in the study. Otherwise, if automatic
5379                         publication is switched on, default value is used for result name.
5380
5381             Returns:
5382                 New GEOM.GEOM_Object for found sub-shape.
5383             """
5384             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5385             RaiseIfFailed("GetSame", self.ShapesOp)
5386             self._autoPublish(anObj, theName, "sameShape")
5387             return anObj
5388
5389
5390         ## Get sub-shape indices of theShapeWhere, which is
5391         #  equal to \a theShapeWhat.
5392         #  @param theShapeWhere Shape to find sub-shape of.
5393         #  @param theShapeWhat Shape, specifying what to find.
5394         #  @return List of all found sub-shapes indices. 
5395         #
5396         #  @ref swig_GetSame "Example"
5397         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5398             """
5399             Get sub-shape indices of theShapeWhere, which is
5400             equal to theShapeWhat.
5401
5402             Parameters:
5403                 theShapeWhere Shape to find sub-shape of.
5404                 theShapeWhat Shape, specifying what to find.
5405
5406             Returns:
5407                 List of all found sub-shapes indices.
5408             """
5409             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5410             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5411             return anObj
5412
5413
5414         # end of l4_obtain
5415         ## @}
5416
5417         ## @addtogroup l4_access
5418         ## @{
5419
5420         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5421         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5422         #  @param aShape Shape to get sub-shape of.
5423         #  @param ListOfID List of sub-shapes indices.
5424         #  @param theName Object name; when specified, this parameter is used
5425         #         for result publication in the study. Otherwise, if automatic
5426         #         publication is switched on, default value is used for result name.
5427         #
5428         #  @return Found sub-shape.
5429         #
5430         #  @ref swig_all_decompose "Example"
5431         def GetSubShape(self, aShape, ListOfID, theName=None):
5432             """
5433             Obtain a composite sub-shape of aShape, composed from sub-shapes
5434             of aShape, selected by their unique IDs inside aShape
5435
5436             Parameters:
5437                 aShape Shape to get sub-shape of.
5438                 ListOfID List of sub-shapes indices.
5439                 theName Object name; when specified, this parameter is used
5440                         for result publication in the study. Otherwise, if automatic
5441                         publication is switched on, default value is used for result name.
5442
5443             Returns:
5444                 Found sub-shape.
5445             """
5446             # Example: see GEOM_TestAll.py
5447             anObj = self.AddSubShape(aShape,ListOfID)
5448             self._autoPublish(anObj, theName, "subshape")
5449             return anObj
5450
5451         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5452         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5453         #  @param aShape Shape to get sub-shape of.
5454         #  @param aSubShape Sub-shapes of aShape.
5455         #  @return ID of found sub-shape.
5456         #
5457         #  @ref swig_all_decompose "Example"
5458         def GetSubShapeID(self, aShape, aSubShape):
5459             """
5460             Obtain unique ID of sub-shape aSubShape inside aShape
5461             of aShape, selected by their unique IDs inside aShape
5462
5463             Parameters:
5464                aShape Shape to get sub-shape of.
5465                aSubShape Sub-shapes of aShape.
5466
5467             Returns:
5468                ID of found sub-shape.
5469             """
5470             # Example: see GEOM_TestAll.py
5471             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5472             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5473             return anID
5474             
5475         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5476         #  This function is provided for performance purpose. The complexity is O(n) with n
5477         #  the number of subobjects of aShape
5478         #  @param aShape Shape to get sub-shape of.
5479         #  @param aSubShapes Sub-shapes of aShape.
5480         #  @return list of IDs of found sub-shapes.
5481         #
5482         #  @ref swig_all_decompose "Example"
5483         def GetSubShapesIDs(self, aShape, aSubShapes):
5484             """
5485             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5486             This function is provided for performance purpose. The complexity is O(n) with n
5487             the number of subobjects of aShape
5488
5489             Parameters:
5490                aShape Shape to get sub-shape of.
5491                aSubShapes Sub-shapes of aShape.
5492
5493             Returns:
5494                List of IDs of found sub-shape.
5495             """
5496             # Example: see GEOM_TestAll.py
5497             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5498             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5499             return anIDs
5500
5501         # end of l4_access
5502         ## @}
5503
5504         ## @addtogroup l4_decompose
5505         ## @{
5506
5507         ## Get all sub-shapes and groups of \a theShape,
5508         #  that were created already by any other methods.
5509         #  @param theShape Any shape.
5510         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5511         #                       returned, else all found sub-shapes and groups.
5512         #  @return List of existing sub-objects of \a theShape.
5513         #
5514         #  @ref swig_all_decompose "Example"
5515         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5516             """
5517             Get all sub-shapes and groups of theShape,
5518             that were created already by any other methods.
5519
5520             Parameters:
5521                 theShape Any shape.
5522                 theGroupsOnly If this parameter is TRUE, only groups will be
5523                                  returned, else all found sub-shapes and groups.
5524
5525             Returns:
5526                 List of existing sub-objects of theShape.
5527             """
5528             # Example: see GEOM_TestAll.py
5529             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5530             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5531             return ListObj
5532
5533         ## Get all groups of \a theShape,
5534         #  that were created already by any other methods.
5535         #  @param theShape Any shape.
5536         #  @return List of existing groups of \a theShape.
5537         #
5538         #  @ref swig_all_decompose "Example"
5539         def GetGroups(self, theShape):
5540             """
5541             Get all groups of theShape,
5542             that were created already by any other methods.
5543
5544             Parameters:
5545                 theShape Any shape.
5546
5547             Returns:
5548                 List of existing groups of theShape.
5549             """
5550             # Example: see GEOM_TestAll.py
5551             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5552             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5553             return ListObj
5554
5555         ## Explode a shape on sub-shapes of a given type.
5556         #  If the shape itself matches the type, it is also returned.
5557         #  @param aShape Shape to be exploded.
5558         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
5559         #  @param theName Object name; when specified, this parameter is used
5560         #         for result publication in the study. Otherwise, if automatic
5561         #         publication is switched on, default value is used for result name.
5562         #
5563         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5564         #
5565         #  @ref swig_all_decompose "Example"
5566         def SubShapeAll(self, aShape, aType, theName=None):
5567             """
5568             Explode a shape on sub-shapes of a given type.
5569             If the shape itself matches the type, it is also returned.
5570
5571             Parameters:
5572                 aShape Shape to be exploded.
5573                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
5574                 theName Object name; when specified, this parameter is used
5575                         for result publication in the study. Otherwise, if automatic
5576                         publication is switched on, default value is used for result name.
5577
5578             Returns:
5579                 List of sub-shapes of type theShapeType, contained in theShape.
5580             """
5581             # Example: see GEOM_TestAll.py
5582             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5583             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5584             self._autoPublish(ListObj, theName, "subshape")
5585             return ListObj
5586
5587         ## Explode a shape on sub-shapes of a given type.
5588         #  @param aShape Shape to be exploded.
5589         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5590         #  @return List of IDs of sub-shapes.
5591         #
5592         #  @ref swig_all_decompose "Example"
5593         def SubShapeAllIDs(self, aShape, aType):
5594             """
5595             Explode a shape on sub-shapes of a given type.
5596
5597             Parameters:
5598                 aShape Shape to be exploded (see geompy.ShapeType)
5599                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5600
5601             Returns:
5602                 List of IDs of sub-shapes.
5603             """
5604             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5605             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5606             return ListObj
5607
5608         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5609         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
5610         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5611         #  @param aShape Shape to get sub-shape of.
5612         #  @param ListOfInd List of sub-shapes indices.
5613         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5614         #  @param theName Object name; when specified, this parameter is used
5615         #         for result publication in the study. Otherwise, if automatic
5616         #         publication is switched on, default value is used for result name.
5617         #
5618         #  @return A compound of sub-shapes of aShape.
5619         #
5620         #  @ref swig_all_decompose "Example"
5621         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5622             """
5623             Obtain a compound of sub-shapes of aShape,
5624             selected by their indices in list of all sub-shapes of type aType.
5625             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5626             
5627             Parameters:
5628                 aShape Shape to get sub-shape of.
5629                 ListOfID List of sub-shapes indices.
5630                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5631                 theName Object name; when specified, this parameter is used
5632                         for result publication in the study. Otherwise, if automatic
5633                         publication is switched on, default value is used for result name.
5634
5635             Returns:
5636                 A compound of sub-shapes of aShape.
5637             """
5638             # Example: see GEOM_TestAll.py
5639             ListOfIDs = []
5640             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5641             for ind in ListOfInd:
5642                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5643             # note: auto-publishing is done in self.GetSubShape()
5644             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5645             return anObj
5646
5647         ## Explode a shape on sub-shapes of a given type.
5648         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5649         #  If the shape itself matches the type, it is also returned.
5650         #  @param aShape Shape to be exploded.
5651         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5652         #  @param theName Object name; when specified, this parameter is used
5653         #         for result publication in the study. Otherwise, if automatic
5654         #         publication is switched on, default value is used for result name.
5655         #
5656         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5657         #
5658         #  @ref swig_SubShapeAllSorted "Example"
5659         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5660             """
5661             Explode a shape on sub-shapes of a given type.
5662             Sub-shapes will be sorted by coordinates of their gravity centers.
5663             If the shape itself matches the type, it is also returned.
5664
5665             Parameters: 
5666                 aShape Shape to be exploded.
5667                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5668                 theName Object name; when specified, this parameter is used
5669                         for result publication in the study. Otherwise, if automatic
5670                         publication is switched on, default value is used for result name.
5671
5672             Returns: 
5673                 List of sub-shapes of type theShapeType, contained in theShape.
5674             """
5675             # Example: see GEOM_TestAll.py
5676             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5677             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5678             self._autoPublish(ListObj, theName, "subshape")
5679             return ListObj
5680
5681         ## Explode a shape on sub-shapes of a given type.
5682         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5683         #  @param aShape Shape to be exploded.
5684         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5685         #  @return List of IDs of sub-shapes.
5686         #
5687         #  @ref swig_all_decompose "Example"
5688         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5689             """
5690             Explode a shape on sub-shapes of a given type.
5691             Sub-shapes will be sorted by coordinates of their gravity centers.
5692
5693             Parameters: 
5694                 aShape Shape to be exploded.
5695                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5696
5697             Returns: 
5698                 List of IDs of sub-shapes.
5699             """
5700             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5701             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5702             return ListIDs
5703
5704         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5705         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5706         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5707         #  @param aShape Shape to get sub-shape of.
5708         #  @param ListOfInd List of sub-shapes indices.
5709         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5710         #  @param theName Object name; when specified, this parameter is used
5711         #         for result publication in the study. Otherwise, if automatic
5712         #         publication is switched on, default value is used for result name.
5713         #
5714         #  @return A compound of sub-shapes of aShape.
5715         #
5716         #  @ref swig_all_decompose "Example"
5717         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5718             """
5719             Obtain a compound of sub-shapes of aShape,
5720             selected by they indices in sorted list of all sub-shapes of type aType.
5721             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5722
5723             Parameters:
5724                 aShape Shape to get sub-shape of.
5725                 ListOfID List of sub-shapes indices.
5726                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5727                 theName Object name; when specified, this parameter is used
5728                         for result publication in the study. Otherwise, if automatic
5729                         publication is switched on, default value is used for result name.
5730
5731             Returns:
5732                 A compound of sub-shapes of aShape.
5733             """
5734             # Example: see GEOM_TestAll.py
5735             ListOfIDs = []
5736             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5737             for ind in ListOfInd:
5738                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5739             # note: auto-publishing is done in self.GetSubShape()
5740             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5741             return anObj
5742
5743         ## Extract shapes (excluding the main shape) of given type.
5744         #  @param aShape The shape.
5745         #  @param aType  The shape type (see ShapeType())
5746         #  @param isSorted Boolean flag to switch sorting on/off.
5747         #  @param theName Object name; when specified, this parameter is used
5748         #         for result publication in the study. Otherwise, if automatic
5749         #         publication is switched on, default value is used for result name.
5750         #
5751         #  @return List of sub-shapes of type aType, contained in aShape.
5752         #
5753         #  @ref swig_FilletChamfer "Example"
5754         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
5755             """
5756             Extract shapes (excluding the main shape) of given type.
5757
5758             Parameters:
5759                 aShape The shape.
5760                 aType  The shape type (see geompy.ShapeType)
5761                 isSorted Boolean flag to switch sorting on/off.
5762                 theName Object name; when specified, this parameter is used
5763                         for result publication in the study. Otherwise, if automatic
5764                         publication is switched on, default value is used for result name.
5765
5766             Returns:     
5767                 List of sub-shapes of type aType, contained in aShape.
5768             """
5769             # Example: see GEOM_TestAll.py
5770             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
5771             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
5772             self._autoPublish(ListObj, theName, "subshape")
5773             return ListObj
5774
5775         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
5776         #  @param aShape Main shape.
5777         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
5778         #  @param theName Object name; when specified, this parameter is used
5779         #         for result publication in the study. Otherwise, if automatic
5780         #         publication is switched on, default value is used for result name.
5781         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5782         #
5783         #  @ref swig_all_decompose "Example"
5784         def SubShapes(self, aShape, anIDs, theName=None):
5785             """
5786             Get a set of sub-shapes defined by their unique IDs inside theMainShape
5787
5788             Parameters:
5789                 aShape Main shape.
5790                 anIDs List of unique IDs of sub-shapes inside theMainShape.
5791                 theName Object name; when specified, this parameter is used
5792                         for result publication in the study. Otherwise, if automatic
5793                         publication is switched on, default value is used for result name.
5794
5795             Returns:      
5796                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5797             """
5798             # Example: see GEOM_TestAll.py
5799             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
5800             RaiseIfFailed("SubShapes", self.ShapesOp)
5801             self._autoPublish(ListObj, theName, "subshape")
5802             return ListObj
5803
5804         # end of l4_decompose
5805         ## @}
5806
5807         ## @addtogroup l4_decompose_d
5808         ## @{
5809
5810         ## Deprecated method
5811         #  It works like SubShapeAllSortedCentres(), but wrongly
5812         #  defines centres of faces, shells and solids.
5813         def SubShapeAllSorted(self, aShape, aType, theName=None):
5814             """
5815             Deprecated method
5816             It works like geompy.SubShapeAllSortedCentres, but wrongly
5817             defines centres of faces, shells and solids.
5818             """
5819             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
5820             RaiseIfFailed("MakeExplode", self.ShapesOp)
5821             self._autoPublish(ListObj, theName, "subshape")
5822             return ListObj
5823
5824         ## Deprecated method
5825         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
5826         #  defines centres of faces, shells and solids.
5827         def SubShapeAllSortedIDs(self, aShape, aType):
5828             """
5829             Deprecated method
5830             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
5831             defines centres of faces, shells and solids.
5832             """
5833             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
5834             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5835             return ListIDs
5836
5837         ## Deprecated method
5838         #  It works like SubShapeSortedCentres(), but has a bug
5839         #  (wrongly defines centres of faces, shells and solids).
5840         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
5841             """
5842             Deprecated method
5843             It works like geompy.SubShapeSortedCentres, but has a bug
5844             (wrongly defines centres of faces, shells and solids).
5845             """
5846             ListOfIDs = []
5847             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
5848             for ind in ListOfInd:
5849                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5850             # note: auto-publishing is done in self.GetSubShape()
5851             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5852             return anObj
5853
5854         # end of l4_decompose_d
5855         ## @}
5856
5857         ## @addtogroup l3_healing
5858         ## @{
5859
5860         ## Apply a sequence of Shape Healing operators to the given object.
5861         #  @param theShape Shape to be processed.
5862         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5863         #  @param theParameters List of names of parameters
5864         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5865         #  @param theValues List of values of parameters, in the same order
5866         #                    as parameters are listed in <VAR>theParameters</VAR> list.
5867         #  @param theName Object name; when specified, this parameter is used
5868         #         for result publication in the study. Otherwise, if automatic
5869         #         publication is switched on, default value is used for result name.
5870         #
5871         #  <b> Operators and Parameters: </b> \n
5872         #
5873         #  * \b FixShape - corrects invalid shapes. \n
5874         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
5875         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
5876         #
5877         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
5878         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
5879         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
5880         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
5881         #
5882         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
5883         #    surfaces in segments using a certain angle. \n
5884         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5885         #    if Angle=180, four if Angle=90, etc). \n
5886         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
5887         #
5888         #  * \b SplitClosedFaces - splits closed faces in segments.
5889         #    The number of segments depends on the number of splitting points.\n
5890         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
5891         #
5892         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
5893         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
5894         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
5895         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
5896         #   This and the previous parameters can take the following values:\n
5897         #   \b Parametric \b Continuity \n
5898         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
5899         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
5900         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
5901         #    ruling out sharp edges).\n
5902         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
5903         #       are of the same magnitude).\n
5904         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
5905         #    or surfaces (d/du C(u)) are the same at junction. \n
5906         #   \b Geometric \b Continuity \n
5907         #   \b G1: first derivatives are proportional at junction.\n
5908         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
5909         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
5910         #   \b G2: first and second derivatives are proportional at junction.
5911         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
5912         #    continuity requires that the underlying parameterization was continuous as well.
5913         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
5914         #
5915         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
5916         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
5917         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
5918         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
5919         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
5920         #       with the specified parameters.\n
5921         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
5922         #       with the specified parameters.\n
5923         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
5924         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
5925         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
5926         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
5927         #
5928         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
5929         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
5930         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
5931         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
5932         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
5933         #
5934         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
5935         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
5936         #
5937         #
5938         #  @return New GEOM.GEOM_Object, containing processed shape.
5939         #
5940         #  \n @ref tui_shape_processing "Example"
5941         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
5942             """
5943             Apply a sequence of Shape Healing operators to the given object.
5944
5945             Parameters:
5946                 theShape Shape to be processed.
5947                 theValues List of values of parameters, in the same order
5948                           as parameters are listed in theParameters list.
5949                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5950                 theParameters List of names of parameters
5951                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5952                 theName Object name; when specified, this parameter is used
5953                         for result publication in the study. Otherwise, if automatic
5954                         publication is switched on, default value is used for result name.
5955
5956                 Operators and Parameters:
5957
5958                  * FixShape - corrects invalid shapes.
5959                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
5960                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
5961                  * FixFaceSize - removes small faces, such as spots and strips.
5962                      * FixFaceSize.Tolerance - defines minimum possible face size.
5963                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
5964                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
5965                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
5966                                 in segments using a certain angle.
5967                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5968                                           if Angle=180, four if Angle=90, etc).
5969                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
5970                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
5971                                       splitting points.
5972                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
5973                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
5974                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
5975                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
5976                      * SplitContinuity.CurveContinuity - required continuity for curves.
5977                        This and the previous parameters can take the following values:
5978                        
5979                        Parametric Continuity:
5980                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
5981                                                    coincidental. The curves or surfaces may still meet at an angle,
5982                                                    giving rise to a sharp corner or edge).
5983                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
5984                                                    are parallel, ruling out sharp edges).
5985                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
5986                                                   or surfaces are of the same magnitude).
5987                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
5988                           curves or surfaces (d/du C(u)) are the same at junction.
5989                           
5990                        Geometric Continuity:
5991                        G1: first derivatives are proportional at junction.
5992                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
5993                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
5994                        G2: first and second derivatives are proportional at junction. As the names imply,
5995                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
5996                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
5997                            geometric continuity of order n, but not vice-versa.
5998                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
5999                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
6000                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
6001                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
6002                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
6003                                                         the specified parameters.
6004                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
6005                                                         the specified parameters.
6006                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
6007                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
6008                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
6009                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
6010                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
6011                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
6012                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
6013                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
6014                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
6015                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
6016                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
6017
6018             Returns:
6019                 New GEOM.GEOM_Object, containing processed shape.
6020
6021             Note: For more information look through SALOME Geometry User's Guide->
6022                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
6023             """
6024             # Example: see GEOM_TestHealing.py
6025             theValues,Parameters = ParseList(theValues)
6026             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
6027             # To avoid script failure in case of good argument shape
6028             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6029                 return theShape
6030             RaiseIfFailed("ProcessShape", self.HealOp)
6031             for string in (theOperators + theParameters):
6032                 Parameters = ":" + Parameters
6033                 pass
6034             anObj.SetParameters(Parameters)
6035             self._autoPublish(anObj, theName, "healed")
6036             return anObj
6037
6038         ## Remove faces from the given object (shape).
6039         #  @param theObject Shape to be processed.
6040         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
6041         #                  removes ALL faces of the given object.
6042         #  @param theName Object name; when specified, this parameter is used
6043         #         for result publication in the study. Otherwise, if automatic
6044         #         publication is switched on, default value is used for result name.
6045         #
6046         #  @return New GEOM.GEOM_Object, containing processed shape.
6047         #
6048         #  @ref tui_suppress_faces "Example"
6049         def SuppressFaces(self, theObject, theFaces, theName=None):
6050             """
6051             Remove faces from the given object (shape).
6052
6053             Parameters:
6054                 theObject Shape to be processed.
6055                 theFaces Indices of faces to be removed, if EMPTY then the method
6056                          removes ALL faces of the given object.
6057                 theName Object name; when specified, this parameter is used
6058                         for result publication in the study. Otherwise, if automatic
6059                         publication is switched on, default value is used for result name.
6060
6061             Returns:
6062                 New GEOM.GEOM_Object, containing processed shape.
6063             """
6064             # Example: see GEOM_TestHealing.py
6065             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
6066             RaiseIfFailed("SuppressFaces", self.HealOp)
6067             self._autoPublish(anObj, theName, "suppressFaces")
6068             return anObj
6069
6070         ## Sewing of some shapes into single shape.
6071         #  @param ListShape Shapes to be processed.
6072         #  @param theTolerance Required tolerance value.
6073         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6074         #  @param theName Object name; when specified, this parameter is used
6075         #         for result publication in the study. Otherwise, if automatic
6076         #         publication is switched on, default value is used for result name.
6077         #
6078         #  @return New GEOM.GEOM_Object, containing processed shape.
6079         #
6080         #  @ref tui_sewing "Example"
6081         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6082             """
6083             Sewing of some shapes into single shape.
6084
6085             Parameters:
6086                 ListShape Shapes to be processed.
6087                 theTolerance Required tolerance value.
6088                 AllowNonManifold Flag that allows non-manifold sewing.
6089                 theName Object name; when specified, this parameter is used
6090                         for result publication in the study. Otherwise, if automatic
6091                         publication is switched on, default value is used for result name.
6092
6093             Returns:
6094                 New GEOM.GEOM_Object, containing processed shape.
6095             """
6096             # Example: see GEOM_TestHealing.py
6097             comp = self.MakeCompound(ListShape)
6098             # note: auto-publishing is done in self.Sew()
6099             anObj = self.Sew(comp, theTolerance, AllowNonManifold, theName)
6100             return anObj
6101
6102         ## Sewing of the given object.
6103         #  @param theObject Shape to be processed.
6104         #  @param theTolerance Required tolerance value.
6105         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6106         #  @param theName Object name; when specified, this parameter is used
6107         #         for result publication in the study. Otherwise, if automatic
6108         #         publication is switched on, default value is used for result name.
6109         #
6110         #  @return New GEOM.GEOM_Object, containing processed shape.
6111         def Sew(self, theObject, theTolerance, AllowNonManifold=False, theName=None):
6112             """
6113             Sewing of the given object.
6114
6115             Parameters:
6116                 theObject Shape to be processed.
6117                 theTolerance Required tolerance value.
6118                 AllowNonManifold Flag that allows non-manifold sewing.
6119                 theName Object name; when specified, this parameter is used
6120                         for result publication in the study. Otherwise, if automatic
6121                         publication is switched on, default value is used for result name.
6122
6123             Returns:
6124                 New GEOM.GEOM_Object, containing processed shape.
6125             """
6126             # Example: see MakeSewing() above
6127             theTolerance,Parameters = ParseParameters(theTolerance)
6128             if AllowNonManifold:
6129                 anObj = self.HealOp.SewAllowNonManifold(theObject, theTolerance)
6130             else:
6131                 anObj = self.HealOp.Sew(theObject, theTolerance)
6132             # To avoid script failure in case of good argument shape
6133             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6134                 return theObject
6135             RaiseIfFailed("Sew", self.HealOp)
6136             anObj.SetParameters(Parameters)
6137             self._autoPublish(anObj, theName, "sewed")
6138             return anObj
6139
6140         ## Rebuild the topology of theCompound of solids by removing
6141         #  of the faces that are shared by several solids.
6142         #  @param theCompound Shape to be processed.
6143         #  @param theName Object name; when specified, this parameter is used
6144         #         for result publication in the study. Otherwise, if automatic
6145         #         publication is switched on, default value is used for result name.
6146         #
6147         #  @return New GEOM.GEOM_Object, containing processed shape.
6148         #
6149         #  @ref tui_remove_webs "Example"
6150         def RemoveInternalFaces (self, theCompound, theName=None):
6151             """
6152             Rebuild the topology of theCompound of solids by removing
6153             of the faces that are shared by several solids.
6154
6155             Parameters:
6156                 theCompound Shape to be processed.
6157                 theName Object name; when specified, this parameter is used
6158                         for result publication in the study. Otherwise, if automatic
6159                         publication is switched on, default value is used for result name.
6160
6161             Returns:
6162                 New GEOM.GEOM_Object, containing processed shape.
6163             """
6164             # Example: see GEOM_TestHealing.py
6165             anObj = self.HealOp.RemoveInternalFaces(theCompound)
6166             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6167             self._autoPublish(anObj, theName, "removeWebs")
6168             return anObj
6169
6170         ## Remove internal wires and edges from the given object (face).
6171         #  @param theObject Shape to be processed.
6172         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6173         #                  removes ALL internal wires of the given object.
6174         #  @param theName Object name; when specified, this parameter is used
6175         #         for result publication in the study. Otherwise, if automatic
6176         #         publication is switched on, default value is used for result name.
6177         #
6178         #  @return New GEOM.GEOM_Object, containing processed shape.
6179         #
6180         #  @ref tui_suppress_internal_wires "Example"
6181         def SuppressInternalWires(self, theObject, theWires, theName=None):
6182             """
6183             Remove internal wires and edges from the given object (face).
6184
6185             Parameters:
6186                 theObject Shape to be processed.
6187                 theWires Indices of wires to be removed, if EMPTY then the method
6188                          removes ALL internal wires of the given object.
6189                 theName Object name; when specified, this parameter is used
6190                         for result publication in the study. Otherwise, if automatic
6191                         publication is switched on, default value is used for result name.
6192
6193             Returns:                
6194                 New GEOM.GEOM_Object, containing processed shape.
6195             """
6196             # Example: see GEOM_TestHealing.py
6197             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6198             RaiseIfFailed("RemoveIntWires", self.HealOp)
6199             self._autoPublish(anObj, theName, "suppressWires")
6200             return anObj
6201
6202         ## Remove internal closed contours (holes) from the given object.
6203         #  @param theObject Shape to be processed.
6204         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6205         #                  removes ALL internal holes of the given object
6206         #  @param theName Object name; when specified, this parameter is used
6207         #         for result publication in the study. Otherwise, if automatic
6208         #         publication is switched on, default value is used for result name.
6209         #
6210         #  @return New GEOM.GEOM_Object, containing processed shape.
6211         #
6212         #  @ref tui_suppress_holes "Example"
6213         def SuppressHoles(self, theObject, theWires, theName=None):
6214             """
6215             Remove internal closed contours (holes) from the given object.
6216
6217             Parameters:
6218                 theObject Shape to be processed.
6219                 theWires Indices of wires to be removed, if EMPTY then the method
6220                          removes ALL internal holes of the given object
6221                 theName Object name; when specified, this parameter is used
6222                         for result publication in the study. Otherwise, if automatic
6223                         publication is switched on, default value is used for result name.
6224
6225             Returns:    
6226                 New GEOM.GEOM_Object, containing processed shape.
6227             """
6228             # Example: see GEOM_TestHealing.py
6229             anObj = self.HealOp.FillHoles(theObject, theWires)
6230             RaiseIfFailed("FillHoles", self.HealOp)
6231             self._autoPublish(anObj, theName, "suppressHoles")
6232             return anObj
6233
6234         ## Close an open wire.
6235         #  @param theObject Shape to be processed.
6236         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6237         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6238         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6239         #                        If False : closure by creation of an edge between ends.
6240         #  @param theName Object name; when specified, this parameter is used
6241         #         for result publication in the study. Otherwise, if automatic
6242         #         publication is switched on, default value is used for result name.
6243         #
6244         #  @return New GEOM.GEOM_Object, containing processed shape.
6245         #
6246         #  @ref tui_close_contour "Example"
6247         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6248             """
6249             Close an open wire.
6250
6251             Parameters: 
6252                 theObject Shape to be processed.
6253                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6254                          if [ ], then theObject itself is a wire.
6255                 isCommonVertex If True  : closure by creation of a common vertex,
6256                                If False : closure by creation of an edge between ends.
6257                 theName Object name; when specified, this parameter is used
6258                         for result publication in the study. Otherwise, if automatic
6259                         publication is switched on, default value is used for result name.
6260
6261             Returns:                      
6262                 New GEOM.GEOM_Object, containing processed shape. 
6263             """
6264             # Example: see GEOM_TestHealing.py
6265             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6266             RaiseIfFailed("CloseContour", self.HealOp)
6267             self._autoPublish(anObj, theName, "closeContour")
6268             return anObj
6269
6270         ## Addition of a point to a given edge object.
6271         #  @param theObject Shape to be processed.
6272         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6273         #                      if -1, then theObject itself is the edge.
6274         #  @param theValue Value of parameter on edge or length parameter,
6275         #                  depending on \a isByParameter.
6276         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6277         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6278         #  @param theName Object name; when specified, this parameter is used
6279         #         for result publication in the study. Otherwise, if automatic
6280         #         publication is switched on, default value is used for result name.
6281         #
6282         #  @return New GEOM.GEOM_Object, containing processed shape.
6283         #
6284         #  @ref tui_add_point_on_edge "Example"
6285         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6286             """
6287             Addition of a point to a given edge object.
6288
6289             Parameters: 
6290                 theObject Shape to be processed.
6291                 theEdgeIndex Index of edge to be divided within theObject's shape,
6292                              if -1, then theObject itself is the edge.
6293                 theValue Value of parameter on edge or length parameter,
6294                          depending on isByParameter.
6295                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6296                               if FALSE : theValue is treated as a length parameter [0..1]
6297                 theName Object name; when specified, this parameter is used
6298                         for result publication in the study. Otherwise, if automatic
6299                         publication is switched on, default value is used for result name.
6300
6301             Returns:  
6302                 New GEOM.GEOM_Object, containing processed shape.
6303             """
6304             # Example: see GEOM_TestHealing.py
6305             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6306             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6307             RaiseIfFailed("DivideEdge", self.HealOp)
6308             anObj.SetParameters(Parameters)
6309             self._autoPublish(anObj, theName, "divideEdge")
6310             return anObj
6311
6312         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6313         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6314         #  @param theVertices A list of vertices to suppress. If the list
6315         #                     is empty, all vertices in a wire will be assumed.
6316         #  @param theName Object name; when specified, this parameter is used
6317         #         for result publication in the study. Otherwise, if automatic
6318         #         publication is switched on, default value is used for result name.
6319         #
6320         #  @return New GEOM.GEOM_Object with modified wire.
6321         #
6322         #  @ref tui_fuse_collinear_edges "Example"
6323         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6324             """
6325             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6326
6327             Parameters: 
6328                 theWire Wire to minimize the number of C1 continuous edges in.
6329                 theVertices A list of vertices to suppress. If the list
6330                             is empty, all vertices in a wire will be assumed.
6331                 theName Object name; when specified, this parameter is used
6332                         for result publication in the study. Otherwise, if automatic
6333                         publication is switched on, default value is used for result name.
6334
6335             Returns:  
6336                 New GEOM.GEOM_Object with modified wire.
6337             """
6338             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6339             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6340             self._autoPublish(anObj, theName, "fuseEdges")
6341             return anObj
6342
6343         ## Change orientation of the given object. Updates given shape.
6344         #  @param theObject Shape to be processed.
6345         #  @return Updated <var>theObject</var>
6346         #
6347         #  @ref swig_todo "Example"
6348         def ChangeOrientationShell(self,theObject):
6349             """
6350             Change orientation of the given object. Updates given shape.
6351
6352             Parameters: 
6353                 theObject Shape to be processed.
6354
6355             Returns:  
6356                 Updated theObject
6357             """
6358             theObject = self.HealOp.ChangeOrientation(theObject)
6359             RaiseIfFailed("ChangeOrientation", self.HealOp)
6360             pass
6361
6362         ## Change orientation of the given object.
6363         #  @param theObject Shape to be processed.
6364         #  @param theName Object name; when specified, this parameter is used
6365         #         for result publication in the study. Otherwise, if automatic
6366         #         publication is switched on, default value is used for result name.
6367         #
6368         #  @return New GEOM.GEOM_Object, containing processed shape.
6369         #
6370         #  @ref swig_todo "Example"
6371         def ChangeOrientationShellCopy(self, theObject, theName=None):
6372             """
6373             Change orientation of the given object.
6374
6375             Parameters:
6376                 theObject Shape to be processed.
6377                 theName Object name; when specified, this parameter is used
6378                         for result publication in the study. Otherwise, if automatic
6379                         publication is switched on, default value is used for result name.
6380
6381             Returns:   
6382                 New GEOM.GEOM_Object, containing processed shape.
6383             """
6384             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6385             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6386             self._autoPublish(anObj, theName, "reversed")
6387             return anObj
6388
6389         ## Try to limit tolerance of the given object by value \a theTolerance.
6390         #  @param theObject Shape to be processed.
6391         #  @param theTolerance Required tolerance value.
6392         #  @param theName Object name; when specified, this parameter is used
6393         #         for result publication in the study. Otherwise, if automatic
6394         #         publication is switched on, default value is used for result name.
6395         #
6396         #  @return New GEOM.GEOM_Object, containing processed shape.
6397         #
6398         #  @ref tui_limit_tolerance "Example"
6399         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6400             """
6401             Try to limit tolerance of the given object by value theTolerance.
6402
6403             Parameters:
6404                 theObject Shape to be processed.
6405                 theTolerance Required tolerance value.
6406                 theName Object name; when specified, this parameter is used
6407                         for result publication in the study. Otherwise, if automatic
6408                         publication is switched on, default value is used for result name.
6409
6410             Returns:   
6411                 New GEOM.GEOM_Object, containing processed shape.
6412             """
6413             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6414             RaiseIfFailed("LimitTolerance", self.HealOp)
6415             self._autoPublish(anObj, theName, "limitTolerance")
6416             return anObj
6417
6418         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6419         #  that constitute a free boundary of the given shape.
6420         #  @param theObject Shape to get free boundary of.
6421         #  @param theName Object name; when specified, this parameter is used
6422         #         for result publication in the study. Otherwise, if automatic
6423         #         publication is switched on, default value is used for result name.
6424         #
6425         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6426         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6427         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6428         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6429         #
6430         #  @ref tui_measurement_tools_page "Example"
6431         def GetFreeBoundary(self, theObject, theName=None):
6432             """
6433             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6434             that constitute a free boundary of the given shape.
6435
6436             Parameters:
6437                 theObject Shape to get free boundary of.
6438                 theName Object name; when specified, this parameter is used
6439                         for result publication in the study. Otherwise, if automatic
6440                         publication is switched on, default value is used for result name.
6441
6442             Returns: 
6443                 [status, theClosedWires, theOpenWires]
6444                  status: FALSE, if an error(s) occured during the method execution.
6445                  theClosedWires: Closed wires on the free boundary of the given shape.
6446                  theOpenWires: Open wires on the free boundary of the given shape.
6447             """
6448             # Example: see GEOM_TestHealing.py
6449             anObj = self.HealOp.GetFreeBoundary(theObject)
6450             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6451             self._autoPublish(anObj[1], theName, "closedWire")
6452             self._autoPublish(anObj[2], theName, "openWire")
6453             return anObj
6454
6455         ## Replace coincident faces in theShape by one face.
6456         #  @param theShape Initial shape.
6457         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6458         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6459         #                         otherwise all initial shapes.
6460         #  @param theName Object name; when specified, this parameter is used
6461         #         for result publication in the study. Otherwise, if automatic
6462         #         publication is switched on, default value is used for result name.
6463         #
6464         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6465         #
6466         #  @ref tui_glue_faces "Example"
6467         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6468             """
6469             Replace coincident faces in theShape by one face.
6470
6471             Parameters:
6472                 theShape Initial shape.
6473                 theTolerance Maximum distance between faces, which can be considered as coincident.
6474                 doKeepNonSolids If FALSE, only solids will present in the result,
6475                                 otherwise all initial shapes.
6476                 theName Object name; when specified, this parameter is used
6477                         for result publication in the study. Otherwise, if automatic
6478                         publication is switched on, default value is used for result name.
6479
6480             Returns:
6481                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6482             """
6483             # Example: see GEOM_Spanner.py
6484             theTolerance,Parameters = ParseParameters(theTolerance)
6485             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6486             if anObj is None:
6487                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6488             anObj.SetParameters(Parameters)
6489             self._autoPublish(anObj, theName, "glueFaces")
6490             return anObj
6491
6492         ## Find coincident faces in theShape for possible gluing.
6493         #  @param theShape Initial shape.
6494         #  @param theTolerance Maximum distance between faces,
6495         #                      which can be considered as coincident.
6496         #  @param theName Object name; when specified, this parameter is used
6497         #         for result publication in the study. Otherwise, if automatic
6498         #         publication is switched on, default value is used for result name.
6499         #
6500         #  @return GEOM.ListOfGO
6501         #
6502         #  @ref tui_glue_faces "Example"
6503         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6504             """
6505             Find coincident faces in theShape for possible gluing.
6506
6507             Parameters:
6508                 theShape Initial shape.
6509                 theTolerance Maximum distance between faces,
6510                              which can be considered as coincident.
6511                 theName Object name; when specified, this parameter is used
6512                         for result publication in the study. Otherwise, if automatic
6513                         publication is switched on, default value is used for result name.
6514
6515             Returns:                    
6516                 GEOM.ListOfGO
6517             """
6518             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6519             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6520             self._autoPublish(anObj, theName, "facesToGlue")
6521             return anObj
6522
6523         ## Replace coincident faces in theShape by one face
6524         #  in compliance with given list of faces
6525         #  @param theShape Initial shape.
6526         #  @param theTolerance Maximum distance between faces,
6527         #                      which can be considered as coincident.
6528         #  @param theFaces List of faces for gluing.
6529         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6530         #                         otherwise all initial shapes.
6531         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6532         #                        will be glued, otherwise only the edges,
6533         #                        belonging to <VAR>theFaces</VAR>.
6534         #  @param theName Object name; when specified, this parameter is used
6535         #         for result publication in the study. Otherwise, if automatic
6536         #         publication is switched on, default value is used for result name.
6537         #
6538         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6539         #          without some faces.
6540         #
6541         #  @ref tui_glue_faces "Example"
6542         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6543                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6544             """
6545             Replace coincident faces in theShape by one face
6546             in compliance with given list of faces
6547
6548             Parameters:
6549                 theShape Initial shape.
6550                 theTolerance Maximum distance between faces,
6551                              which can be considered as coincident.
6552                 theFaces List of faces for gluing.
6553                 doKeepNonSolids If FALSE, only solids will present in the result,
6554                                 otherwise all initial shapes.
6555                 doGlueAllEdges If TRUE, all coincident edges of theShape
6556                                will be glued, otherwise only the edges,
6557                                belonging to theFaces.
6558                 theName Object name; when specified, this parameter is used
6559                         for result publication in the study. Otherwise, if automatic
6560                         publication is switched on, default value is used for result name.
6561
6562             Returns:
6563                 New GEOM.GEOM_Object, containing a copy of theShape
6564                     without some faces.
6565             """
6566             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6567                                                       doKeepNonSolids, doGlueAllEdges)
6568             if anObj is None:
6569                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6570             self._autoPublish(anObj, theName, "glueFaces")
6571             return anObj
6572
6573         ## Replace coincident edges in theShape by one edge.
6574         #  @param theShape Initial shape.
6575         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6576         #  @param theName Object name; when specified, this parameter is used
6577         #         for result publication in the study. Otherwise, if automatic
6578         #         publication is switched on, default value is used for result name.
6579         #
6580         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6581         #
6582         #  @ref tui_glue_edges "Example"
6583         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6584             """
6585             Replace coincident edges in theShape by one edge.
6586
6587             Parameters:
6588                 theShape Initial shape.
6589                 theTolerance Maximum distance between edges, which can be considered as coincident.
6590                 theName Object name; when specified, this parameter is used
6591                         for result publication in the study. Otherwise, if automatic
6592                         publication is switched on, default value is used for result name.
6593
6594             Returns:    
6595                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6596             """
6597             theTolerance,Parameters = ParseParameters(theTolerance)
6598             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6599             if anObj is None:
6600                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6601             anObj.SetParameters(Parameters)
6602             self._autoPublish(anObj, theName, "glueEdges")
6603             return anObj
6604
6605         ## Find coincident edges in theShape for possible gluing.
6606         #  @param theShape Initial shape.
6607         #  @param theTolerance Maximum distance between edges,
6608         #                      which can be considered as coincident.
6609         #  @param theName Object name; when specified, this parameter is used
6610         #         for result publication in the study. Otherwise, if automatic
6611         #         publication is switched on, default value is used for result name.
6612         #
6613         #  @return GEOM.ListOfGO
6614         #
6615         #  @ref tui_glue_edges "Example"
6616         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6617             """
6618             Find coincident edges in theShape for possible gluing.
6619
6620             Parameters:
6621                 theShape Initial shape.
6622                 theTolerance Maximum distance between edges,
6623                              which can be considered as coincident.
6624                 theName Object name; when specified, this parameter is used
6625                         for result publication in the study. Otherwise, if automatic
6626                         publication is switched on, default value is used for result name.
6627
6628             Returns:                         
6629                 GEOM.ListOfGO
6630             """
6631             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6632             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6633             self._autoPublish(anObj, theName, "edgesToGlue")
6634             return anObj
6635
6636         ## Replace coincident edges in theShape by one edge
6637         #  in compliance with given list of edges.
6638         #  @param theShape Initial shape.
6639         #  @param theTolerance Maximum distance between edges,
6640         #                      which can be considered as coincident.
6641         #  @param theEdges List of edges for gluing.
6642         #  @param theName Object name; when specified, this parameter is used
6643         #         for result publication in the study. Otherwise, if automatic
6644         #         publication is switched on, default value is used for result name.
6645         #
6646         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6647         #          without some edges.
6648         #
6649         #  @ref tui_glue_edges "Example"
6650         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6651             """
6652             Replace coincident edges in theShape by one edge
6653             in compliance with given list of edges.
6654
6655             Parameters:
6656                 theShape Initial shape.
6657                 theTolerance Maximum distance between edges,
6658                              which can be considered as coincident.
6659                 theEdges List of edges for gluing.
6660                 theName Object name; when specified, this parameter is used
6661                         for result publication in the study. Otherwise, if automatic
6662                         publication is switched on, default value is used for result name.
6663
6664             Returns:  
6665                 New GEOM.GEOM_Object, containing a copy of theShape
6666                 without some edges.
6667             """
6668             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6669             if anObj is None:
6670                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6671             self._autoPublish(anObj, theName, "glueEdges")
6672             return anObj
6673
6674         # end of l3_healing
6675         ## @}
6676
6677         ## @addtogroup l3_boolean Boolean Operations
6678         ## @{
6679
6680         # -----------------------------------------------------------------------------
6681         # Boolean (Common, Cut, Fuse, Section)
6682         # -----------------------------------------------------------------------------
6683
6684         ## Perform one of boolean operations on two given shapes.
6685         #  @param theShape1 First argument for boolean operation.
6686         #  @param theShape2 Second argument for boolean operation.
6687         #  @param theOperation Indicates the operation to be done:\n
6688         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6689         #  @param checkSelfInte The flag that tells if the arguments should
6690         #         be checked for self-intersection prior to the operation.
6691         #  @param theName Object name; when specified, this parameter is used
6692         #         for result publication in the study. Otherwise, if automatic
6693         #         publication is switched on, default value is used for result name.
6694         #
6695         #  @note This algorithm doesn't find all types of self-intersections.
6696         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6697         #        vertex/face and edge/face intersections. Face/face
6698         #        intersections detection is switched off as it is a
6699         #        time-consuming operation that gives an impact on performance.
6700         #        To find all self-intersections please use
6701         #        CheckSelfIntersections() method.
6702         #
6703         #  @return New GEOM.GEOM_Object, containing the result shape.
6704         #
6705         #  @ref tui_fuse "Example"
6706         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
6707             """
6708             Perform one of boolean operations on two given shapes.
6709
6710             Parameters: 
6711                 theShape1 First argument for boolean operation.
6712                 theShape2 Second argument for boolean operation.
6713                 theOperation Indicates the operation to be done:
6714                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6715                 checkSelfInte The flag that tells if the arguments should
6716                               be checked for self-intersection prior to
6717                               the operation.
6718                 theName Object name; when specified, this parameter is used
6719                         for result publication in the study. Otherwise, if automatic
6720                         publication is switched on, default value is used for result name.
6721
6722             Note:
6723                     This algorithm doesn't find all types of self-intersections.
6724                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6725                     vertex/face and edge/face intersections. Face/face
6726                     intersections detection is switched off as it is a
6727                     time-consuming operation that gives an impact on performance.
6728                     To find all self-intersections please use
6729                     CheckSelfIntersections() method.
6730
6731             Returns:   
6732                 New GEOM.GEOM_Object, containing the result shape.
6733             """
6734             # Example: see GEOM_TestAll.py
6735             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
6736             RaiseIfFailed("MakeBoolean", self.BoolOp)
6737             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
6738             self._autoPublish(anObj, theName, def_names[theOperation])
6739             return anObj
6740
6741         ## Perform Common boolean operation on two given shapes.
6742         #  @param theShape1 First argument for boolean operation.
6743         #  @param theShape2 Second argument for boolean operation.
6744         #  @param checkSelfInte The flag that tells if the arguments should
6745         #         be checked for self-intersection prior to the operation.
6746         #  @param theName Object name; when specified, this parameter is used
6747         #         for result publication in the study. Otherwise, if automatic
6748         #         publication is switched on, default value is used for result name.
6749         #
6750         #  @note This algorithm doesn't find all types of self-intersections.
6751         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6752         #        vertex/face and edge/face intersections. Face/face
6753         #        intersections detection is switched off as it is a
6754         #        time-consuming operation that gives an impact on performance.
6755         #        To find all self-intersections please use
6756         #        CheckSelfIntersections() method.
6757         #
6758         #  @return New GEOM.GEOM_Object, containing the result shape.
6759         #
6760         #  @ref tui_common "Example 1"
6761         #  \n @ref swig_MakeCommon "Example 2"
6762         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6763             """
6764             Perform Common boolean operation on two given shapes.
6765
6766             Parameters: 
6767                 theShape1 First argument for boolean operation.
6768                 theShape2 Second argument for boolean operation.
6769                 checkSelfInte The flag that tells if the arguments should
6770                               be checked for self-intersection prior to
6771                               the operation.
6772                 theName Object name; when specified, this parameter is used
6773                         for result publication in the study. Otherwise, if automatic
6774                         publication is switched on, default value is used for result name.
6775
6776             Note:
6777                     This algorithm doesn't find all types of self-intersections.
6778                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6779                     vertex/face and edge/face intersections. Face/face
6780                     intersections detection is switched off as it is a
6781                     time-consuming operation that gives an impact on performance.
6782                     To find all self-intersections please use
6783                     CheckSelfIntersections() method.
6784
6785             Returns:   
6786                 New GEOM.GEOM_Object, containing the result shape.
6787             """
6788             # Example: see GEOM_TestOthers.py
6789             # note: auto-publishing is done in self.MakeBoolean()
6790             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
6791
6792         ## Perform Cut boolean operation on two given shapes.
6793         #  @param theShape1 First argument for boolean operation.
6794         #  @param theShape2 Second argument for boolean operation.
6795         #  @param checkSelfInte The flag that tells if the arguments should
6796         #         be checked for self-intersection prior to the operation.
6797         #  @param theName Object name; when specified, this parameter is used
6798         #         for result publication in the study. Otherwise, if automatic
6799         #         publication is switched on, default value is used for result name.
6800         #
6801         #  @note This algorithm doesn't find all types of self-intersections.
6802         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6803         #        vertex/face and edge/face intersections. Face/face
6804         #        intersections detection is switched off as it is a
6805         #        time-consuming operation that gives an impact on performance.
6806         #        To find all self-intersections please use
6807         #        CheckSelfIntersections() method.
6808         #
6809         #  @return New GEOM.GEOM_Object, containing the result shape.
6810         #
6811         #  @ref tui_cut "Example 1"
6812         #  \n @ref swig_MakeCommon "Example 2"
6813         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6814             """
6815             Perform Cut boolean operation on two given shapes.
6816
6817             Parameters: 
6818                 theShape1 First argument for boolean operation.
6819                 theShape2 Second argument for boolean operation.
6820                 checkSelfInte The flag that tells if the arguments should
6821                               be checked for self-intersection prior to
6822                               the operation.
6823                 theName Object name; when specified, this parameter is used
6824                         for result publication in the study. Otherwise, if automatic
6825                         publication is switched on, default value is used for result name.
6826
6827             Note:
6828                     This algorithm doesn't find all types of self-intersections.
6829                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6830                     vertex/face and edge/face intersections. Face/face
6831                     intersections detection is switched off as it is a
6832                     time-consuming operation that gives an impact on performance.
6833                     To find all self-intersections please use
6834                     CheckSelfIntersections() method.
6835
6836             Returns:   
6837                 New GEOM.GEOM_Object, containing the result shape.
6838             
6839             """
6840             # Example: see GEOM_TestOthers.py
6841             # note: auto-publishing is done in self.MakeBoolean()
6842             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
6843
6844         ## Perform Fuse boolean operation on two given shapes.
6845         #  @param theShape1 First argument for boolean operation.
6846         #  @param theShape2 Second argument for boolean operation.
6847         #  @param checkSelfInte The flag that tells if the arguments should
6848         #         be checked for self-intersection prior to the operation.
6849         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
6850         #         operation should be performed during the operation.
6851         #  @param theName Object name; when specified, this parameter is used
6852         #         for result publication in the study. Otherwise, if automatic
6853         #         publication is switched on, default value is used for result name.
6854         #
6855         #  @note This algorithm doesn't find all types of self-intersections.
6856         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6857         #        vertex/face and edge/face intersections. Face/face
6858         #        intersections detection is switched off as it is a
6859         #        time-consuming operation that gives an impact on performance.
6860         #        To find all self-intersections please use
6861         #        CheckSelfIntersections() method.
6862         #
6863         #  @return New GEOM.GEOM_Object, containing the result shape.
6864         #
6865         #  @ref tui_fuse "Example 1"
6866         #  \n @ref swig_MakeCommon "Example 2"
6867         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
6868                      rmExtraEdges=False, theName=None):
6869             """
6870             Perform Fuse boolean operation on two given shapes.
6871
6872             Parameters: 
6873                 theShape1 First argument for boolean operation.
6874                 theShape2 Second argument for boolean operation.
6875                 checkSelfInte The flag that tells if the arguments should
6876                               be checked for self-intersection prior to
6877                               the operation.
6878                 rmExtraEdges The flag that tells if Remove Extra Edges
6879                              operation should be performed during the operation.
6880                 theName Object name; when specified, this parameter is used
6881                         for result publication in the study. Otherwise, if automatic
6882                         publication is switched on, default value is used for result name.
6883
6884             Note:
6885                     This algorithm doesn't find all types of self-intersections.
6886                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6887                     vertex/face and edge/face intersections. Face/face
6888                     intersections detection is switched off as it is a
6889                     time-consuming operation that gives an impact on performance.
6890                     To find all self-intersections please use
6891                     CheckSelfIntersections() method.
6892
6893             Returns:   
6894                 New GEOM.GEOM_Object, containing the result shape.
6895             
6896             """
6897             # Example: see GEOM_TestOthers.py
6898             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
6899                                          checkSelfInte, rmExtraEdges)
6900             RaiseIfFailed("MakeFuse", self.BoolOp)
6901             self._autoPublish(anObj, theName, "fuse")
6902             return anObj
6903
6904         ## Perform Section boolean operation on two given shapes.
6905         #  @param theShape1 First argument for boolean operation.
6906         #  @param theShape2 Second argument for boolean operation.
6907         #  @param checkSelfInte The flag that tells if the arguments should
6908         #         be checked for self-intersection prior to the operation.
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         #  @note This algorithm doesn't find all types of self-intersections.
6914         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6915         #        vertex/face and edge/face intersections. Face/face
6916         #        intersections detection is switched off as it is a
6917         #        time-consuming operation that gives an impact on performance.
6918         #        To find all self-intersections please use
6919         #        CheckSelfIntersections() method.
6920         #
6921         #  @return New GEOM.GEOM_Object, containing the result shape.
6922         #
6923         #  @ref tui_section "Example 1"
6924         #  \n @ref swig_MakeCommon "Example 2"
6925         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6926             """
6927             Perform Section boolean operation on two given shapes.
6928
6929             Parameters: 
6930                 theShape1 First argument for boolean operation.
6931                 theShape2 Second argument for boolean operation.
6932                 checkSelfInte The flag that tells if the arguments should
6933                               be checked for self-intersection prior to
6934                               the operation.
6935                 theName Object name; when specified, this parameter is used
6936                         for result publication in the study. Otherwise, if automatic
6937                         publication is switched on, default value is used for result name.
6938
6939             Note:
6940                     This algorithm doesn't find all types of self-intersections.
6941                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6942                     vertex/face and edge/face intersections. Face/face
6943                     intersections detection is switched off as it is a
6944                     time-consuming operation that gives an impact on performance.
6945                     To find all self-intersections please use
6946                     CheckSelfIntersections() method.
6947
6948             Returns:   
6949                 New GEOM.GEOM_Object, containing the result shape.
6950             
6951             """
6952             # Example: see GEOM_TestOthers.py
6953             # note: auto-publishing is done in self.MakeBoolean()
6954             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
6955
6956         ## Perform Fuse boolean operation on the list of shapes.
6957         #  @param theShapesList Shapes to be fused.
6958         #  @param checkSelfInte The flag that tells if the arguments should
6959         #         be checked for self-intersection prior to the operation.
6960         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
6961         #         operation should be performed during the operation.
6962         #  @param theName Object name; when specified, this parameter is used
6963         #         for result publication in the study. Otherwise, if automatic
6964         #         publication is switched on, default value is used for result name.
6965         #
6966         #  @note This algorithm doesn't find all types of self-intersections.
6967         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6968         #        vertex/face and edge/face intersections. Face/face
6969         #        intersections detection is switched off as it is a
6970         #        time-consuming operation that gives an impact on performance.
6971         #        To find all self-intersections please use
6972         #        CheckSelfIntersections() method.
6973         #
6974         #  @return New GEOM.GEOM_Object, containing the result shape.
6975         #
6976         #  @ref tui_fuse "Example 1"
6977         #  \n @ref swig_MakeCommon "Example 2"
6978         def MakeFuseList(self, theShapesList, checkSelfInte=False,
6979                          rmExtraEdges=False, theName=None):
6980             """
6981             Perform Fuse boolean operation on the list of shapes.
6982
6983             Parameters: 
6984                 theShapesList Shapes to be fused.
6985                 checkSelfInte The flag that tells if the arguments should
6986                               be checked for self-intersection prior to
6987                               the operation.
6988                 rmExtraEdges The flag that tells if Remove Extra Edges
6989                              operation should be performed during the operation.
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             Note:
6995                     This algorithm doesn't find all types of self-intersections.
6996                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6997                     vertex/face and edge/face intersections. Face/face
6998                     intersections detection is switched off as it is a
6999                     time-consuming operation that gives an impact on performance.
7000                     To find all self-intersections please use
7001                     CheckSelfIntersections() method.
7002
7003             Returns:   
7004                 New GEOM.GEOM_Object, containing the result shape.
7005             
7006             """
7007             # Example: see GEOM_TestOthers.py
7008             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
7009                                              rmExtraEdges)
7010             RaiseIfFailed("MakeFuseList", self.BoolOp)
7011             self._autoPublish(anObj, theName, "fuse")
7012             return anObj
7013
7014         ## Perform Common boolean operation on the list of shapes.
7015         #  @param theShapesList Shapes for Common operation.
7016         #  @param checkSelfInte The flag that tells if the arguments should
7017         #         be checked for self-intersection prior to the operation.
7018         #  @param theName Object name; when specified, this parameter is used
7019         #         for result publication in the study. Otherwise, if automatic
7020         #         publication is switched on, default value is used for result name.
7021         #
7022         #  @note This algorithm doesn't find all types of self-intersections.
7023         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7024         #        vertex/face and edge/face intersections. Face/face
7025         #        intersections detection is switched off as it is a
7026         #        time-consuming operation that gives an impact on performance.
7027         #        To find all self-intersections please use
7028         #        CheckSelfIntersections() method.
7029         #
7030         #  @return New GEOM.GEOM_Object, containing the result shape.
7031         #
7032         #  @ref tui_common "Example 1"
7033         #  \n @ref swig_MakeCommon "Example 2"
7034         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
7035             """
7036             Perform Common boolean operation on the list of shapes.
7037
7038             Parameters: 
7039                 theShapesList Shapes for Common operation.
7040                 checkSelfInte The flag that tells if the arguments should
7041                               be checked for self-intersection prior to
7042                               the operation.
7043                 theName Object name; when specified, this parameter is used
7044                         for result publication in the study. Otherwise, if automatic
7045                         publication is switched on, default value is used for result name.
7046
7047             Note:
7048                     This algorithm doesn't find all types of self-intersections.
7049                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7050                     vertex/face and edge/face intersections. Face/face
7051                     intersections detection is switched off as it is a
7052                     time-consuming operation that gives an impact on performance.
7053                     To find all self-intersections please use
7054                     CheckSelfIntersections() method.
7055
7056             Returns:   
7057                 New GEOM.GEOM_Object, containing the result shape.
7058             
7059             """
7060             # Example: see GEOM_TestOthers.py
7061             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
7062             RaiseIfFailed("MakeCommonList", self.BoolOp)
7063             self._autoPublish(anObj, theName, "common")
7064             return anObj
7065
7066         ## Perform Cut boolean operation on one object and the list of tools.
7067         #  @param theMainShape The object of the operation.
7068         #  @param theShapesList The list of tools of the operation.
7069         #  @param checkSelfInte The flag that tells if the arguments should
7070         #         be checked for self-intersection prior to the operation.
7071         #  @param theName Object name; when specified, this parameter is used
7072         #         for result publication in the study. Otherwise, if automatic
7073         #         publication is switched on, default value is used for result name.
7074         #
7075         #  @note This algorithm doesn't find all types of self-intersections.
7076         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7077         #        vertex/face and edge/face intersections. Face/face
7078         #        intersections detection is switched off as it is a
7079         #        time-consuming operation that gives an impact on performance.
7080         #        To find all self-intersections please use
7081         #        CheckSelfIntersections() method.
7082         #
7083         #  @return New GEOM.GEOM_Object, containing the result shape.
7084         #
7085         #  @ref tui_cut "Example 1"
7086         #  \n @ref swig_MakeCommon "Example 2"
7087         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
7088             """
7089             Perform Cut boolean operation on one object and the list of tools.
7090
7091             Parameters: 
7092                 theMainShape The object of the operation.
7093                 theShapesList The list of tools of the operation.
7094                 checkSelfInte The flag that tells if the arguments should
7095                               be checked for self-intersection prior to
7096                               the operation.
7097                 theName Object name; when specified, this parameter is used
7098                         for result publication in the study. Otherwise, if automatic
7099                         publication is switched on, default value is used for result name.
7100
7101             Note:
7102                     This algorithm doesn't find all types of self-intersections.
7103                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7104                     vertex/face and edge/face intersections. Face/face
7105                     intersections detection is switched off as it is a
7106                     time-consuming operation that gives an impact on performance.
7107                     To find all self-intersections please use
7108                     CheckSelfIntersections() method.
7109
7110             Returns:   
7111                 New GEOM.GEOM_Object, containing the result shape.
7112             
7113             """
7114             # Example: see GEOM_TestOthers.py
7115             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
7116             RaiseIfFailed("MakeCutList", self.BoolOp)
7117             self._autoPublish(anObj, theName, "cut")
7118             return anObj
7119
7120         # end of l3_boolean
7121         ## @}
7122
7123         ## @addtogroup l3_basic_op
7124         ## @{
7125
7126         ## Perform partition operation.
7127         #  @param ListShapes Shapes to be intersected.
7128         #  @param ListTools Shapes to intersect theShapes.
7129         #  @param Limit Type of resulting shapes (see ShapeType()).\n
7130         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
7131         #         type will be detected automatically.
7132         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
7133         #                             target type (equal to Limit) are kept in the result,
7134         #                             else standalone shapes of lower dimension
7135         #                             are kept also (if they exist).
7136         #
7137         #  @param theName Object name; when specified, this parameter is used
7138         #         for result publication in the study. Otherwise, if automatic
7139         #         publication is switched on, default value is used for result name.
7140         #
7141         #  @note Each compound from ListShapes and ListTools will be exploded
7142         #        in order to avoid possible intersection between shapes from this compound.
7143         #
7144         #  After implementation new version of PartitionAlgo (October 2006)
7145         #  other parameters are ignored by current functionality. They are kept
7146         #  in this function only for support old versions.
7147         #      @param ListKeepInside Shapes, outside which the results will be deleted.
7148         #         Each shape from theKeepInside must belong to theShapes also.
7149         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
7150         #         Each shape from theRemoveInside must belong to theShapes also.
7151         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
7152         #      @param ListMaterials Material indices for each shape. Make sence,
7153         #         only if theRemoveWebs is TRUE.
7154         #
7155         #  @return New GEOM.GEOM_Object, containing the result shapes.
7156         #
7157         #  @ref tui_partition "Example"
7158         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7159                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7160                           KeepNonlimitShapes=0, theName=None):
7161             """
7162             Perform partition operation.
7163
7164             Parameters: 
7165                 ListShapes Shapes to be intersected.
7166                 ListTools Shapes to intersect theShapes.
7167                 Limit Type of resulting shapes (see geompy.ShapeType)
7168                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
7169                       type will be detected automatically.
7170                 KeepNonlimitShapes if this parameter == 0, then only shapes of
7171                                     target type (equal to Limit) are kept in the result,
7172                                     else standalone shapes of lower dimension
7173                                     are kept also (if they exist).
7174
7175                 theName Object name; when specified, this parameter is used
7176                         for result publication in the study. Otherwise, if automatic
7177                         publication is switched on, default value is used for result name.
7178             Note:
7179                     Each compound from ListShapes and ListTools will be exploded
7180                     in order to avoid possible intersection between shapes from
7181                     this compound.
7182                     
7183             After implementation new version of PartitionAlgo (October 2006) other
7184             parameters are ignored by current functionality. They are kept in this
7185             function only for support old versions.
7186             
7187             Ignored parameters:
7188                 ListKeepInside Shapes, outside which the results will be deleted.
7189                                Each shape from theKeepInside must belong to theShapes also.
7190                 ListRemoveInside Shapes, inside which the results will be deleted.
7191                                  Each shape from theRemoveInside must belong to theShapes also.
7192                 RemoveWebs If TRUE, perform Glue 3D algorithm.
7193                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
7194
7195             Returns:   
7196                 New GEOM.GEOM_Object, containing the result shapes.
7197             """
7198             # Example: see GEOM_TestAll.py
7199             if Limit == self.ShapeType["AUTO"]:
7200                 # automatic detection of the most appropriate shape limit type
7201                 lim = GEOM.SHAPE
7202                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7203                 Limit = EnumToLong(lim)
7204                 pass
7205             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
7206                                               ListKeepInside, ListRemoveInside,
7207                                               Limit, RemoveWebs, ListMaterials,
7208                                               KeepNonlimitShapes);
7209             RaiseIfFailed("MakePartition", self.BoolOp)
7210             self._autoPublish(anObj, theName, "partition")
7211             return anObj
7212
7213         ## Perform partition operation.
7214         #  This method may be useful if it is needed to make a partition for
7215         #  compound contains nonintersected shapes. Performance will be better
7216         #  since intersection between shapes from compound is not performed.
7217         #
7218         #  Description of all parameters as in previous method MakePartition().
7219         #  One additional parameter is provided:
7220         #  @param checkSelfInte The flag that tells if the arguments should
7221         #         be checked for self-intersection prior to the operation.
7222         #
7223         #  @note This algorithm doesn't find all types of self-intersections.
7224         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7225         #        vertex/face and edge/face intersections. Face/face
7226         #        intersections detection is switched off as it is a
7227         #        time-consuming operation that gives an impact on performance.
7228         #        To find all self-intersections please use
7229         #        CheckSelfIntersections() method.
7230         #
7231         #  @note Passed compounds (via ListShapes or via ListTools)
7232         #           have to consist of nonintersecting shapes.
7233         #
7234         #  @return New GEOM.GEOM_Object, containing the result shapes.
7235         #
7236         #  @ref swig_todo "Example"
7237         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
7238                                                  ListKeepInside=[], ListRemoveInside=[],
7239                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
7240                                                  ListMaterials=[], KeepNonlimitShapes=0,
7241                                                  checkSelfInte=False, theName=None):
7242             """
7243             Perform partition operation.
7244             This method may be useful if it is needed to make a partition for
7245             compound contains nonintersected shapes. Performance will be better
7246             since intersection between shapes from compound is not performed.
7247
7248             Parameters: 
7249                 Description of all parameters as in method geompy.MakePartition.
7250                 One additional parameter is provided:
7251                 checkSelfInte The flag that tells if the arguments should
7252                               be checked for self-intersection prior to
7253                               the operation.
7254
7255             Note:
7256                     This algorithm doesn't find all types of self-intersections.
7257                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7258                     vertex/face and edge/face intersections. Face/face
7259                     intersections detection is switched off as it is a
7260                     time-consuming operation that gives an impact on performance.
7261                     To find all self-intersections please use
7262                     CheckSelfIntersections() method.
7263         
7264             NOTE:
7265                 Passed compounds (via ListShapes or via ListTools)
7266                 have to consist of nonintersecting shapes.
7267
7268             Returns:   
7269                 New GEOM.GEOM_Object, containing the result shapes.
7270             """
7271             if Limit == self.ShapeType["AUTO"]:
7272                 # automatic detection of the most appropriate shape limit type
7273                 lim = GEOM.SHAPE
7274                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7275                 Limit = EnumToLong(lim)
7276                 pass
7277             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
7278                                                                      ListKeepInside, ListRemoveInside,
7279                                                                      Limit, RemoveWebs, ListMaterials,
7280                                                                      KeepNonlimitShapes, checkSelfInte);
7281             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
7282             self._autoPublish(anObj, theName, "partition")
7283             return anObj
7284
7285         ## See method MakePartition() for more information.
7286         #
7287         #  @ref tui_partition "Example 1"
7288         #  \n @ref swig_Partition "Example 2"
7289         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7290                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7291                       KeepNonlimitShapes=0, theName=None):
7292             """
7293             See method geompy.MakePartition for more information.
7294             """
7295             # Example: see GEOM_TestOthers.py
7296             # note: auto-publishing is done in self.MakePartition()
7297             anObj = self.MakePartition(ListShapes, ListTools,
7298                                        ListKeepInside, ListRemoveInside,
7299                                        Limit, RemoveWebs, ListMaterials,
7300                                        KeepNonlimitShapes, theName);
7301             return anObj
7302
7303         ## Perform partition of the Shape with the Plane
7304         #  @param theShape Shape to be intersected.
7305         #  @param thePlane Tool shape, to intersect theShape.
7306         #  @param theName Object name; when specified, this parameter is used
7307         #         for result publication in the study. Otherwise, if automatic
7308         #         publication is switched on, default value is used for result name.
7309         #
7310         #  @return New GEOM.GEOM_Object, containing the result shape.
7311         #
7312         #  @ref tui_partition "Example"
7313         def MakeHalfPartition(self, theShape, thePlane, theName=None):
7314             """
7315             Perform partition of the Shape with the Plane
7316
7317             Parameters: 
7318                 theShape Shape to be intersected.
7319                 thePlane Tool shape, to intersect theShape.
7320                 theName Object name; when specified, this parameter is used
7321                         for result publication in the study. Otherwise, if automatic
7322                         publication is switched on, default value is used for result name.
7323
7324             Returns:  
7325                 New GEOM.GEOM_Object, containing the result shape.
7326             """
7327             # Example: see GEOM_TestAll.py
7328             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
7329             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7330             self._autoPublish(anObj, theName, "partition")
7331             return anObj
7332
7333         # end of l3_basic_op
7334         ## @}
7335
7336         ## @addtogroup l3_transform
7337         ## @{
7338
7339         ## Translate the given object along the vector, specified
7340         #  by its end points.
7341         #  @param theObject The object to be translated.
7342         #  @param thePoint1 Start point of translation vector.
7343         #  @param thePoint2 End point of translation vector.
7344         #  @param theCopy Flag used to translate object itself or create a copy.
7345         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7346         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7347         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7348             """
7349             Translate the given object along the vector, specified by its end points.
7350
7351             Parameters: 
7352                 theObject The object to be translated.
7353                 thePoint1 Start point of translation vector.
7354                 thePoint2 End point of translation vector.
7355                 theCopy Flag used to translate object itself or create a copy.
7356
7357             Returns: 
7358                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7359                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7360             """
7361             if theCopy:
7362                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7363             else:
7364                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7365             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7366             return anObj
7367
7368         ## Translate the given object along the vector, specified
7369         #  by its end points, creating its copy before the translation.
7370         #  @param theObject The object to be translated.
7371         #  @param thePoint1 Start point of translation vector.
7372         #  @param thePoint2 End point of translation vector.
7373         #  @param theName Object name; when specified, this parameter is used
7374         #         for result publication in the study. Otherwise, if automatic
7375         #         publication is switched on, default value is used for result name.
7376         #
7377         #  @return New GEOM.GEOM_Object, containing the translated object.
7378         #
7379         #  @ref tui_translation "Example 1"
7380         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7381         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7382             """
7383             Translate the given object along the vector, specified
7384             by its end points, creating its copy before the translation.
7385
7386             Parameters: 
7387                 theObject The object to be translated.
7388                 thePoint1 Start point of translation vector.
7389                 thePoint2 End point of translation vector.
7390                 theName Object name; when specified, this parameter is used
7391                         for result publication in the study. Otherwise, if automatic
7392                         publication is switched on, default value is used for result name.
7393
7394             Returns:  
7395                 New GEOM.GEOM_Object, containing the translated object.
7396             """
7397             # Example: see GEOM_TestAll.py
7398             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7399             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7400             self._autoPublish(anObj, theName, "translated")
7401             return anObj
7402
7403         ## Translate the given object along the vector, specified by its components.
7404         #  @param theObject The object to be translated.
7405         #  @param theDX,theDY,theDZ Components of translation vector.
7406         #  @param theCopy Flag used to translate object itself or create a copy.
7407         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7408         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7409         #
7410         #  @ref tui_translation "Example"
7411         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7412             """
7413             Translate the given object along the vector, specified by its components.
7414
7415             Parameters: 
7416                 theObject The object to be translated.
7417                 theDX,theDY,theDZ Components of translation vector.
7418                 theCopy Flag used to translate object itself or create a copy.
7419
7420             Returns: 
7421                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7422                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7423             """
7424             # Example: see GEOM_TestAll.py
7425             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7426             if theCopy:
7427                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7428             else:
7429                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7430             anObj.SetParameters(Parameters)
7431             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7432             return anObj
7433
7434         ## Translate the given object along the vector, specified
7435         #  by its components, creating its copy before the translation.
7436         #  @param theObject The object to be translated.
7437         #  @param theDX,theDY,theDZ Components of translation vector.
7438         #  @param theName Object name; when specified, this parameter is used
7439         #         for result publication in the study. Otherwise, if automatic
7440         #         publication is switched on, default value is used for result name.
7441         #
7442         #  @return New GEOM.GEOM_Object, containing the translated object.
7443         #
7444         #  @ref tui_translation "Example"
7445         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7446             """
7447             Translate the given object along the vector, specified
7448             by its components, creating its copy before the translation.
7449
7450             Parameters: 
7451                 theObject The object to be translated.
7452                 theDX,theDY,theDZ Components of translation vector.
7453                 theName Object name; when specified, this parameter is used
7454                         for result publication in the study. Otherwise, if automatic
7455                         publication is switched on, default value is used for result name.
7456
7457             Returns: 
7458                 New GEOM.GEOM_Object, containing the translated object.
7459             """
7460             # Example: see GEOM_TestAll.py
7461             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7462             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7463             anObj.SetParameters(Parameters)
7464             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7465             self._autoPublish(anObj, theName, "translated")
7466             return anObj
7467
7468         ## Translate the given object along the given vector.
7469         #  @param theObject The object to be translated.
7470         #  @param theVector The translation vector.
7471         #  @param theCopy Flag used to translate object itself or create a copy.
7472         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7473         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7474         def TranslateVector(self, theObject, theVector, theCopy=False):
7475             """
7476             Translate the given object along the given vector.
7477
7478             Parameters: 
7479                 theObject The object to be translated.
7480                 theVector The translation vector.
7481                 theCopy Flag used to translate object itself or create a copy.
7482
7483             Returns: 
7484                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7485                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7486             """
7487             if theCopy:
7488                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7489             else:
7490                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7491             RaiseIfFailed("TranslateVector", self.TrsfOp)
7492             return anObj
7493
7494         ## Translate the given object along the given vector,
7495         #  creating its copy before the translation.
7496         #  @param theObject The object to be translated.
7497         #  @param theVector The translation vector.
7498         #  @param theName Object name; when specified, this parameter is used
7499         #         for result publication in the study. Otherwise, if automatic
7500         #         publication is switched on, default value is used for result name.
7501         #
7502         #  @return New GEOM.GEOM_Object, containing the translated object.
7503         #
7504         #  @ref tui_translation "Example"
7505         def MakeTranslationVector(self, theObject, theVector, theName=None):
7506             """
7507             Translate the given object along the given vector,
7508             creating its copy before the translation.
7509
7510             Parameters: 
7511                 theObject The object to be translated.
7512                 theVector The translation vector.
7513                 theName Object name; when specified, this parameter is used
7514                         for result publication in the study. Otherwise, if automatic
7515                         publication is switched on, default value is used for result name.
7516
7517             Returns: 
7518                 New GEOM.GEOM_Object, containing the translated object.
7519             """
7520             # Example: see GEOM_TestAll.py
7521             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7522             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7523             self._autoPublish(anObj, theName, "translated")
7524             return anObj
7525
7526         ## Translate the given object along the given vector on given distance.
7527         #  @param theObject The object to be translated.
7528         #  @param theVector The translation vector.
7529         #  @param theDistance The translation distance.
7530         #  @param theCopy Flag used to translate object itself or create a copy.
7531         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7532         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7533         #
7534         #  @ref tui_translation "Example"
7535         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7536             """
7537             Translate the given object along the given vector on given distance.
7538
7539             Parameters: 
7540                 theObject The object to be translated.
7541                 theVector The translation vector.
7542                 theDistance The translation distance.
7543                 theCopy Flag used to translate object itself or create a copy.
7544
7545             Returns: 
7546                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7547                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7548             """
7549             # Example: see GEOM_TestAll.py
7550             theDistance,Parameters = ParseParameters(theDistance)
7551             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7552             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7553             anObj.SetParameters(Parameters)
7554             return anObj
7555
7556         ## Translate the given object along the given vector on given distance,
7557         #  creating its copy before the translation.
7558         #  @param theObject The object to be translated.
7559         #  @param theVector The translation vector.
7560         #  @param theDistance The translation distance.
7561         #  @param theName Object name; when specified, this parameter is used
7562         #         for result publication in the study. Otherwise, if automatic
7563         #         publication is switched on, default value is used for result name.
7564         #
7565         #  @return New GEOM.GEOM_Object, containing the translated object.
7566         #
7567         #  @ref tui_translation "Example"
7568         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7569             """
7570             Translate the given object along the given vector on given distance,
7571             creating its copy before the translation.
7572
7573             Parameters:
7574                 theObject The object to be translated.
7575                 theVector The translation vector.
7576                 theDistance The translation distance.
7577                 theName Object name; when specified, this parameter is used
7578                         for result publication in the study. Otherwise, if automatic
7579                         publication is switched on, default value is used for result name.
7580
7581             Returns: 
7582                 New GEOM.GEOM_Object, containing the translated object.
7583             """
7584             # Example: see GEOM_TestAll.py
7585             theDistance,Parameters = ParseParameters(theDistance)
7586             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7587             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7588             anObj.SetParameters(Parameters)
7589             self._autoPublish(anObj, theName, "translated")
7590             return anObj
7591
7592         ## Rotate the given object around the given axis on the given angle.
7593         #  @param theObject The object to be rotated.
7594         #  @param theAxis Rotation axis.
7595         #  @param theAngle Rotation angle in radians.
7596         #  @param theCopy Flag used to rotate object itself or create a copy.
7597         #
7598         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7599         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7600         #
7601         #  @ref tui_rotation "Example"
7602         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7603             """
7604             Rotate the given object around the given axis on the given angle.
7605
7606             Parameters:
7607                 theObject The object to be rotated.
7608                 theAxis Rotation axis.
7609                 theAngle Rotation angle in radians.
7610                 theCopy Flag used to rotate object itself or create a copy.
7611
7612             Returns:
7613                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7614                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7615             """
7616             # Example: see GEOM_TestAll.py
7617             flag = False
7618             if isinstance(theAngle,str):
7619                 flag = True
7620             theAngle, Parameters = ParseParameters(theAngle)
7621             if flag:
7622                 theAngle = theAngle*math.pi/180.0
7623             if theCopy:
7624                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7625             else:
7626                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7627             RaiseIfFailed("Rotate", self.TrsfOp)
7628             anObj.SetParameters(Parameters)
7629             return anObj
7630
7631         ## Rotate the given object around the given axis
7632         #  on the given angle, creating its copy before the rotatation.
7633         #  @param theObject The object to be rotated.
7634         #  @param theAxis Rotation axis.
7635         #  @param theAngle Rotation angle in radians.
7636         #  @param theName Object name; when specified, this parameter is used
7637         #         for result publication in the study. Otherwise, if automatic
7638         #         publication is switched on, default value is used for result name.
7639         #
7640         #  @return New GEOM.GEOM_Object, containing the rotated object.
7641         #
7642         #  @ref tui_rotation "Example"
7643         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7644             """
7645             Rotate the given object around the given axis
7646             on the given angle, creating its copy before the rotatation.
7647
7648             Parameters:
7649                 theObject The object to be rotated.
7650                 theAxis Rotation axis.
7651                 theAngle Rotation angle in radians.
7652                 theName Object name; when specified, this parameter is used
7653                         for result publication in the study. Otherwise, if automatic
7654                         publication is switched on, default value is used for result name.
7655
7656             Returns:
7657                 New GEOM.GEOM_Object, containing the rotated object.
7658             """
7659             # Example: see GEOM_TestAll.py
7660             flag = False
7661             if isinstance(theAngle,str):
7662                 flag = True
7663             theAngle, Parameters = ParseParameters(theAngle)
7664             if flag:
7665                 theAngle = theAngle*math.pi/180.0
7666             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7667             RaiseIfFailed("RotateCopy", self.TrsfOp)
7668             anObj.SetParameters(Parameters)
7669             self._autoPublish(anObj, theName, "rotated")
7670             return anObj
7671
7672         ## Rotate given object around vector perpendicular to plane
7673         #  containing three points.
7674         #  @param theObject The object to be rotated.
7675         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7676         #  containing the three points.
7677         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7678         #  @param theCopy Flag used to rotate object itself or create a copy.
7679         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7680         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7681         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7682             """
7683             Rotate given object around vector perpendicular to plane
7684             containing three points.
7685
7686             Parameters:
7687                 theObject The object to be rotated.
7688                 theCentPoint central point  the axis is the vector perpendicular to the plane
7689                              containing the three points.
7690                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7691                 theCopy Flag used to rotate object itself or create a copy.
7692
7693             Returns:
7694                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7695                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7696             """
7697             if theCopy:
7698                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7699             else:
7700                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7701             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7702             return anObj
7703
7704         ## Rotate given object around vector perpendicular to plane
7705         #  containing three points, creating its copy before the rotatation.
7706         #  @param theObject The object to be rotated.
7707         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7708         #  containing the three points.
7709         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7710         #  @param theName Object name; when specified, this parameter is used
7711         #         for result publication in the study. Otherwise, if automatic
7712         #         publication is switched on, default value is used for result name.
7713         #
7714         #  @return New GEOM.GEOM_Object, containing the rotated object.
7715         #
7716         #  @ref tui_rotation "Example"
7717         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
7718             """
7719             Rotate given object around vector perpendicular to plane
7720             containing three points, creating its copy before the rotatation.
7721
7722             Parameters:
7723                 theObject The object to be rotated.
7724                 theCentPoint central point  the axis is the vector perpendicular to the plane
7725                              containing the three points.
7726                 thePoint1,thePoint2  in a perpendicular plane of the axis.
7727                 theName Object name; when specified, this parameter is used
7728                         for result publication in the study. Otherwise, if automatic
7729                         publication is switched on, default value is used for result name.
7730
7731             Returns:
7732                 New GEOM.GEOM_Object, containing the rotated object.
7733             """
7734             # Example: see GEOM_TestAll.py
7735             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7736             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
7737             self._autoPublish(anObj, theName, "rotated")
7738             return anObj
7739
7740         ## Scale the given object by the specified factor.
7741         #  @param theObject The object to be scaled.
7742         #  @param thePoint Center point for scaling.
7743         #                  Passing None for it means scaling relatively the origin of global CS.
7744         #  @param theFactor Scaling factor value.
7745         #  @param theCopy Flag used to scale object itself or create a copy.
7746         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7747         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7748         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
7749             """
7750             Scale the given object by the specified factor.
7751
7752             Parameters:
7753                 theObject The object to be scaled.
7754                 thePoint Center point for scaling.
7755                          Passing None for it means scaling relatively the origin of global CS.
7756                 theFactor Scaling factor value.
7757                 theCopy Flag used to scale object itself or create a copy.
7758
7759             Returns:    
7760                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7761                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7762             """
7763             # Example: see GEOM_TestAll.py
7764             theFactor, Parameters = ParseParameters(theFactor)
7765             if theCopy:
7766                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7767             else:
7768                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
7769             RaiseIfFailed("Scale", self.TrsfOp)
7770             anObj.SetParameters(Parameters)
7771             return anObj
7772
7773         ## Scale the given object by the factor, creating its copy before the scaling.
7774         #  @param theObject The object to be scaled.
7775         #  @param thePoint Center point for scaling.
7776         #                  Passing None for it means scaling relatively the origin of global CS.
7777         #  @param theFactor Scaling factor value.
7778         #  @param theName Object name; when specified, this parameter is used
7779         #         for result publication in the study. Otherwise, if automatic
7780         #         publication is switched on, default value is used for result name.
7781         #
7782         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7783         #
7784         #  @ref tui_scale "Example"
7785         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
7786             """
7787             Scale the given object by the factor, creating its copy before the scaling.
7788
7789             Parameters:
7790                 theObject The object to be scaled.
7791                 thePoint Center point for scaling.
7792                          Passing None for it means scaling relatively the origin of global CS.
7793                 theFactor Scaling factor value.
7794                 theName Object name; when specified, this parameter is used
7795                         for result publication in the study. Otherwise, if automatic
7796                         publication is switched on, default value is used for result name.
7797
7798             Returns:    
7799                 New GEOM.GEOM_Object, containing the scaled shape.
7800             """
7801             # Example: see GEOM_TestAll.py
7802             theFactor, Parameters = ParseParameters(theFactor)
7803             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7804             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
7805             anObj.SetParameters(Parameters)
7806             self._autoPublish(anObj, theName, "scaled")
7807             return anObj
7808
7809         ## Scale the given object by different factors along coordinate axes.
7810         #  @param theObject The object to be scaled.
7811         #  @param thePoint Center point for scaling.
7812         #                  Passing None for it means scaling relatively the origin of global CS.
7813         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7814         #  @param theCopy Flag used to scale object itself or create a copy.
7815         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7816         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7817         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
7818             """
7819             Scale the given object by different factors along coordinate axes.
7820
7821             Parameters:
7822                 theObject The object to be scaled.
7823                 thePoint Center point for scaling.
7824                             Passing None for it means scaling relatively the origin of global CS.
7825                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7826                 theCopy Flag used to scale object itself or create a copy.
7827
7828             Returns:    
7829                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7830                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7831             """
7832             # Example: see GEOM_TestAll.py
7833             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7834             if theCopy:
7835                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7836                                                             theFactorX, theFactorY, theFactorZ)
7837             else:
7838                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
7839                                                         theFactorX, theFactorY, theFactorZ)
7840             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
7841             anObj.SetParameters(Parameters)
7842             return anObj
7843
7844         ## Scale the given object by different factors along coordinate axes,
7845         #  creating its copy before the scaling.
7846         #  @param theObject The object to be scaled.
7847         #  @param thePoint Center point for scaling.
7848         #                  Passing None for it means scaling relatively the origin of global CS.
7849         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7850         #  @param theName Object name; when specified, this parameter is used
7851         #         for result publication in the study. Otherwise, if automatic
7852         #         publication is switched on, default value is used for result name.
7853         #
7854         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7855         #
7856         #  @ref swig_scale "Example"
7857         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
7858             """
7859             Scale the given object by different factors along coordinate axes,
7860             creating its copy before the scaling.
7861
7862             Parameters:
7863                 theObject The object to be scaled.
7864                 thePoint Center point for scaling.
7865                             Passing None for it means scaling relatively the origin of global CS.
7866                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7867                 theName Object name; when specified, this parameter is used
7868                         for result publication in the study. Otherwise, if automatic
7869                         publication is switched on, default value is used for result name.
7870
7871             Returns:
7872                 New GEOM.GEOM_Object, containing the scaled shape.
7873             """
7874             # Example: see GEOM_TestAll.py
7875             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7876             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7877                                                         theFactorX, theFactorY, theFactorZ)
7878             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
7879             anObj.SetParameters(Parameters)
7880             self._autoPublish(anObj, theName, "scaled")
7881             return anObj
7882
7883         ## Mirror an object relatively the given plane.
7884         #  @param theObject The object to be mirrored.
7885         #  @param thePlane Plane of symmetry.
7886         #  @param theCopy Flag used to mirror object itself or create a copy.
7887         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7888         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7889         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
7890             """
7891             Mirror an object relatively the given plane.
7892
7893             Parameters:
7894                 theObject The object to be mirrored.
7895                 thePlane Plane of symmetry.
7896                 theCopy Flag used to mirror object itself or create a copy.
7897
7898             Returns:
7899                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7900                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7901             """
7902             if theCopy:
7903                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7904             else:
7905                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
7906             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
7907             return anObj
7908
7909         ## Create an object, symmetrical
7910         #  to the given one relatively the given plane.
7911         #  @param theObject The object to be mirrored.
7912         #  @param thePlane Plane of symmetry.
7913         #  @param theName Object name; when specified, this parameter is used
7914         #         for result publication in the study. Otherwise, if automatic
7915         #         publication is switched on, default value is used for result name.
7916         #
7917         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7918         #
7919         #  @ref tui_mirror "Example"
7920         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
7921             """
7922             Create an object, symmetrical to the given one relatively the given plane.
7923
7924             Parameters:
7925                 theObject The object to be mirrored.
7926                 thePlane Plane of symmetry.
7927                 theName Object name; when specified, this parameter is used
7928                         for result publication in the study. Otherwise, if automatic
7929                         publication is switched on, default value is used for result name.
7930
7931             Returns:
7932                 New GEOM.GEOM_Object, containing the mirrored shape.
7933             """
7934             # Example: see GEOM_TestAll.py
7935             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7936             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
7937             self._autoPublish(anObj, theName, "mirrored")
7938             return anObj
7939
7940         ## Mirror an object relatively the given axis.
7941         #  @param theObject The object to be mirrored.
7942         #  @param theAxis Axis of symmetry.
7943         #  @param theCopy Flag used to mirror object itself or create a copy.
7944         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7945         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7946         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
7947             """
7948             Mirror an object relatively the given axis.
7949
7950             Parameters:
7951                 theObject The object to be mirrored.
7952                 theAxis Axis of symmetry.
7953                 theCopy Flag used to mirror object itself or create a copy.
7954
7955             Returns:
7956                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7957                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7958             """
7959             if theCopy:
7960                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7961             else:
7962                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
7963             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
7964             return anObj
7965
7966         ## Create an object, symmetrical
7967         #  to the given one relatively the given axis.
7968         #  @param theObject The object to be mirrored.
7969         #  @param theAxis Axis of symmetry.
7970         #  @param theName Object name; when specified, this parameter is used
7971         #         for result publication in the study. Otherwise, if automatic
7972         #         publication is switched on, default value is used for result name.
7973         #
7974         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7975         #
7976         #  @ref tui_mirror "Example"
7977         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
7978             """
7979             Create an object, symmetrical to the given one relatively the given axis.
7980
7981             Parameters:
7982                 theObject The object to be mirrored.
7983                 theAxis Axis of symmetry.
7984                 theName Object name; when specified, this parameter is used
7985                         for result publication in the study. Otherwise, if automatic
7986                         publication is switched on, default value is used for result name.
7987
7988             Returns: 
7989                 New GEOM.GEOM_Object, containing the mirrored shape.
7990             """
7991             # Example: see GEOM_TestAll.py
7992             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7993             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
7994             self._autoPublish(anObj, theName, "mirrored")
7995             return anObj
7996
7997         ## Mirror an object relatively the given point.
7998         #  @param theObject The object to be mirrored.
7999         #  @param thePoint Point of symmetry.
8000         #  @param theCopy Flag used to mirror object itself or create a copy.
8001         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8002         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8003         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
8004             """
8005             Mirror an object relatively the given point.
8006
8007             Parameters:
8008                 theObject The object to be mirrored.
8009                 thePoint Point of symmetry.
8010                 theCopy Flag used to mirror object itself or create a copy.
8011
8012             Returns:
8013                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8014                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8015             """
8016             # Example: see GEOM_TestAll.py
8017             if theCopy:
8018                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8019             else:
8020                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
8021             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
8022             return anObj
8023
8024         ## Create an object, symmetrical
8025         #  to the given one relatively the given point.
8026         #  @param theObject The object to be mirrored.
8027         #  @param thePoint Point of symmetry.
8028         #  @param theName Object name; when specified, this parameter is used
8029         #         for result publication in the study. Otherwise, if automatic
8030         #         publication is switched on, default value is used for result name.
8031         #
8032         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8033         #
8034         #  @ref tui_mirror "Example"
8035         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
8036             """
8037             Create an object, symmetrical
8038             to the given one relatively the given point.
8039
8040             Parameters:
8041                 theObject The object to be mirrored.
8042                 thePoint Point of symmetry.
8043                 theName Object name; when specified, this parameter is used
8044                         for result publication in the study. Otherwise, if automatic
8045                         publication is switched on, default value is used for result name.
8046
8047             Returns:  
8048                 New GEOM.GEOM_Object, containing the mirrored shape.
8049             """
8050             # Example: see GEOM_TestAll.py
8051             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8052             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
8053             self._autoPublish(anObj, theName, "mirrored")
8054             return anObj
8055
8056         ## Modify the location of the given object.
8057         #  @param theObject The object to be displaced.
8058         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8059         #                     If \a theStartLCS is NULL, displacement
8060         #                     will be performed from global CS.\n
8061         #                     If \a theObject itself is used as \a theStartLCS,
8062         #                     its location will be changed to \a theEndLCS.
8063         #  @param theEndLCS Coordinate system to perform displacement to it.
8064         #  @param theCopy Flag used to displace object itself or create a copy.
8065         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8066         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
8067         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
8068             """
8069             Modify the Location of the given object by LCS, creating its copy before the setting.
8070
8071             Parameters:
8072                 theObject The object to be displaced.
8073                 theStartLCS Coordinate system to perform displacement from it.
8074                             If theStartLCS is NULL, displacement
8075                             will be performed from global CS.
8076                             If theObject itself is used as theStartLCS,
8077                             its location will be changed to theEndLCS.
8078                 theEndLCS Coordinate system to perform displacement to it.
8079                 theCopy Flag used to displace object itself or create a copy.
8080
8081             Returns:
8082                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8083                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
8084             """
8085             # Example: see GEOM_TestAll.py
8086             if theCopy:
8087                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8088             else:
8089                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
8090             RaiseIfFailed("Displace", self.TrsfOp)
8091             return anObj
8092
8093         ## Modify the Location of the given object by LCS,
8094         #  creating its copy before the setting.
8095         #  @param theObject The object to be displaced.
8096         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8097         #                     If \a theStartLCS is NULL, displacement
8098         #                     will be performed from global CS.\n
8099         #                     If \a theObject itself is used as \a theStartLCS,
8100         #                     its location will be changed to \a theEndLCS.
8101         #  @param theEndLCS Coordinate system to perform displacement to it.
8102         #  @param theName Object name; when specified, this parameter is used
8103         #         for result publication in the study. Otherwise, if automatic
8104         #         publication is switched on, default value is used for result name.
8105         #
8106         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8107         #
8108         #  @ref tui_modify_location "Example"
8109         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
8110             """
8111             Modify the Location of the given object by LCS, creating its copy before the setting.
8112
8113             Parameters:
8114                 theObject The object to be displaced.
8115                 theStartLCS Coordinate system to perform displacement from it.
8116                             If theStartLCS is NULL, displacement
8117                             will be performed from global CS.
8118                             If theObject itself is used as theStartLCS,
8119                             its location will be changed to theEndLCS.
8120                 theEndLCS Coordinate system to perform displacement to it.
8121                 theName Object name; when specified, this parameter is used
8122                         for result publication in the study. Otherwise, if automatic
8123                         publication is switched on, default value is used for result name.
8124
8125             Returns:  
8126                 New GEOM.GEOM_Object, containing the displaced shape.
8127
8128             Example of usage:
8129                 # create local coordinate systems
8130                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
8131                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
8132                 # modify the location of the given object
8133                 position = geompy.MakePosition(cylinder, cs1, cs2)
8134             """
8135             # Example: see GEOM_TestAll.py
8136             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8137             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
8138             self._autoPublish(anObj, theName, "displaced")
8139             return anObj
8140
8141         ## Modify the Location of the given object by Path.
8142         #  @param  theObject The object to be displaced.
8143         #  @param  thePath Wire or Edge along that the object will be translated.
8144         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
8145         #  @param  theCopy is to create a copy objects if true.
8146         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
8147         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
8148         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
8149         #
8150         #  @ref tui_modify_location "Example"
8151         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
8152             """
8153             Modify the Location of the given object by Path.
8154
8155             Parameters:
8156                  theObject The object to be displaced.
8157                  thePath Wire or Edge along that the object will be translated.
8158                  theDistance progress of Path (0 = start location, 1 = end of path location).
8159                  theCopy is to create a copy objects if true.
8160                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8161
8162             Returns:  
8163                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
8164                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
8165
8166             Example of usage:
8167                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
8168             """
8169             # Example: see GEOM_TestAll.py
8170             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
8171             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8172             return anObj
8173
8174         ## Modify the Location of the given object by Path, creating its copy before the operation.
8175         #  @param theObject The object to be displaced.
8176         #  @param thePath Wire or Edge along that the object will be translated.
8177         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
8178         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
8179         #  @param theName Object name; when specified, this parameter is used
8180         #         for result publication in the study. Otherwise, if automatic
8181         #         publication is switched on, default value is used for result name.
8182         #
8183         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8184         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
8185             """
8186             Modify the Location of the given object by Path, creating its copy before the operation.
8187
8188             Parameters:
8189                  theObject The object to be displaced.
8190                  thePath Wire or Edge along that the object will be translated.
8191                  theDistance progress of Path (0 = start location, 1 = end of path location).
8192                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8193                  theName Object name; when specified, this parameter is used
8194                          for result publication in the study. Otherwise, if automatic
8195                          publication is switched on, default value is used for result name.
8196
8197             Returns:  
8198                 New GEOM.GEOM_Object, containing the displaced shape.
8199             """
8200             # Example: see GEOM_TestAll.py
8201             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
8202             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8203             self._autoPublish(anObj, theName, "displaced")
8204             return anObj
8205
8206         ## Offset given shape.
8207         #  @param theObject The base object for the offset.
8208         #  @param theOffset Offset value.
8209         #  @param theCopy Flag used to offset object itself or create a copy.
8210         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8211         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
8212         def Offset(self, theObject, theOffset, theCopy=False):
8213             """
8214             Offset given shape.
8215
8216             Parameters:
8217                 theObject The base object for the offset.
8218                 theOffset Offset value.
8219                 theCopy Flag used to offset object itself or create a copy.
8220
8221             Returns: 
8222                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8223                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
8224             """
8225             theOffset, Parameters = ParseParameters(theOffset)
8226             if theCopy:
8227                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8228             else:
8229                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
8230             RaiseIfFailed("Offset", self.TrsfOp)
8231             anObj.SetParameters(Parameters)
8232             return anObj
8233
8234         ## Create new object as offset of the given one.
8235         #  @param theObject The base object for the offset.
8236         #  @param theOffset Offset value.
8237         #  @param theName Object name; when specified, this parameter is used
8238         #         for result publication in the study. Otherwise, if automatic
8239         #         publication is switched on, default value is used for result name.
8240         #
8241         #  @return New GEOM.GEOM_Object, containing the offset object.
8242         #
8243         #  @ref tui_offset "Example"
8244         def MakeOffset(self, theObject, theOffset, theName=None):
8245             """
8246             Create new object as offset of the given one.
8247
8248             Parameters:
8249                 theObject The base object for the offset.
8250                 theOffset Offset value.
8251                 theName Object name; when specified, this parameter is used
8252                         for result publication in the study. Otherwise, if automatic
8253                         publication is switched on, default value is used for result name.
8254
8255             Returns:  
8256                 New GEOM.GEOM_Object, containing the offset object.
8257
8258             Example of usage:
8259                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
8260                  # create a new object as offset of the given object
8261                  offset = geompy.MakeOffset(box, 70.)
8262             """
8263             # Example: see GEOM_TestAll.py
8264             theOffset, Parameters = ParseParameters(theOffset)
8265             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8266             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
8267             anObj.SetParameters(Parameters)
8268             self._autoPublish(anObj, theName, "offset")
8269             return anObj
8270
8271         ## Create new object as projection of the given one on a 2D surface.
8272         #  @param theSource The source object for the projection. It can be a point, edge or wire.
8273         #  @param theTarget The target object. It can be planar or cylindrical face.
8274         #  @param theName Object name; when specified, this parameter is used
8275         #         for result publication in the study. Otherwise, if automatic
8276         #         publication is switched on, default value is used for result name.
8277         #
8278         #  @return New GEOM.GEOM_Object, containing the projection.
8279         #
8280         #  @ref tui_projection "Example"
8281         def MakeProjection(self, theSource, theTarget, theName=None):
8282             """
8283             Create new object as projection of the given one on a 2D surface.
8284
8285             Parameters:
8286                 theSource The source object for the projection. It can be a point, edge or wire.
8287                 theTarget The target object. It can be planar or cylindrical face.
8288                 theName Object name; when specified, this parameter is used
8289                         for result publication in the study. Otherwise, if automatic
8290                         publication is switched on, default value is used for result name.
8291
8292             Returns:  
8293                 New GEOM.GEOM_Object, containing the projection.
8294             """
8295             # Example: see GEOM_TestAll.py
8296             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
8297             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
8298             self._autoPublish(anObj, theName, "projection")
8299             return anObj
8300             
8301         ## Create a projection projection of the given point on a wire or an edge.
8302         #  If there are no solutions or there are 2 or more solutions It throws an
8303         #  exception.
8304         #  @param thePoint the point to be projected.
8305         #  @param theWire the wire. The edge is accepted as well.
8306         #  @param theName Object name; when specified, this parameter is used
8307         #         for result publication in the study. Otherwise, if automatic
8308         #         publication is switched on, default value is used for result name.
8309         #
8310         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
8311         #  \n \a u: The parameter of projection point on edge.
8312         #  \n \a PointOnEdge: The projection point.
8313         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
8314         #
8315         #  @ref tui_projection "Example"
8316         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
8317             """
8318             Create a projection projection of the given point on a wire or an edge.
8319             If there are no solutions or there are 2 or more solutions It throws an
8320             exception.
8321             
8322             Parameters:
8323                 thePoint the point to be projected.
8324                 theWire the wire. The edge is accepted as well.
8325                 theName Object name; when specified, this parameter is used
8326                         for result publication in the study. Otherwise, if automatic
8327                         publication is switched on, default value is used for result name.
8328           
8329             Returns:
8330                 [u, PointOnEdge, EdgeInWireIndex]
8331                  u: The parameter of projection point on edge.
8332                  PointOnEdge: The projection point.
8333                  EdgeInWireIndex: The index of an edge in a wire.
8334             """
8335             # Example: see GEOM_TestAll.py
8336             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
8337             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
8338             self._autoPublish(anObj[1], theName, "projection")
8339             return anObj
8340
8341         # -----------------------------------------------------------------------------
8342         # Patterns
8343         # -----------------------------------------------------------------------------
8344
8345         ## Translate the given object along the given vector a given number times
8346         #  @param theObject The object to be translated.
8347         #  @param theVector Direction of the translation. DX if None.
8348         #  @param theStep Distance to translate on.
8349         #  @param theNbTimes Quantity of translations to be done.
8350         #  @param theName Object name; when specified, this parameter is used
8351         #         for result publication in the study. Otherwise, if automatic
8352         #         publication is switched on, default value is used for result name.
8353         #
8354         #  @return New GEOM.GEOM_Object, containing compound of all
8355         #          the shapes, obtained after each translation.
8356         #
8357         #  @ref tui_multi_translation "Example"
8358         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
8359             """
8360             Translate the given object along the given vector a given number times
8361
8362             Parameters:
8363                 theObject The object to be translated.
8364                 theVector Direction of the translation. DX if None.
8365                 theStep Distance to translate on.
8366                 theNbTimes Quantity of translations to be done.
8367                 theName Object name; when specified, this parameter is used
8368                         for result publication in the study. Otherwise, if automatic
8369                         publication is switched on, default value is used for result name.
8370
8371             Returns:     
8372                 New GEOM.GEOM_Object, containing compound of all
8373                 the shapes, obtained after each translation.
8374
8375             Example of usage:
8376                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
8377             """
8378             # Example: see GEOM_TestAll.py
8379             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
8380             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
8381             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
8382             anObj.SetParameters(Parameters)
8383             self._autoPublish(anObj, theName, "multitranslation")
8384             return anObj
8385
8386         ## Conseqently apply two specified translations to theObject specified number of times.
8387         #  @param theObject The object to be translated.
8388         #  @param theVector1 Direction of the first translation. DX if None.
8389         #  @param theStep1 Step of the first translation.
8390         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
8391         #  @param theVector2 Direction of the second translation. DY if None.
8392         #  @param theStep2 Step of the second translation.
8393         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
8394         #  @param theName Object name; when specified, this parameter is used
8395         #         for result publication in the study. Otherwise, if automatic
8396         #         publication is switched on, default value is used for result name.
8397         #
8398         #  @return New GEOM.GEOM_Object, containing compound of all
8399         #          the shapes, obtained after each translation.
8400         #
8401         #  @ref tui_multi_translation "Example"
8402         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8403                                    theVector2, theStep2, theNbTimes2, theName=None):
8404             """
8405             Conseqently apply two specified translations to theObject specified number of times.
8406
8407             Parameters:
8408                 theObject The object to be translated.
8409                 theVector1 Direction of the first translation. DX if None.
8410                 theStep1 Step of the first translation.
8411                 theNbTimes1 Quantity of translations to be done along theVector1.
8412                 theVector2 Direction of the second translation. DY if None.
8413                 theStep2 Step of the second translation.
8414                 theNbTimes2 Quantity of translations to be done along theVector2.
8415                 theName Object name; when specified, this parameter is used
8416                         for result publication in the study. Otherwise, if automatic
8417                         publication is switched on, default value is used for result name.
8418
8419             Returns:
8420                 New GEOM.GEOM_Object, containing compound of all
8421                 the shapes, obtained after each translation.
8422
8423             Example of usage:
8424                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8425             """
8426             # Example: see GEOM_TestAll.py
8427             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8428             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8429                                                  theVector2, theStep2, theNbTimes2)
8430             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8431             anObj.SetParameters(Parameters)
8432             self._autoPublish(anObj, theName, "multitranslation")
8433             return anObj
8434
8435         ## Rotate the given object around the given axis a given number times.
8436         #  Rotation angle will be 2*PI/theNbTimes.
8437         #  @param theObject The object to be rotated.
8438         #  @param theAxis The rotation axis. DZ if None.
8439         #  @param theNbTimes Quantity of rotations to be done.
8440         #  @param theName Object name; when specified, this parameter is used
8441         #         for result publication in the study. Otherwise, if automatic
8442         #         publication is switched on, default value is used for result name.
8443         #
8444         #  @return New GEOM.GEOM_Object, containing compound of all the
8445         #          shapes, obtained after each rotation.
8446         #
8447         #  @ref tui_multi_rotation "Example"
8448         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8449             """
8450             Rotate the given object around the given axis a given number times.
8451             Rotation angle will be 2*PI/theNbTimes.
8452
8453             Parameters:
8454                 theObject The object to be rotated.
8455                 theAxis The rotation axis. DZ if None.
8456                 theNbTimes Quantity of rotations to be done.
8457                 theName Object name; when specified, this parameter is used
8458                         for result publication in the study. Otherwise, if automatic
8459                         publication is switched on, default value is used for result name.
8460
8461             Returns:     
8462                 New GEOM.GEOM_Object, containing compound of all the
8463                 shapes, obtained after each rotation.
8464
8465             Example of usage:
8466                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8467             """
8468             # Example: see GEOM_TestAll.py
8469             theNbTimes, Parameters = ParseParameters(theNbTimes)
8470             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8471             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8472             anObj.SetParameters(Parameters)
8473             self._autoPublish(anObj, theName, "multirotation")
8474             return anObj
8475
8476         ## Rotate the given object around the given axis
8477         #  a given number times on the given angle.
8478         #  @param theObject The object to be rotated.
8479         #  @param theAxis The rotation axis. DZ if None.
8480         #  @param theAngleStep Rotation angle in radians.
8481         #  @param theNbTimes Quantity of rotations to be done.
8482         #  @param theName Object name; when specified, this parameter is used
8483         #         for result publication in the study. Otherwise, if automatic
8484         #         publication is switched on, default value is used for result name.
8485         #
8486         #  @return New GEOM.GEOM_Object, containing compound of all the
8487         #          shapes, obtained after each rotation.
8488         #
8489         #  @ref tui_multi_rotation "Example"
8490         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8491             """
8492             Rotate the given object around the given axis
8493             a given number times on the given angle.
8494
8495             Parameters:
8496                 theObject The object to be rotated.
8497                 theAxis The rotation axis. DZ if None.
8498                 theAngleStep Rotation angle in radians.
8499                 theNbTimes Quantity of rotations to be done.
8500                 theName Object name; when specified, this parameter is used
8501                         for result publication in the study. Otherwise, if automatic
8502                         publication is switched on, default value is used for result name.
8503
8504             Returns:     
8505                 New GEOM.GEOM_Object, containing compound of all the
8506                 shapes, obtained after each rotation.
8507
8508             Example of usage:
8509                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8510             """
8511             # Example: see GEOM_TestAll.py
8512             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8513             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8514             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8515             anObj.SetParameters(Parameters)
8516             self._autoPublish(anObj, theName, "multirotation")
8517             return anObj
8518
8519         ## Rotate the given object around the given axis a given
8520         #  number times and multi-translate each rotation result.
8521         #  Rotation angle will be 2*PI/theNbTimes1.
8522         #  Translation direction passes through center of gravity
8523         #  of rotated shape and its projection on the rotation axis.
8524         #  @param theObject The object to be rotated.
8525         #  @param theAxis Rotation axis. DZ if None.
8526         #  @param theNbTimes1 Quantity of rotations to be done.
8527         #  @param theRadialStep Translation distance.
8528         #  @param theNbTimes2 Quantity of translations to be done.
8529         #  @param theName Object name; when specified, this parameter is used
8530         #         for result publication in the study. Otherwise, if automatic
8531         #         publication is switched on, default value is used for result name.
8532         #
8533         #  @return New GEOM.GEOM_Object, containing compound of all the
8534         #          shapes, obtained after each transformation.
8535         #
8536         #  @ref tui_multi_rotation "Example"
8537         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8538             """
8539             Rotate the given object around the
8540             given axis on the given angle a given number
8541             times and multi-translate each rotation result.
8542             Translation direction passes through center of gravity
8543             of rotated shape and its projection on the rotation axis.
8544
8545             Parameters:
8546                 theObject The object to be rotated.
8547                 theAxis Rotation axis. DZ if None.
8548                 theNbTimes1 Quantity of rotations to be done.
8549                 theRadialStep Translation distance.
8550                 theNbTimes2 Quantity of translations to be done.
8551                 theName Object name; when specified, this parameter is used
8552                         for result publication in the study. Otherwise, if automatic
8553                         publication is switched on, default value is used for result name.
8554
8555             Returns:    
8556                 New GEOM.GEOM_Object, containing compound of all the
8557                 shapes, obtained after each transformation.
8558
8559             Example of usage:
8560                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8561             """
8562             # Example: see GEOM_TestAll.py
8563             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8564             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8565             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8566             anObj.SetParameters(Parameters)
8567             self._autoPublish(anObj, theName, "multirotation")
8568             return anObj
8569
8570         ## Rotate the given object around the
8571         #  given axis on the given angle a given number
8572         #  times and multi-translate each rotation result.
8573         #  Translation direction passes through center of gravity
8574         #  of rotated shape and its projection on the rotation axis.
8575         #  @param theObject The object to be rotated.
8576         #  @param theAxis Rotation axis. DZ if None.
8577         #  @param theAngleStep Rotation angle in radians.
8578         #  @param theNbTimes1 Quantity of rotations to be done.
8579         #  @param theRadialStep Translation distance.
8580         #  @param theNbTimes2 Quantity of translations to be done.
8581         #  @param theName Object name; when specified, this parameter is used
8582         #         for result publication in the study. Otherwise, if automatic
8583         #         publication is switched on, default value is used for result name.
8584         #
8585         #  @return New GEOM.GEOM_Object, containing compound of all the
8586         #          shapes, obtained after each transformation.
8587         #
8588         #  @ref tui_multi_rotation "Example"
8589         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8590             """
8591             Rotate the given object around the
8592             given axis on the given angle a given number
8593             times and multi-translate each rotation result.
8594             Translation direction passes through center of gravity
8595             of rotated shape and its projection on the rotation axis.
8596
8597             Parameters:
8598                 theObject The object to be rotated.
8599                 theAxis Rotation axis. DZ if None.
8600                 theAngleStep Rotation angle in radians.
8601                 theNbTimes1 Quantity of rotations to be done.
8602                 theRadialStep Translation distance.
8603                 theNbTimes2 Quantity of translations to be done.
8604                 theName Object name; when specified, this parameter is used
8605                         for result publication in the study. Otherwise, if automatic
8606                         publication is switched on, default value is used for result name.
8607
8608             Returns:    
8609                 New GEOM.GEOM_Object, containing compound of all the
8610                 shapes, obtained after each transformation.
8611
8612             Example of usage:
8613                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8614             """
8615             # Example: see GEOM_TestAll.py
8616             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8617             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8618             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8619             anObj.SetParameters(Parameters)
8620             self._autoPublish(anObj, theName, "multirotation")
8621             return anObj
8622
8623         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8624         #
8625         #  @ref swig_MakeMultiRotation "Example"
8626         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8627             """
8628             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8629
8630             Example of usage:
8631                 pz = geompy.MakeVertex(0, 0, 100)
8632                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8633                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8634             """
8635             # Example: see GEOM_TestOthers.py
8636             aVec = self.MakeLine(aPoint,aDir)
8637             # note: auto-publishing is done in self.MultiRotate1D()
8638             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8639             return anObj
8640
8641         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8642         #
8643         #  @ref swig_MakeMultiRotation "Example"
8644         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8645             """
8646             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8647
8648             Example of usage:
8649                 pz = geompy.MakeVertex(0, 0, 100)
8650                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8651                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8652             """
8653             # Example: see GEOM_TestOthers.py
8654             aVec = self.MakeLine(aPoint,aDir)
8655             # note: auto-publishing is done in self.MultiRotate1D()
8656             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8657             return anObj
8658
8659         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8660         #
8661         #  @ref swig_MakeMultiRotation "Example"
8662         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8663             """
8664             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8665             
8666             Example of usage:
8667                 pz = geompy.MakeVertex(0, 0, 100)
8668                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8669                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8670             """
8671             # Example: see GEOM_TestOthers.py
8672             aVec = self.MakeLine(aPoint,aDir)
8673             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8674             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8675             return anObj
8676
8677         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8678         #
8679         #  @ref swig_MakeMultiRotation "Example"
8680         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8681             """
8682             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8683             
8684             Example of usage:
8685                 pz = geompy.MakeVertex(0, 0, 100)
8686                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8687                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8688             """
8689             # Example: see GEOM_TestOthers.py
8690             aVec = self.MakeLine(aPoint,aDir)
8691             # note: auto-publishing is done in self.MultiRotate2D()
8692             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8693             return anObj
8694
8695         # end of l3_transform
8696         ## @}
8697
8698         ## @addtogroup l3_transform_d
8699         ## @{
8700
8701         ## Deprecated method. Use MultiRotate1DNbTimes instead.
8702         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
8703             """
8704             Deprecated method. Use MultiRotate1DNbTimes instead.
8705             """
8706             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
8707             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
8708
8709         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8710         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8711         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
8712             """
8713             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8714             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8715
8716             Example of usage:
8717                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8718             """
8719             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
8720             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
8721             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
8722             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
8723             anObj.SetParameters(Parameters)
8724             self._autoPublish(anObj, theName, "multirotation")
8725             return anObj
8726
8727         ## The same, as MultiRotate1D(), but axis is given by direction and point
8728         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8729         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8730             """
8731             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
8732             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8733
8734             Example of usage:
8735                 pz = geompy.MakeVertex(0, 0, 100)
8736                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8737                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
8738             """
8739             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
8740             aVec = self.MakeLine(aPoint,aDir)
8741             # note: auto-publishing is done in self.MultiRotate1D()
8742             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
8743             return anObj
8744
8745         ## The same, as MultiRotate2D(), but axis is given by direction and point
8746         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8747         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8748             """
8749             The same, as MultiRotate2D(), but axis is given by direction and point
8750             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8751             
8752             Example of usage:
8753                 pz = geompy.MakeVertex(0, 0, 100)
8754                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8755                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
8756             """
8757             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
8758             aVec = self.MakeLine(aPoint,aDir)
8759             # note: auto-publishing is done in self.MultiRotate2D()
8760             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8761             return anObj
8762
8763         # end of l3_transform_d
8764         ## @}
8765
8766         ## @addtogroup l3_local
8767         ## @{
8768
8769         ## Perform a fillet on all edges of the given shape.
8770         #  @param theShape Shape, to perform fillet on.
8771         #  @param theR Fillet radius.
8772         #  @param theName Object name; when specified, this parameter is used
8773         #         for result publication in the study. Otherwise, if automatic
8774         #         publication is switched on, default value is used for result name.
8775         #
8776         #  @return New GEOM.GEOM_Object, containing the result shape.
8777         #
8778         #  @ref tui_fillet "Example 1"
8779         #  \n @ref swig_MakeFilletAll "Example 2"
8780         def MakeFilletAll(self, theShape, theR, theName=None):
8781             """
8782             Perform a fillet on all edges of the given shape.
8783
8784             Parameters:
8785                 theShape Shape, to perform fillet on.
8786                 theR Fillet radius.
8787                 theName Object name; when specified, this parameter is used
8788                         for result publication in the study. Otherwise, if automatic
8789                         publication is switched on, default value is used for result name.
8790
8791             Returns: 
8792                 New GEOM.GEOM_Object, containing the result shape.
8793
8794             Example of usage: 
8795                filletall = geompy.MakeFilletAll(prism, 10.)
8796             """
8797             # Example: see GEOM_TestOthers.py
8798             theR,Parameters = ParseParameters(theR)
8799             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
8800             RaiseIfFailed("MakeFilletAll", self.LocalOp)
8801             anObj.SetParameters(Parameters)
8802             self._autoPublish(anObj, theName, "fillet")
8803             return anObj
8804
8805         ## Perform a fillet on the specified edges/faces of the given shape
8806         #  @param theShape Shape, to perform fillet on.
8807         #  @param theR Fillet radius.
8808         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
8809         #  @param theListShapes Global indices of edges/faces to perform fillet on.
8810         #  @param theName Object name; when specified, this parameter is used
8811         #         for result publication in the study. Otherwise, if automatic
8812         #         publication is switched on, default value is used for result name.
8813         #
8814         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8815         #
8816         #  @return New GEOM.GEOM_Object, containing the result shape.
8817         #
8818         #  @ref tui_fillet "Example"
8819         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
8820             """
8821             Perform a fillet on the specified edges/faces of the given shape
8822
8823             Parameters:
8824                 theShape Shape, to perform fillet on.
8825                 theR Fillet radius.
8826                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
8827                 theListShapes Global indices of edges/faces to perform fillet on.
8828                 theName Object name; when specified, this parameter is used
8829                         for result publication in the study. Otherwise, if automatic
8830                         publication is switched on, default value is used for result name.
8831
8832             Note:
8833                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8834
8835             Returns: 
8836                 New GEOM.GEOM_Object, containing the result shape.
8837
8838             Example of usage:
8839                 # get the list of IDs (IDList) for the fillet
8840                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8841                 IDlist_e = []
8842                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8843                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8844                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8845                 # make a fillet on the specified edges of the given shape
8846                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
8847             """
8848             # Example: see GEOM_TestAll.py
8849             theR,Parameters = ParseParameters(theR)
8850             anObj = None
8851             if theShapeType == self.ShapeType["EDGE"]:
8852                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
8853                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
8854             else:
8855                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
8856                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
8857             anObj.SetParameters(Parameters)
8858             self._autoPublish(anObj, theName, "fillet")
8859             return anObj
8860
8861         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
8862         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
8863             """
8864             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
8865
8866             Example of usage:
8867                 # get the list of IDs (IDList) for the fillet
8868                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8869                 IDlist_e = []
8870                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8871                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8872                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8873                 # make a fillet on the specified edges of the given shape
8874                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
8875             """
8876             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
8877             anObj = None
8878             if theShapeType == self.ShapeType["EDGE"]:
8879                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
8880                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
8881             else:
8882                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
8883                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
8884             anObj.SetParameters(Parameters)
8885             self._autoPublish(anObj, theName, "fillet")
8886             return anObj
8887
8888         ## Perform a fillet on the specified edges of the given shape
8889         #  @param theShape  Wire Shape to perform fillet on.
8890         #  @param theR  Fillet radius.
8891         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8892         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
8893         #    \note The list of vertices could be empty,
8894         #          in this case fillet will done done at all vertices in wire
8895         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
8896         #         by the length of the edges, nearest to the fillet vertex.
8897         #         But sometimes the next edge is C1 continuous with the one, nearest to
8898         #         the fillet point, and such two (or more) edges can be united to allow
8899         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
8900         #         thus ignoring the secant vertex (vertices).
8901         #  @param 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         #  @return New GEOM.GEOM_Object, containing the result shape.
8906         #
8907         #  @ref tui_fillet2d "Example"
8908         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
8909             """
8910             Perform a fillet on the specified edges of the given shape
8911
8912             Parameters:
8913                 theShape  Wire Shape to perform fillet on.
8914                 theR  Fillet radius.
8915                 theListOfVertexes Global indices of vertexes to perform fillet on.
8916                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
8917                     by the length of the edges, nearest to the fillet vertex.
8918                     But sometimes the next edge is C1 continuous with the one, nearest to
8919                     the fillet point, and such two (or more) edges can be united to allow
8920                     bigger radius. Set this flag to TRUE to allow collinear edges union,
8921                     thus ignoring the secant vertex (vertices).
8922                 theName Object name; when specified, this parameter is used
8923                         for result publication in the study. Otherwise, if automatic
8924                         publication is switched on, default value is used for result name.
8925             Note:
8926                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8927
8928                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
8929
8930             Returns: 
8931                 New GEOM.GEOM_Object, containing the result shape.
8932
8933             Example of usage:  
8934                 # create wire
8935                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
8936                 # make fillet at given wire vertices with giver radius
8937                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
8938             """
8939             # Example: see GEOM_TestAll.py
8940             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
8941             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
8942             RaiseIfFailed("MakeFillet1D", self.LocalOp)
8943             anObj.SetParameters(Parameters)
8944             self._autoPublish(anObj, theName, "fillet")
8945             return anObj
8946
8947         ## Perform a fillet at the specified vertices of the given face/shell.
8948         #  @param theShape Face or Shell shape to perform fillet on.
8949         #  @param theR Fillet radius.
8950         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8951         #  @param theName Object name; when specified, this parameter is used
8952         #         for result publication in the study. Otherwise, if automatic
8953         #         publication is switched on, default value is used for result name.
8954         #
8955         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8956         #
8957         #  @return New GEOM.GEOM_Object, containing the result shape.
8958         #
8959         #  @ref tui_fillet2d "Example"
8960         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
8961             """
8962             Perform a fillet at the specified vertices of the given face/shell.
8963
8964             Parameters:
8965                 theShape  Face or Shell shape to perform fillet on.
8966                 theR  Fillet radius.
8967                 theListOfVertexes Global indices of vertexes to perform fillet on.
8968                 theName Object name; when specified, this parameter is used
8969                         for result publication in the study. Otherwise, if automatic
8970                         publication is switched on, default value is used for result name.
8971             Note:
8972                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8973
8974             Returns: 
8975                 New GEOM.GEOM_Object, containing the result shape.
8976
8977             Example of usage:
8978                 face = geompy.MakeFaceHW(100, 100, 1)
8979                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
8980             """
8981             # Example: see GEOM_TestAll.py
8982             theR,Parameters = ParseParameters(theR)
8983             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
8984             RaiseIfFailed("MakeFillet2D", self.LocalOp)
8985             anObj.SetParameters(Parameters)
8986             self._autoPublish(anObj, theName, "fillet")
8987             return anObj
8988
8989         ## Perform a symmetric chamfer on all edges of the given shape.
8990         #  @param theShape Shape, to perform chamfer on.
8991         #  @param theD Chamfer size along each face.
8992         #  @param theName Object name; when specified, this parameter is used
8993         #         for result publication in the study. Otherwise, if automatic
8994         #         publication is switched on, default value is used for result name.
8995         #
8996         #  @return New GEOM.GEOM_Object, containing the result shape.
8997         #
8998         #  @ref tui_chamfer "Example 1"
8999         #  \n @ref swig_MakeChamferAll "Example 2"
9000         def MakeChamferAll(self, theShape, theD, theName=None):
9001             """
9002             Perform a symmetric chamfer on all edges of the given shape.
9003
9004             Parameters:
9005                 theShape Shape, to perform chamfer on.
9006                 theD Chamfer size along each face.
9007                 theName Object name; when specified, this parameter is used
9008                         for result publication in the study. Otherwise, if automatic
9009                         publication is switched on, default value is used for result name.
9010
9011             Returns:     
9012                 New GEOM.GEOM_Object, containing the result shape.
9013
9014             Example of usage:
9015                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
9016             """
9017             # Example: see GEOM_TestOthers.py
9018             theD,Parameters = ParseParameters(theD)
9019             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
9020             RaiseIfFailed("MakeChamferAll", self.LocalOp)
9021             anObj.SetParameters(Parameters)
9022             self._autoPublish(anObj, theName, "chamfer")
9023             return anObj
9024
9025         ## Perform a chamfer on edges, common to the specified faces,
9026         #  with distance D1 on the Face1
9027         #  @param theShape Shape, to perform chamfer on.
9028         #  @param theD1 Chamfer size along \a theFace1.
9029         #  @param theD2 Chamfer size along \a theFace2.
9030         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9031         #  @param theName Object name; when specified, this parameter is used
9032         #         for result publication in the study. Otherwise, if automatic
9033         #         publication is switched on, default value is used for result name.
9034         #
9035         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9036         #
9037         #  @return New GEOM.GEOM_Object, containing the result shape.
9038         #
9039         #  @ref tui_chamfer "Example"
9040         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
9041             """
9042             Perform a chamfer on edges, common to the specified faces,
9043             with distance D1 on the Face1
9044
9045             Parameters:
9046                 theShape Shape, to perform chamfer on.
9047                 theD1 Chamfer size along theFace1.
9048                 theD2 Chamfer size along theFace2.
9049                 theFace1,theFace2 Global indices of two faces of theShape.
9050                 theName Object name; when specified, this parameter is used
9051                         for result publication in the study. Otherwise, if automatic
9052                         publication is switched on, default value is used for result name.
9053
9054             Note:
9055                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9056
9057             Returns:      
9058                 New GEOM.GEOM_Object, containing the result shape.
9059
9060             Example of usage:
9061                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9062                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9063                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9064                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
9065             """
9066             # Example: see GEOM_TestAll.py
9067             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9068             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
9069             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
9070             anObj.SetParameters(Parameters)
9071             self._autoPublish(anObj, theName, "chamfer")
9072             return anObj
9073
9074         ## Perform a chamfer on edges
9075         #  @param theShape Shape, to perform chamfer on.
9076         #  @param theD Chamfer length
9077         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9078         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9079         #  @param theName Object name; when specified, this parameter is used
9080         #         for result publication in the study. Otherwise, if automatic
9081         #         publication is switched on, default value is used for result name.
9082         #
9083         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9084         #
9085         #  @return New GEOM.GEOM_Object, containing the result shape.
9086         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
9087             """
9088             Perform a chamfer on edges
9089
9090             Parameters:
9091                 theShape Shape, to perform chamfer on.
9092                 theD1 Chamfer size along theFace1.
9093                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
9094                 theFace1,theFace2 Global indices of two faces of theShape.
9095                 theName Object name; when specified, this parameter is used
9096                         for result publication in the study. Otherwise, if automatic
9097                         publication is switched on, default value is used for result name.
9098
9099             Note:
9100                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9101
9102             Returns:      
9103                 New GEOM.GEOM_Object, containing the result shape.
9104
9105             Example of usage:
9106                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9107                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9108                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9109                 ang = 30
9110                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
9111             """
9112             flag = False
9113             if isinstance(theAngle,str):
9114                 flag = True
9115             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9116             if flag:
9117                 theAngle = theAngle*math.pi/180.0
9118             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
9119             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
9120             anObj.SetParameters(Parameters)
9121             self._autoPublish(anObj, theName, "chamfer")
9122             return anObj
9123
9124         ## Perform a chamfer on all edges of the specified faces,
9125         #  with distance D1 on the first specified face (if several for one edge)
9126         #  @param theShape Shape, to perform chamfer on.
9127         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
9128         #               connected to the edge, are in \a theFaces, \a theD1
9129         #               will be get along face, which is nearer to \a theFaces beginning.
9130         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
9131         #  @param theFaces Sequence of global indices of faces of \a theShape.
9132         #  @param theName Object name; when specified, this parameter is used
9133         #         for result publication in the study. Otherwise, if automatic
9134         #         publication is switched on, default value is used for result name.
9135         #
9136         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9137         #
9138         #  @return New GEOM.GEOM_Object, containing the result shape.
9139         #
9140         #  @ref tui_chamfer "Example"
9141         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
9142             """
9143             Perform a chamfer on all edges of the specified faces,
9144             with distance D1 on the first specified face (if several for one edge)
9145
9146             Parameters:
9147                 theShape Shape, to perform chamfer on.
9148                 theD1 Chamfer size along face from  theFaces. If both faces,
9149                       connected to the edge, are in theFaces, theD1
9150                       will be get along face, which is nearer to theFaces beginning.
9151                 theD2 Chamfer size along another of two faces, connected to the edge.
9152                 theFaces Sequence of global indices of faces of theShape.
9153                 theName Object name; when specified, this parameter is used
9154                         for result publication in the study. Otherwise, if automatic
9155                         publication is switched on, default value is used for result name.
9156                 
9157             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
9158
9159             Returns:  
9160                 New GEOM.GEOM_Object, containing the result shape.
9161             """
9162             # Example: see GEOM_TestAll.py
9163             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9164             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
9165             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
9166             anObj.SetParameters(Parameters)
9167             self._autoPublish(anObj, theName, "chamfer")
9168             return anObj
9169
9170         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
9171         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9172         #
9173         #  @ref swig_FilletChamfer "Example"
9174         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
9175             """
9176             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
9177             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9178             """
9179             flag = False
9180             if isinstance(theAngle,str):
9181                 flag = True
9182             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9183             if flag:
9184                 theAngle = theAngle*math.pi/180.0
9185             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
9186             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
9187             anObj.SetParameters(Parameters)
9188             self._autoPublish(anObj, theName, "chamfer")
9189             return anObj
9190
9191         ## Perform a chamfer on edges,
9192         #  with distance D1 on the first specified face (if several for one edge)
9193         #  @param theShape Shape, to perform chamfer on.
9194         #  @param theD1,theD2 Chamfer size
9195         #  @param theEdges Sequence of edges of \a theShape.
9196         #  @param theName Object name; when specified, this parameter is used
9197         #         for result publication in the study. Otherwise, if automatic
9198         #         publication is switched on, default value is used for result name.
9199         #
9200         #  @return New GEOM.GEOM_Object, containing the result shape.
9201         #
9202         #  @ref swig_FilletChamfer "Example"
9203         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
9204             """
9205             Perform a chamfer on edges,
9206             with distance D1 on the first specified face (if several for one edge)
9207             
9208             Parameters:
9209                 theShape Shape, to perform chamfer on.
9210                 theD1,theD2 Chamfer size
9211                 theEdges Sequence of edges of theShape.
9212                 theName Object name; when specified, this parameter is used
9213                         for result publication in the study. Otherwise, if automatic
9214                         publication is switched on, default value is used for result name.
9215
9216             Returns:
9217                 New GEOM.GEOM_Object, containing the result shape.
9218             """
9219             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9220             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
9221             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
9222             anObj.SetParameters(Parameters)
9223             self._autoPublish(anObj, theName, "chamfer")
9224             return anObj
9225
9226         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
9227         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9228         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
9229             """
9230             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
9231             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9232             """
9233             flag = False
9234             if isinstance(theAngle,str):
9235                 flag = True
9236             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9237             if flag:
9238                 theAngle = theAngle*math.pi/180.0
9239             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
9240             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
9241             anObj.SetParameters(Parameters)
9242             self._autoPublish(anObj, theName, "chamfer")
9243             return anObj
9244
9245         ## @sa MakeChamferEdge(), MakeChamferFaces()
9246         #
9247         #  @ref swig_MakeChamfer "Example"
9248         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
9249             """
9250             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
9251             """
9252             # Example: see GEOM_TestOthers.py
9253             anObj = None
9254             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
9255             if aShapeType == self.ShapeType["EDGE"]:
9256                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
9257             else:
9258                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
9259             return anObj
9260             
9261         ## Remove material from a solid by extrusion of the base shape on the given distance.
9262         #  @param theInit Shape to remove material from. It must be a solid or 
9263         #  a compound made of a single solid.
9264         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9265         #  @param theH Prism dimension along the normal to theBase
9266         #  @param theAngle Draft angle in degrees.
9267         #  @param theName Object name; when specified, this parameter is used
9268         #         for result publication in the study. Otherwise, if automatic
9269         #         publication is switched on, default value is used for result name.
9270         #
9271         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
9272         #
9273         #  @ref tui_creation_prism "Example"
9274         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
9275             """
9276             Add material to a solid by extrusion of the base shape on the given distance.
9277
9278             Parameters:
9279                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
9280                 theBase Closed edge or wire defining the base shape to be extruded.
9281                 theH Prism dimension along the normal  to theBase
9282                 theAngle Draft angle in degrees.
9283                 theName Object name; when specified, this parameter is used
9284                         for result publication in the study. Otherwise, if automatic
9285                         publication is switched on, default value is used for result name.
9286
9287             Returns:
9288                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
9289             """
9290             # Example: see GEOM_TestAll.py
9291             #theH,Parameters = ParseParameters(theH)
9292             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
9293             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9294             #anObj.SetParameters(Parameters)
9295             self._autoPublish(anObj, theName, "extrudedCut")
9296             return anObj   
9297             
9298         ## Add material to a solid by extrusion of the base shape on the given distance.
9299         #  @param theInit Shape to add material to. It must be a solid or 
9300         #  a compound made of a single solid.
9301         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9302         #  @param theH Prism dimension along the normal to theBase
9303         #  @param theAngle Draft angle in degrees.
9304         #  @param theName Object name; when specified, this parameter is used
9305         #         for result publication in the study. Otherwise, if automatic
9306         #         publication is switched on, default value is used for result name.
9307         #
9308         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
9309         #
9310         #  @ref tui_creation_prism "Example"
9311         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
9312             """
9313             Add material to a solid by extrusion of the base shape on the given distance.
9314
9315             Parameters:
9316                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
9317                 theBase Closed edge or wire defining the base shape to be extruded.
9318                 theH Prism dimension along the normal  to theBase
9319                 theAngle Draft angle in degrees.
9320                 theName Object name; when specified, this parameter is used
9321                         for result publication in the study. Otherwise, if automatic
9322                         publication is switched on, default value is used for result name.
9323
9324             Returns:
9325                 New GEOM.GEOM_Object,  containing the initial shape with added material.
9326             """
9327             # Example: see GEOM_TestAll.py
9328             #theH,Parameters = ParseParameters(theH)
9329             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
9330             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9331             #anObj.SetParameters(Parameters)
9332             self._autoPublish(anObj, theName, "extrudedBoss")
9333             return anObj   
9334
9335         # end of l3_local
9336         ## @}
9337
9338         ## @addtogroup l3_basic_op
9339         ## @{
9340
9341         ## Perform an Archimde operation on the given shape with given parameters.
9342         #  The object presenting the resulting face is returned.
9343         #  @param theShape Shape to be put in water.
9344         #  @param theWeight Weight og the shape.
9345         #  @param theWaterDensity Density of the water.
9346         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
9347         #  @param theName Object name; when specified, this parameter is used
9348         #         for result publication in the study. Otherwise, if automatic
9349         #         publication is switched on, default value is used for result name.
9350         #
9351         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
9352         #          by a plane, corresponding to water level.
9353         #
9354         #  @ref tui_archimede "Example"
9355         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
9356             """
9357             Perform an Archimde operation on the given shape with given parameters.
9358             The object presenting the resulting face is returned.
9359
9360             Parameters: 
9361                 theShape Shape to be put in water.
9362                 theWeight Weight og the shape.
9363                 theWaterDensity Density of the water.
9364                 theMeshDeflection Deflection of the mesh, using to compute the section.
9365                 theName Object name; when specified, this parameter is used
9366                         for result publication in the study. Otherwise, if automatic
9367                         publication is switched on, default value is used for result name.
9368
9369             Returns: 
9370                 New GEOM.GEOM_Object, containing a section of theShape
9371                 by a plane, corresponding to water level.
9372             """
9373             # Example: see GEOM_TestAll.py
9374             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
9375               theWeight,theWaterDensity,theMeshDeflection)
9376             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
9377             RaiseIfFailed("MakeArchimede", self.LocalOp)
9378             anObj.SetParameters(Parameters)
9379             self._autoPublish(anObj, theName, "archimede")
9380             return anObj
9381
9382         # end of l3_basic_op
9383         ## @}
9384
9385         ## @addtogroup l2_measure
9386         ## @{
9387
9388         ## Get point coordinates
9389         #  @return [x, y, z]
9390         #
9391         #  @ref tui_measurement_tools_page "Example"
9392         def PointCoordinates(self,Point):
9393             """
9394             Get point coordinates
9395
9396             Returns:
9397                 [x, y, z]
9398             """
9399             # Example: see GEOM_TestMeasures.py
9400             aTuple = self.MeasuOp.PointCoordinates(Point)
9401             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9402             return aTuple 
9403         
9404         ## Get vector coordinates
9405         #  @return [x, y, z]
9406         #
9407         #  @ref tui_measurement_tools_page "Example"
9408         def VectorCoordinates(self,Vector):
9409             """
9410             Get vector coordinates
9411
9412             Returns:
9413                 [x, y, z]
9414             """
9415
9416             p1=self.GetFirstVertex(Vector)
9417             p2=self.GetLastVertex(Vector)
9418             
9419             X1=self.PointCoordinates(p1)
9420             X2=self.PointCoordinates(p2)
9421
9422             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9423
9424
9425         ## Compute cross product
9426         #  @return vector w=u^v
9427         #
9428         #  @ref tui_measurement_tools_page "Example"
9429         def CrossProduct(self, Vector1, Vector2):
9430             """ 
9431             Compute cross product
9432             
9433             Returns: vector w=u^v
9434             """
9435             u=self.VectorCoordinates(Vector1)
9436             v=self.VectorCoordinates(Vector2)
9437             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])
9438             
9439             return w
9440         
9441         ## Compute cross product
9442         #  @return dot product  p=u.v
9443         #
9444         #  @ref tui_measurement_tools_page "Example"
9445         def DotProduct(self, Vector1, Vector2):
9446             """ 
9447             Compute cross product
9448             
9449             Returns: dot product  p=u.v
9450             """
9451             u=self.VectorCoordinates(Vector1)
9452             v=self.VectorCoordinates(Vector2)
9453             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9454             
9455             return p
9456
9457
9458         ## Get summarized length of all wires,
9459         #  area of surface and volume of the given shape.
9460         #  @param theShape Shape to define properties of.
9461         #  @return [theLength, theSurfArea, theVolume]\n
9462         #  theLength:   Summarized length of all wires of the given shape.\n
9463         #  theSurfArea: Area of surface of the given shape.\n
9464         #  theVolume:   Volume of the given shape.
9465         #
9466         #  @ref tui_measurement_tools_page "Example"
9467         def BasicProperties(self,theShape):
9468             """
9469             Get summarized length of all wires,
9470             area of surface and volume of the given shape.
9471
9472             Parameters: 
9473                 theShape Shape to define properties of.
9474
9475             Returns:
9476                 [theLength, theSurfArea, theVolume]
9477                  theLength:   Summarized length of all wires of the given shape.
9478                  theSurfArea: Area of surface of the given shape.
9479                  theVolume:   Volume of the given shape.
9480             """
9481             # Example: see GEOM_TestMeasures.py
9482             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9483             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9484             return aTuple
9485
9486         ## Get parameters of bounding box of the given shape
9487         #  @param theShape Shape to obtain bounding box of.
9488         #  @param precise TRUE for precise computation; FALSE for fast one.
9489         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9490         #  Xmin,Xmax: Limits of shape along OX axis.
9491         #  Ymin,Ymax: Limits of shape along OY axis.
9492         #  Zmin,Zmax: Limits of shape along OZ axis.
9493         #
9494         #  @ref tui_measurement_tools_page "Example"
9495         def BoundingBox (self, theShape, precise=False):
9496             """
9497             Get parameters of bounding box of the given shape
9498
9499             Parameters: 
9500                 theShape Shape to obtain bounding box of.
9501                 precise TRUE for precise computation; FALSE for fast one.
9502
9503             Returns:
9504                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9505                  Xmin,Xmax: Limits of shape along OX axis.
9506                  Ymin,Ymax: Limits of shape along OY axis.
9507                  Zmin,Zmax: Limits of shape along OZ axis.
9508             """
9509             # Example: see GEOM_TestMeasures.py
9510             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9511             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9512             return aTuple
9513
9514         ## Get bounding box of the given shape
9515         #  @param theShape Shape to obtain bounding box of.
9516         #  @param precise TRUE for precise computation; FALSE for fast one.
9517         #  @param theName Object name; when specified, this parameter is used
9518         #         for result publication in the study. Otherwise, if automatic
9519         #         publication is switched on, default value is used for result name.
9520         #
9521         #  @return New GEOM.GEOM_Object, containing the created box.
9522         #
9523         #  @ref tui_measurement_tools_page "Example"
9524         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9525             """
9526             Get bounding box of the given shape
9527
9528             Parameters: 
9529                 theShape Shape to obtain bounding box of.
9530                 precise TRUE for precise computation; FALSE for fast one.
9531                 theName Object name; when specified, this parameter is used
9532                         for result publication in the study. Otherwise, if automatic
9533                         publication is switched on, default value is used for result name.
9534
9535             Returns:
9536                 New GEOM.GEOM_Object, containing the created box.
9537             """
9538             # Example: see GEOM_TestMeasures.py
9539             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9540             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9541             self._autoPublish(anObj, theName, "bndbox")
9542             return anObj
9543
9544         ## Get inertia matrix and moments of inertia of theShape.
9545         #  @param theShape Shape to calculate inertia of.
9546         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9547         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9548         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9549         #
9550         #  @ref tui_measurement_tools_page "Example"
9551         def Inertia(self,theShape):
9552             """
9553             Get inertia matrix and moments of inertia of theShape.
9554
9555             Parameters: 
9556                 theShape Shape to calculate inertia of.
9557
9558             Returns:
9559                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9560                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9561                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9562             """
9563             # Example: see GEOM_TestMeasures.py
9564             aTuple = self.MeasuOp.GetInertia(theShape)
9565             RaiseIfFailed("GetInertia", self.MeasuOp)
9566             return aTuple
9567
9568         ## Get if coords are included in the shape (ST_IN or ST_ON)
9569         #  @param theShape Shape
9570         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9571         #  @param tolerance to be used (default is 1.0e-7)
9572         #  @return list_of_boolean = [res1, res2, ...]
9573         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9574             """
9575             Get if coords are included in the shape (ST_IN or ST_ON)
9576             
9577             Parameters: 
9578                 theShape Shape
9579                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9580                 tolerance to be used (default is 1.0e-7)
9581
9582             Returns:
9583                 list_of_boolean = [res1, res2, ...]
9584             """
9585             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9586
9587         ## Get minimal distance between the given shapes.
9588         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9589         #  @return Value of the minimal distance between the given shapes.
9590         #
9591         #  @ref tui_measurement_tools_page "Example"
9592         def MinDistance(self, theShape1, theShape2):
9593             """
9594             Get minimal distance between the given shapes.
9595             
9596             Parameters: 
9597                 theShape1,theShape2 Shapes to find minimal distance between.
9598
9599             Returns:    
9600                 Value of the minimal distance between the given shapes.
9601             """
9602             # Example: see GEOM_TestMeasures.py
9603             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9604             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9605             return aTuple[0]
9606
9607         ## Get minimal distance between the given shapes.
9608         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9609         #  @return Value of the minimal distance between the given shapes, in form of list
9610         #          [Distance, DX, DY, DZ].
9611         #
9612         #  @ref swig_all_measure "Example"
9613         def MinDistanceComponents(self, theShape1, theShape2):
9614             """
9615             Get minimal distance between the given shapes.
9616
9617             Parameters: 
9618                 theShape1,theShape2 Shapes to find minimal distance between.
9619
9620             Returns:  
9621                 Value of the minimal distance between the given shapes, in form of list
9622                 [Distance, DX, DY, DZ]
9623             """
9624             # Example: see GEOM_TestMeasures.py
9625             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9626             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9627             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9628             return aRes
9629
9630         ## Get closest points of the given shapes.
9631         #  @param theShape1,theShape2 Shapes to find closest points of.
9632         #  @return The number of found solutions (-1 in case of infinite number of
9633         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9634         #
9635         #  @ref tui_measurement_tools_page "Example"
9636         def ClosestPoints (self, theShape1, theShape2):
9637             """
9638             Get closest points of the given shapes.
9639
9640             Parameters: 
9641                 theShape1,theShape2 Shapes to find closest points of.
9642
9643             Returns:    
9644                 The number of found solutions (-1 in case of infinite number of
9645                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9646             """
9647             # Example: see GEOM_TestMeasures.py
9648             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9649             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9650             return aTuple
9651
9652         ## Get angle between the given shapes in degrees.
9653         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9654         #  @note If both arguments are vectors, the angle is computed in accordance
9655         #        with their orientations, otherwise the minimum angle is computed.
9656         #  @return Value of the angle between the given shapes in degrees.
9657         #
9658         #  @ref tui_measurement_tools_page "Example"
9659         def GetAngle(self, theShape1, theShape2):
9660             """
9661             Get angle between the given shapes in degrees.
9662
9663             Parameters: 
9664                 theShape1,theShape2 Lines or linear edges to find angle between.
9665
9666             Note:
9667                 If both arguments are vectors, the angle is computed in accordance
9668                 with their orientations, otherwise the minimum angle is computed.
9669
9670             Returns:  
9671                 Value of the angle between the given shapes in degrees.
9672             """
9673             # Example: see GEOM_TestMeasures.py
9674             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
9675             RaiseIfFailed("GetAngle", self.MeasuOp)
9676             return anAngle
9677
9678         ## Get angle between the given shapes in radians.
9679         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9680         #  @note If both arguments are vectors, the angle is computed in accordance
9681         #        with their orientations, otherwise the minimum angle is computed.
9682         #  @return Value of the angle between the given shapes in radians.
9683         #
9684         #  @ref tui_measurement_tools_page "Example"
9685         def GetAngleRadians(self, theShape1, theShape2):
9686             """
9687             Get angle between the given shapes in radians.
9688
9689             Parameters: 
9690                 theShape1,theShape2 Lines or linear edges to find angle between.
9691
9692                 
9693             Note:
9694                 If both arguments are vectors, the angle is computed in accordance
9695                 with their orientations, otherwise the minimum angle is computed.
9696
9697             Returns:  
9698                 Value of the angle between the given shapes in radians.
9699             """
9700             # Example: see GEOM_TestMeasures.py
9701             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
9702             RaiseIfFailed("GetAngle", self.MeasuOp)
9703             return anAngle
9704
9705         ## Get angle between the given vectors in degrees.
9706         #  @param theShape1,theShape2 Vectors to find angle between.
9707         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
9708         #                 if False, the opposite vector to the normal vector is used.
9709         #  @return Value of the angle between the given vectors in degrees.
9710         #
9711         #  @ref tui_measurement_tools_page "Example"
9712         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
9713             """
9714             Get angle between the given vectors in degrees.
9715
9716             Parameters: 
9717                 theShape1,theShape2 Vectors to find angle between.
9718                 theFlag If True, the normal vector is defined by the two vectors cross,
9719                         if False, the opposite vector to the normal vector is used.
9720
9721             Returns:  
9722                 Value of the angle between the given vectors in degrees.
9723             """
9724             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
9725             if not theFlag:
9726                 anAngle = 360. - anAngle
9727             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
9728             return anAngle
9729
9730         ## The same as GetAngleVectors, but the result is in radians.
9731         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
9732             """
9733             Get angle between the given vectors in radians.
9734
9735             Parameters: 
9736                 theShape1,theShape2 Vectors to find angle between.
9737                 theFlag If True, the normal vector is defined by the two vectors cross,
9738                         if False, the opposite vector to the normal vector is used.
9739
9740             Returns:  
9741                 Value of the angle between the given vectors in radians.
9742             """
9743             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
9744             return anAngle
9745
9746         ## @name Curve Curvature Measurement
9747         #  Methods for receiving radius of curvature of curves
9748         #  in the given point
9749         ## @{
9750
9751         ## Measure curvature of a curve at a point, set by parameter.
9752         #  @param theCurve a curve.
9753         #  @param theParam parameter.
9754         #  @return radius of curvature of \a theCurve.
9755         #
9756         #  @ref swig_todo "Example"
9757         def CurveCurvatureByParam(self, theCurve, theParam):
9758             """
9759             Measure curvature of a curve at a point, set by parameter.
9760
9761             Parameters: 
9762                 theCurve a curve.
9763                 theParam parameter.
9764
9765             Returns: 
9766                 radius of curvature of theCurve.
9767             """
9768             # Example: see GEOM_TestMeasures.py
9769             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
9770             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
9771             return aCurv
9772
9773         ## Measure curvature of a curve at a point.
9774         #  @param theCurve a curve.
9775         #  @param thePoint given point.
9776         #  @return radius of curvature of \a theCurve.
9777         #
9778         #  @ref swig_todo "Example"
9779         def CurveCurvatureByPoint(self, theCurve, thePoint):
9780             """
9781             Measure curvature of a curve at a point.
9782
9783             Parameters: 
9784                 theCurve a curve.
9785                 thePoint given point.
9786
9787             Returns: 
9788                 radius of curvature of theCurve.           
9789             """
9790             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
9791             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
9792             return aCurv
9793         ## @}
9794
9795         ## @name Surface Curvature Measurement
9796         #  Methods for receiving max and min radius of curvature of surfaces
9797         #  in the given point
9798         ## @{
9799
9800         ## Measure max radius of curvature of surface.
9801         #  @param theSurf the given surface.
9802         #  @param theUParam Value of U-parameter on the referenced surface.
9803         #  @param theVParam Value of V-parameter on the referenced surface.
9804         #  @return max radius of curvature of theSurf.
9805         #
9806         ## @ref swig_todo "Example"
9807         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9808             """
9809             Measure max radius of curvature of surface.
9810
9811             Parameters: 
9812                 theSurf the given surface.
9813                 theUParam Value of U-parameter on the referenced surface.
9814                 theVParam Value of V-parameter on the referenced surface.
9815                 
9816             Returns:     
9817                 max radius of curvature of theSurf.
9818             """
9819             # Example: see GEOM_TestMeasures.py
9820             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9821             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
9822             return aSurf
9823
9824         ## Measure max radius of curvature of surface in the given point
9825         #  @param theSurf the given surface.
9826         #  @param thePoint given point.
9827         #  @return max radius of curvature of theSurf.
9828         #
9829         ## @ref swig_todo "Example"
9830         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
9831             """
9832             Measure max radius of curvature of surface in the given point.
9833
9834             Parameters: 
9835                 theSurf the given surface.
9836                 thePoint given point.
9837                 
9838             Returns:     
9839                 max radius of curvature of theSurf.          
9840             """
9841             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
9842             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
9843             return aSurf
9844
9845         ## Measure min radius of curvature of surface.
9846         #  @param theSurf the given surface.
9847         #  @param theUParam Value of U-parameter on the referenced surface.
9848         #  @param theVParam Value of V-parameter on the referenced surface.
9849         #  @return min radius of curvature of theSurf.
9850         #   
9851         ## @ref swig_todo "Example"
9852         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9853             """
9854             Measure min radius of curvature of surface.
9855
9856             Parameters: 
9857                 theSurf the given surface.
9858                 theUParam Value of U-parameter on the referenced surface.
9859                 theVParam Value of V-parameter on the referenced surface.
9860                 
9861             Returns:     
9862                 Min radius of curvature of theSurf.
9863             """
9864             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9865             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
9866             return aSurf
9867
9868         ## Measure min radius of curvature of surface in the given point
9869         #  @param theSurf the given surface.
9870         #  @param thePoint given point.
9871         #  @return min radius of curvature of theSurf.
9872         #
9873         ## @ref swig_todo "Example"
9874         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
9875             """
9876             Measure min radius of curvature of surface in the given point.
9877
9878             Parameters: 
9879                 theSurf the given surface.
9880                 thePoint given point.
9881                 
9882             Returns:     
9883                 Min radius of curvature of theSurf.          
9884             """
9885             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
9886             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
9887             return aSurf
9888         ## @}
9889
9890         ## Get min and max tolerances of sub-shapes of theShape
9891         #  @param theShape Shape, to get tolerances of.
9892         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
9893         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
9894         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
9895         #  VertMin,VertMax: Min and max tolerances of the vertices.
9896         #
9897         #  @ref tui_measurement_tools_page "Example"
9898         def Tolerance(self,theShape):
9899             """
9900             Get min and max tolerances of sub-shapes of theShape
9901
9902             Parameters: 
9903                 theShape Shape, to get tolerances of.
9904
9905             Returns:    
9906                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
9907                  FaceMin,FaceMax: Min and max tolerances of the faces.
9908                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
9909                  VertMin,VertMax: Min and max tolerances of the vertices.
9910             """
9911             # Example: see GEOM_TestMeasures.py
9912             aTuple = self.MeasuOp.GetTolerance(theShape)
9913             RaiseIfFailed("GetTolerance", self.MeasuOp)
9914             return aTuple
9915
9916         ## Obtain description of the given shape (number of sub-shapes of each type)
9917         #  @param theShape Shape to be described.
9918         #  @return Description of the given shape.
9919         #
9920         #  @ref tui_measurement_tools_page "Example"
9921         def WhatIs(self,theShape):
9922             """
9923             Obtain description of the given shape (number of sub-shapes of each type)
9924
9925             Parameters:
9926                 theShape Shape to be described.
9927
9928             Returns:
9929                 Description of the given shape.
9930             """
9931             # Example: see GEOM_TestMeasures.py
9932             aDescr = self.MeasuOp.WhatIs(theShape)
9933             RaiseIfFailed("WhatIs", self.MeasuOp)
9934             return aDescr
9935
9936         ## Obtain quantity of shapes of the given type in \a theShape.
9937         #  If \a theShape is of type \a theType, it is also counted.
9938         #  @param theShape Shape to be described.
9939         #  @param theType the given ShapeType().
9940         #  @return Quantity of shapes of type \a theType in \a theShape.
9941         #
9942         #  @ref tui_measurement_tools_page "Example"
9943         def NbShapes (self, theShape, theType):
9944             """
9945             Obtain quantity of shapes of the given type in theShape.
9946             If theShape is of type theType, it is also counted.
9947
9948             Parameters:
9949                 theShape Shape to be described.
9950                 theType the given geompy.ShapeType
9951
9952             Returns:
9953                 Quantity of shapes of type theType in theShape.
9954             """
9955             # Example: see GEOM_TestMeasures.py
9956             listSh = self.SubShapeAllIDs(theShape, theType)
9957             Nb = len(listSh)
9958             return Nb
9959
9960         ## Obtain quantity of shapes of each type in \a theShape.
9961         #  The \a theShape is also counted.
9962         #  @param theShape Shape to be described.
9963         #  @return Dictionary of ShapeType() with bound quantities of shapes.
9964         #
9965         #  @ref tui_measurement_tools_page "Example"
9966         def ShapeInfo (self, theShape):
9967             """
9968             Obtain quantity of shapes of each type in theShape.
9969             The theShape is also counted.
9970
9971             Parameters:
9972                 theShape Shape to be described.
9973
9974             Returns:
9975                 Dictionary of geompy.ShapeType with bound quantities of shapes.
9976             """
9977             # Example: see GEOM_TestMeasures.py
9978             aDict = {}
9979             for typeSh in self.ShapeType:
9980                 if typeSh in ( "AUTO", "SHAPE" ): continue
9981                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
9982                 Nb = len(listSh)
9983                 aDict[typeSh] = Nb
9984                 pass
9985             return aDict
9986
9987         def GetCreationInformation(self, theShape):
9988             info = theShape.GetCreationInformation()
9989             # operationName
9990             opName = info.operationName
9991             if not opName: opName = "no info available"
9992             res = "Operation: " + opName
9993             # parameters
9994             for parVal in info.params:
9995                 res += " \n %s = %s" % ( parVal.name, parVal.value )
9996             return res
9997
9998         ## Get a point, situated at the centre of mass of theShape.
9999         #  @param theShape Shape to define centre of mass of.
10000         #  @param theName Object name; when specified, this parameter is used
10001         #         for result publication in the study. Otherwise, if automatic
10002         #         publication is switched on, default value is used for result name.
10003         #
10004         #  @return New GEOM.GEOM_Object, containing the created point.
10005         #
10006         #  @ref tui_measurement_tools_page "Example"
10007         def MakeCDG(self, theShape, theName=None):
10008             """
10009             Get a point, situated at the centre of mass of theShape.
10010
10011             Parameters:
10012                 theShape Shape to define centre of mass of.
10013                 theName Object name; when specified, this parameter is used
10014                         for result publication in the study. Otherwise, if automatic
10015                         publication is switched on, default value is used for result name.
10016
10017             Returns:
10018                 New GEOM.GEOM_Object, containing the created point.
10019             """
10020             # Example: see GEOM_TestMeasures.py
10021             anObj = self.MeasuOp.GetCentreOfMass(theShape)
10022             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
10023             self._autoPublish(anObj, theName, "centerOfMass")
10024             return anObj
10025
10026         ## Get a vertex sub-shape by index depended with orientation.
10027         #  @param theShape Shape to find sub-shape.
10028         #  @param theIndex Index to find vertex by this index (starting from zero)
10029         #  @param theName Object name; when specified, this parameter is used
10030         #         for result publication in the study. Otherwise, if automatic
10031         #         publication is switched on, default value is used for result name.
10032         #
10033         #  @return New GEOM.GEOM_Object, containing the created vertex.
10034         #
10035         #  @ref tui_measurement_tools_page "Example"
10036         def GetVertexByIndex(self, theShape, theIndex, theName=None):
10037             """
10038             Get a vertex sub-shape by index depended with orientation.
10039
10040             Parameters:
10041                 theShape Shape to find sub-shape.
10042                 theIndex Index to find vertex by this index (starting from zero)
10043                 theName Object name; when specified, this parameter is used
10044                         for result publication in the study. Otherwise, if automatic
10045                         publication is switched on, default value is used for result name.
10046
10047             Returns:
10048                 New GEOM.GEOM_Object, containing the created vertex.
10049             """
10050             # Example: see GEOM_TestMeasures.py
10051             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
10052             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
10053             self._autoPublish(anObj, theName, "vertex")
10054             return anObj
10055
10056         ## Get the first vertex of wire/edge depended orientation.
10057         #  @param theShape Shape to find first vertex.
10058         #  @param theName Object name; when specified, this parameter is used
10059         #         for result publication in the study. Otherwise, if automatic
10060         #         publication is switched on, default value is used for result name.
10061         #
10062         #  @return New GEOM.GEOM_Object, containing the created vertex.
10063         #
10064         #  @ref tui_measurement_tools_page "Example"
10065         def GetFirstVertex(self, theShape, theName=None):
10066             """
10067             Get the first vertex of wire/edge depended orientation.
10068
10069             Parameters:
10070                 theShape Shape to find first vertex.
10071                 theName Object name; when specified, this parameter is used
10072                         for result publication in the study. Otherwise, if automatic
10073                         publication is switched on, default value is used for result name.
10074
10075             Returns:    
10076                 New GEOM.GEOM_Object, containing the created vertex.
10077             """
10078             # Example: see GEOM_TestMeasures.py
10079             # note: auto-publishing is done in self.GetVertexByIndex()
10080             anObj = self.GetVertexByIndex(theShape, 0, theName)
10081             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
10082             return anObj
10083
10084         ## Get the last vertex of wire/edge depended orientation.
10085         #  @param theShape Shape to find last vertex.
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         #  @return New GEOM.GEOM_Object, containing the created vertex.
10091         #
10092         #  @ref tui_measurement_tools_page "Example"
10093         def GetLastVertex(self, theShape, theName=None):
10094             """
10095             Get the last vertex of wire/edge depended orientation.
10096
10097             Parameters: 
10098                 theShape Shape to find last vertex.
10099                 theName Object name; when specified, this parameter is used
10100                         for result publication in the study. Otherwise, if automatic
10101                         publication is switched on, default value is used for result name.
10102
10103             Returns:   
10104                 New GEOM.GEOM_Object, containing the created vertex.
10105             """
10106             # Example: see GEOM_TestMeasures.py
10107             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
10108             # note: auto-publishing is done in self.GetVertexByIndex()
10109             anObj = self.GetVertexByIndex(theShape, (nb_vert-1), theName)
10110             RaiseIfFailed("GetLastVertex", self.MeasuOp)
10111             return anObj
10112
10113         ## Get a normale to the given face. If the point is not given,
10114         #  the normale is calculated at the center of mass.
10115         #  @param theFace Face to define normale of.
10116         #  @param theOptionalPoint Point to compute the normale at.
10117         #  @param theName Object name; when specified, this parameter is used
10118         #         for result publication in the study. Otherwise, if automatic
10119         #         publication is switched on, default value is used for result name.
10120         #
10121         #  @return New GEOM.GEOM_Object, containing the created vector.
10122         #
10123         #  @ref swig_todo "Example"
10124         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
10125             """
10126             Get a normale to the given face. If the point is not given,
10127             the normale is calculated at the center of mass.
10128             
10129             Parameters: 
10130                 theFace Face to define normale of.
10131                 theOptionalPoint Point to compute the normale at.
10132                 theName Object name; when specified, this parameter is used
10133                         for result publication in the study. Otherwise, if automatic
10134                         publication is switched on, default value is used for result name.
10135
10136             Returns:   
10137                 New GEOM.GEOM_Object, containing the created vector.
10138             """
10139             # Example: see GEOM_TestMeasures.py
10140             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
10141             RaiseIfFailed("GetNormal", self.MeasuOp)
10142             self._autoPublish(anObj, theName, "normal")
10143             return anObj
10144
10145         ## Print shape errors obtained from CheckShape.
10146         #  @param theShape Shape that was checked.
10147         #  @param theShapeErrors the shape errors obtained by CheckShape.
10148         #  @param theReturnStatus If 0 the description of problem is printed.
10149         #                         If 1 the description of problem is returned.
10150         #  @return If theReturnStatus is equal to 1 the description is returned.
10151         #          Otherwise doesn't return anything.
10152         #
10153         #  @ref tui_measurement_tools_page "Example"
10154         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
10155             """
10156             Print shape errors obtained from CheckShape.
10157
10158             Parameters:
10159                 theShape Shape that was checked.
10160                 theShapeErrors the shape errors obtained by CheckShape.
10161                 theReturnStatus If 0 the description of problem is printed.
10162                                 If 1 the description of problem is returned.
10163
10164             Returns:
10165                 If theReturnStatus is equal to 1 the description is returned.
10166                   Otherwise doesn't return anything.
10167             """
10168             # Example: see GEOM_TestMeasures.py
10169             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
10170             if theReturnStatus == 1:
10171                 return Descr
10172             print Descr
10173             pass
10174
10175         ## Check a topology of the given shape.
10176         #  @param theShape Shape to check validity of.
10177         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
10178         #                        if TRUE, the shape's geometry will be checked also.
10179         #  @param theReturnStatus If 0 and if theShape is invalid, a description
10180         #                         of problem is printed.
10181         #                         If 1 isValid flag and the description of
10182         #                         problem is returned.
10183         #                         If 2 isValid flag and the list of error data
10184         #                         is returned.
10185         #  @return TRUE, if the shape "seems to be valid".
10186         #          If theShape is invalid, prints a description of problem.
10187         #          If theReturnStatus is equal to 1 the description is returned
10188         #          along with IsValid flag.
10189         #          If theReturnStatus is equal to 2 the list of error data is
10190         #          returned along with IsValid flag.
10191         #
10192         #  @ref tui_measurement_tools_page "Example"
10193         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
10194             """
10195             Check a topology of the given shape.
10196
10197             Parameters: 
10198                 theShape Shape to check validity of.
10199                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
10200                                if TRUE, the shape's geometry will be checked also.
10201                 theReturnStatus If 0 and if theShape is invalid, a description
10202                                 of problem is printed.
10203                                 If 1 IsValid flag and the description of
10204                                 problem is returned.
10205                                 If 2 IsValid flag and the list of error data
10206                                 is returned.
10207
10208             Returns:   
10209                 TRUE, if the shape "seems to be valid".
10210                 If theShape is invalid, prints a description of problem.
10211                 If theReturnStatus is equal to 1 the description is returned
10212                 along with IsValid flag.
10213                 If theReturnStatus is equal to 2 the list of error data is
10214                 returned along with IsValid flag.
10215             """
10216             # Example: see GEOM_TestMeasures.py
10217             if theIsCheckGeom:
10218                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
10219                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
10220             else:
10221                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
10222                 RaiseIfFailed("CheckShape", self.MeasuOp)
10223             if IsValid == 0:
10224                 if theReturnStatus == 0:
10225                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10226                     print Descr
10227             if theReturnStatus == 1:
10228               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10229               return (IsValid, Descr)
10230             elif theReturnStatus == 2:
10231               return (IsValid, ShapeErrors)
10232             return IsValid
10233
10234         ## Detect self-intersections in the given shape.
10235         #  @param theShape Shape to check.
10236         #  @return TRUE, if the shape contains no self-intersections.
10237         #
10238         #  @ref tui_measurement_tools_page "Example"
10239         def CheckSelfIntersections(self, theShape):
10240             """
10241             Detect self-intersections in the given shape.
10242
10243             Parameters: 
10244                 theShape Shape to check.
10245
10246             Returns:   
10247                 TRUE, if the shape contains no self-intersections.
10248             """
10249             # Example: see GEOM_TestMeasures.py
10250             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
10251             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
10252             return IsValid
10253
10254         ## Get position (LCS) of theShape.
10255         #
10256         #  Origin of the LCS is situated at the shape's center of mass.
10257         #  Axes of the LCS are obtained from shape's location or,
10258         #  if the shape is a planar face, from position of its plane.
10259         #
10260         #  @param theShape Shape to calculate position of.
10261         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10262         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
10263         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10264         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10265         #
10266         #  @ref swig_todo "Example"
10267         def GetPosition(self,theShape):
10268             """
10269             Get position (LCS) of theShape.
10270             Origin of the LCS is situated at the shape's center of mass.
10271             Axes of the LCS are obtained from shape's location or,
10272             if the shape is a planar face, from position of its plane.
10273
10274             Parameters: 
10275                 theShape Shape to calculate position of.
10276
10277             Returns:  
10278                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10279                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
10280                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10281                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10282             """
10283             # Example: see GEOM_TestMeasures.py
10284             aTuple = self.MeasuOp.GetPosition(theShape)
10285             RaiseIfFailed("GetPosition", self.MeasuOp)
10286             return aTuple
10287
10288         ## Get kind of theShape.
10289         #
10290         #  @param theShape Shape to get a kind of.
10291         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
10292         #          and a list of parameters, describing the shape.
10293         #  @note  Concrete meaning of each value, returned via \a theIntegers
10294         #         or \a theDoubles list depends on the kind() of the shape.
10295         #
10296         #  @ref swig_todo "Example"
10297         def KindOfShape(self,theShape):
10298             """
10299             Get kind of theShape.
10300          
10301             Parameters: 
10302                 theShape Shape to get a kind of.
10303
10304             Returns:
10305                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
10306                     and a list of parameters, describing the shape.
10307             Note:
10308                 Concrete meaning of each value, returned via theIntegers
10309                 or theDoubles list depends on the geompy.kind of the shape
10310             """
10311             # Example: see GEOM_TestMeasures.py
10312             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
10313             RaiseIfFailed("KindOfShape", self.MeasuOp)
10314
10315             aKind  = aRoughTuple[0]
10316             anInts = aRoughTuple[1]
10317             aDbls  = aRoughTuple[2]
10318
10319             # Now there is no exception from this rule:
10320             aKindTuple = [aKind] + aDbls + anInts
10321
10322             # If they are we will regroup parameters for such kind of shape.
10323             # For example:
10324             #if aKind == kind.SOME_KIND:
10325             #    #  SOME_KIND     int int double int double double
10326             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
10327
10328             return aKindTuple
10329
10330         # end of l2_measure
10331         ## @}
10332
10333         ## @addtogroup l2_import_export
10334         ## @{
10335
10336         ## Import a shape from the BREP or IGES or STEP file
10337         #  (depends on given format) with given name.
10338         #  @param theFileName The file, containing the shape.
10339         #  @param theFormatName Specify format for the file reading.
10340         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
10341         #         If format 'IGES_SCALE' is used instead of 'IGES' or
10342         #            format 'STEP_SCALE' is used instead of 'STEP',
10343         #            length unit will be set to 'meter' and result model will be scaled.
10344         #  @param theName Object name; when specified, this parameter is used
10345         #         for result publication in the study. Otherwise, if automatic
10346         #         publication is switched on, default value is used for result name.
10347         #
10348         #  @return New GEOM.GEOM_Object, containing the imported shape.
10349         #          If material names are imported it returns the list of
10350         #          objects. The first one is the imported object followed by
10351         #          material groups.
10352         #  @note Auto publishing is allowed for the shape itself. Imported
10353         #        material groups are not automatically published.
10354         #
10355         #  @ref swig_Import_Export "Example"
10356         def ImportFile(self, theFileName, theFormatName, theName=None):
10357             """
10358             Import a shape from the BREP or IGES or STEP file
10359             (depends on given format) with given name.
10360
10361             Parameters: 
10362                 theFileName The file, containing the shape.
10363                 theFormatName Specify format for the file reading.
10364                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
10365                     If format 'IGES_SCALE' is used instead of 'IGES' or
10366                        format 'STEP_SCALE' is used instead of 'STEP',
10367                        length unit will be set to 'meter' and result model will be scaled.
10368                 theName Object name; when specified, this parameter is used
10369                         for result publication in the study. Otherwise, if automatic
10370                         publication is switched on, default value is used for result name.
10371
10372             Returns:
10373                 New GEOM.GEOM_Object, containing the imported shape.
10374                 If material names are imported it returns the list of
10375                 objects. The first one is the imported object followed by
10376                 material groups.
10377             Note:
10378                 Auto publishing is allowed for the shape itself. Imported
10379                 material groups are not automatically published.
10380             """
10381             # Example: see GEOM_TestOthers.py
10382             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
10383             RaiseIfFailed("ImportFile", self.InsertOp)
10384             aNbObj = len(aListObj)
10385             if aNbObj > 0:
10386                 self._autoPublish(aListObj[0], theName, "imported")
10387             if aNbObj == 1:
10388                 return aListObj[0]
10389             return aListObj
10390
10391         ## Deprecated analog of ImportFile()
10392         def Import(self, theFileName, theFormatName, theName=None):
10393             """
10394             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
10395             """
10396             print "WARNING: Function Import is deprecated, use ImportFile instead"
10397             # note: auto-publishing is done in self.ImportFile()
10398             return self.ImportFile(theFileName, theFormatName, theName)
10399
10400         ## Shortcut to ImportFile() for BREP format.
10401         #  Import a shape from the BREP file with given name.
10402         #  @param theFileName The file, containing the shape.
10403         #  @param theName Object name; when specified, this parameter is used
10404         #         for result publication in the study. Otherwise, if automatic
10405         #         publication is switched on, default value is used for result name.
10406         #
10407         #  @return New GEOM.GEOM_Object, containing the imported shape.
10408         #
10409         #  @ref swig_Import_Export "Example"
10410         def ImportBREP(self, theFileName, theName=None):
10411             """
10412             geompy.ImportFile(...) function for BREP format
10413             Import a shape from the BREP file with given name.
10414
10415             Parameters: 
10416                 theFileName The file, containing the shape.
10417                 theName Object name; when specified, this parameter is used
10418                         for result publication in the study. Otherwise, if automatic
10419                         publication is switched on, default value is used for result name.
10420
10421             Returns:
10422                 New GEOM.GEOM_Object, containing the imported shape.
10423             """
10424             # Example: see GEOM_TestOthers.py
10425             # note: auto-publishing is done in self.ImportFile()
10426             return self.ImportFile(theFileName, "BREP", theName)
10427
10428         ## Shortcut to ImportFile() for IGES format
10429         #  Import a shape from the IGES file with given name.
10430         #  @param theFileName The file, containing the shape.
10431         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10432         #                     and result model will be scaled, if its units are not meters.
10433         #                     If False (default), file length units will be taken into account.
10434         #  @param theName Object name; when specified, this parameter is used
10435         #         for result publication in the study. Otherwise, if automatic
10436         #         publication is switched on, default value is used for result name.
10437         #
10438         #  @return New GEOM.GEOM_Object, containing the imported shape.
10439         #
10440         #  @ref swig_Import_Export "Example"
10441         def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
10442             """
10443             geompy.ImportFile(...) function for IGES format
10444
10445             Parameters:
10446                 theFileName The file, containing the shape.
10447                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10448                             and result model will be scaled, if its units are not meters.
10449                             If False (default), file length units will be taken into account.
10450                 theName Object name; when specified, this parameter is used
10451                         for result publication in the study. Otherwise, if automatic
10452                         publication is switched on, default value is used for result name.
10453
10454             Returns:
10455                 New GEOM.GEOM_Object, containing the imported shape.
10456             """
10457             # Example: see GEOM_TestOthers.py
10458             # note: auto-publishing is done in self.ImportFile()
10459             if ignoreUnits:
10460                 return self.ImportFile(theFileName, "IGES_SCALE", theName)
10461             return self.ImportFile(theFileName, "IGES", theName)
10462
10463         ## Return length unit from given IGES file
10464         #  @param theFileName The file, containing the shape.
10465         #  @return String, containing the units name.
10466         #
10467         #  @ref swig_Import_Export "Example"
10468         def GetIGESUnit(self, theFileName):
10469             """
10470             Return length units from given IGES file
10471
10472             Parameters:
10473                 theFileName The file, containing the shape.
10474
10475             Returns:
10476                 String, containing the units name.
10477             """
10478             # Example: see GEOM_TestOthers.py
10479             aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
10480             return aUnitName
10481
10482         ## Shortcut to ImportFile() for STEP format
10483         #  Import a shape from the STEP file with given name.
10484         #  @param theFileName The file, containing the shape.
10485         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10486         #                     and result model will be scaled, if its units are not meters.
10487         #                     If False (default), file length units will be taken into account.
10488         #  @param theName Object name; when specified, this parameter is used
10489         #         for result publication in the study. Otherwise, if automatic
10490         #         publication is switched on, default value is used for result name.
10491         #
10492         #  @return New GEOM.GEOM_Object, containing the imported shape.
10493         #          If material names are imported it returns the list of
10494         #          objects. The first one is the imported object followed by
10495         #          material groups.
10496         #  @note Auto publishing is allowed for the shape itself. Imported
10497         #        material groups are not automatically published.
10498         #
10499         #  @ref swig_Import_Export "Example"
10500         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
10501             """
10502             geompy.ImportFile(...) function for STEP format
10503
10504             Parameters:
10505                 theFileName The file, containing the shape.
10506                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10507                             and result model will be scaled, if its units are not meters.
10508                             If False (default), file length units will be taken into account.
10509                 theName Object name; when specified, this parameter is used
10510                         for result publication in the study. Otherwise, if automatic
10511                         publication is switched on, default value is used for result name.
10512
10513             Returns:
10514                 New GEOM.GEOM_Object, containing the imported shape.
10515                 If material names are imported it returns the list of
10516                 objects. The first one is the imported object followed by
10517                 material groups.
10518             Note:
10519                 Auto publishing is allowed for the shape itself. Imported
10520                 material groups are not automatically published.
10521             """
10522             # Example: see GEOM_TestOthers.py
10523             # note: auto-publishing is done in self.ImportFile()
10524             if ignoreUnits:
10525                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
10526             return self.ImportFile(theFileName, "STEP", theName)
10527
10528         ## Return length unit from given IGES or STEP file
10529         #  @param theFileName The file, containing the shape.
10530         #  @return String, containing the units name.
10531         #
10532         #  @ref swig_Import_Export "Example"
10533         def GetSTEPUnit(self, theFileName):
10534             """
10535             Return length units from given STEP file
10536
10537             Parameters:
10538                 theFileName The file, containing the shape.
10539
10540             Returns:
10541                 String, containing the units name.
10542             """
10543             # Example: see GEOM_TestOthers.py
10544             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
10545             return aUnitName
10546
10547         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10548         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10549         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10550         #  @param theStream The BRep binary stream.
10551         #  @param theName Object name; when specified, this parameter is used
10552         #         for result publication in the study. Otherwise, if automatic
10553         #         publication is switched on, default value is used for result name.
10554         #
10555         #  @return New GEOM_Object, containing the shape, read from theStream.
10556         #
10557         #  @ref swig_Import_Export "Example"
10558         def RestoreShape (self, theStream, theName=None):
10559             """
10560             Read a shape from the binary stream, containing its bounding representation (BRep).
10561
10562             Note:
10563                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10564
10565             Parameters: 
10566                 theStream The BRep binary stream.
10567                 theName Object name; when specified, this parameter is used
10568                         for result publication in the study. Otherwise, if automatic
10569                         publication is switched on, default value is used for result name.
10570
10571             Returns:
10572                 New GEOM_Object, containing the shape, read from theStream.
10573             """
10574             # Example: see GEOM_TestOthers.py
10575             anObj = self.InsertOp.RestoreShape(theStream)
10576             RaiseIfFailed("RestoreShape", self.InsertOp)
10577             self._autoPublish(anObj, theName, "restored")
10578             return anObj
10579
10580         ## Export the given shape into a file with given name.
10581         #  @param theObject Shape to be stored in the file.
10582         #  @param theFileName Name of the file to store the given shape in.
10583         #  @param theFormatName Specify format for the shape storage.
10584         #         Available formats can be obtained with
10585         #         geompy.InsertOp.ExportTranslators()[0] method.
10586         #
10587         #  @ref swig_Import_Export "Example"
10588         def Export(self, theObject, theFileName, theFormatName):
10589             """
10590             Export the given shape into a file with given name.
10591
10592             Parameters: 
10593                 theObject Shape to be stored in the file.
10594                 theFileName Name of the file to store the given shape in.
10595                 theFormatName Specify format for the shape storage.
10596                               Available formats can be obtained with
10597                               geompy.InsertOp.ExportTranslators()[0] method.
10598             """
10599             # Example: see GEOM_TestOthers.py
10600             self.InsertOp.Export(theObject, theFileName, theFormatName)
10601             if self.InsertOp.IsDone() == 0:
10602                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10603                 pass
10604             pass
10605
10606         ## Shortcut to Export() for BREP format
10607         #
10608         #  @ref swig_Import_Export "Example"
10609         def ExportBREP(self,theObject, theFileName):
10610             """
10611             geompy.Export(...) function for BREP format
10612             """
10613             # Example: see GEOM_TestOthers.py
10614             return self.Export(theObject, theFileName, "BREP")
10615
10616         ## Shortcut to Export() for IGES format
10617         #
10618         #  @ref swig_Import_Export "Example"
10619         def ExportIGES(self,theObject, theFileName):
10620             """
10621             geompy.Export(...) function for IGES format
10622             """
10623             # Example: see GEOM_TestOthers.py
10624             return self.Export(theObject, theFileName, "IGES")
10625
10626         ## Shortcut to Export() for STEP format
10627         #
10628         #  @ref swig_Import_Export "Example"
10629         def ExportSTEP(self,theObject, theFileName):
10630             """
10631             geompy.Export(...) function for STEP format
10632             """
10633             # Example: see GEOM_TestOthers.py
10634             return self.Export(theObject, theFileName, "STEP")
10635
10636         # end of l2_import_export
10637         ## @}
10638
10639         ## @addtogroup l3_blocks
10640         ## @{
10641
10642         ## Create a quadrangle face from four edges. Order of Edges is not
10643         #  important. It is  not necessary that edges share the same vertex.
10644         #  @param E1,E2,E3,E4 Edges for the face bound.
10645         #  @param theName Object name; when specified, this parameter is used
10646         #         for result publication in the study. Otherwise, if automatic
10647         #         publication is switched on, default value is used for result name.
10648         #
10649         #  @return New GEOM.GEOM_Object, containing the created face.
10650         #
10651         #  @ref tui_building_by_blocks_page "Example"
10652         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10653             """
10654             Create a quadrangle face from four edges. Order of Edges is not
10655             important. It is  not necessary that edges share the same vertex.
10656
10657             Parameters: 
10658                 E1,E2,E3,E4 Edges for the face bound.
10659                 theName Object name; when specified, this parameter is used
10660                         for result publication in the study. Otherwise, if automatic
10661                         publication is switched on, default value is used for result name.
10662
10663             Returns: 
10664                 New GEOM.GEOM_Object, containing the created face.
10665
10666             Example of usage:               
10667                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10668             """
10669             # Example: see GEOM_Spanner.py
10670             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10671             RaiseIfFailed("MakeQuad", self.BlocksOp)
10672             self._autoPublish(anObj, theName, "quad")
10673             return anObj
10674
10675         ## Create a quadrangle face on two edges.
10676         #  The missing edges will be built by creating the shortest ones.
10677         #  @param E1,E2 Two opposite edges for the face.
10678         #  @param theName Object name; when specified, this parameter is used
10679         #         for result publication in the study. Otherwise, if automatic
10680         #         publication is switched on, default value is used for result name.
10681         #
10682         #  @return New GEOM.GEOM_Object, containing the created face.
10683         #
10684         #  @ref tui_building_by_blocks_page "Example"
10685         def MakeQuad2Edges(self, E1, E2, theName=None):
10686             """
10687             Create a quadrangle face on two edges.
10688             The missing edges will be built by creating the shortest ones.
10689
10690             Parameters: 
10691                 E1,E2 Two opposite edges for the face.
10692                 theName Object name; when specified, this parameter is used
10693                         for result publication in the study. Otherwise, if automatic
10694                         publication is switched on, default value is used for result name.
10695
10696             Returns: 
10697                 New GEOM.GEOM_Object, containing the created face.
10698             
10699             Example of usage:
10700                 # create vertices
10701                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10702                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10703                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10704                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10705                 # create edges
10706                 edge1 = geompy.MakeEdge(p1, p2)
10707                 edge2 = geompy.MakeEdge(p3, p4)
10708                 # create a quadrangle face from two edges
10709                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10710             """
10711             # Example: see GEOM_Spanner.py
10712             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10713             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10714             self._autoPublish(anObj, theName, "quad")
10715             return anObj
10716
10717         ## Create a quadrangle face with specified corners.
10718         #  The missing edges will be built by creating the shortest ones.
10719         #  @param V1,V2,V3,V4 Corner vertices for the face.
10720         #  @param theName Object name; when specified, this parameter is used
10721         #         for result publication in the study. Otherwise, if automatic
10722         #         publication is switched on, default value is used for result name.
10723         #
10724         #  @return New GEOM.GEOM_Object, containing the created face.
10725         #
10726         #  @ref tui_building_by_blocks_page "Example 1"
10727         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10728         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10729             """
10730             Create a quadrangle face with specified corners.
10731             The missing edges will be built by creating the shortest ones.
10732
10733             Parameters: 
10734                 V1,V2,V3,V4 Corner vertices for the face.
10735                 theName Object name; when specified, this parameter is used
10736                         for result publication in the study. Otherwise, if automatic
10737                         publication is switched on, default value is used for result name.
10738
10739             Returns: 
10740                 New GEOM.GEOM_Object, containing the created face.
10741
10742             Example of usage:
10743                 # create vertices
10744                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10745                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10746                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10747                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10748                 # create a quadrangle from four points in its corners
10749                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10750             """
10751             # Example: see GEOM_Spanner.py
10752             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10753             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10754             self._autoPublish(anObj, theName, "quad")
10755             return anObj
10756
10757         ## Create a hexahedral solid, bounded by the six given faces. Order of
10758         #  faces is not important. It is  not necessary that Faces share the same edge.
10759         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10760         #  @param theName Object name; when specified, this parameter is used
10761         #         for result publication in the study. Otherwise, if automatic
10762         #         publication is switched on, default value is used for result name.
10763         #
10764         #  @return New GEOM.GEOM_Object, containing the created solid.
10765         #
10766         #  @ref tui_building_by_blocks_page "Example 1"
10767         #  \n @ref swig_MakeHexa "Example 2"
10768         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
10769             """
10770             Create a hexahedral solid, bounded by the six given faces. Order of
10771             faces is not important. It is  not necessary that Faces share the same edge.
10772
10773             Parameters: 
10774                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10775                 theName Object name; when specified, this parameter is used
10776                         for result publication in the study. Otherwise, if automatic
10777                         publication is switched on, default value is used for result name.
10778
10779             Returns:    
10780                 New GEOM.GEOM_Object, containing the created solid.
10781
10782             Example of usage:
10783                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
10784             """
10785             # Example: see GEOM_Spanner.py
10786             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
10787             RaiseIfFailed("MakeHexa", self.BlocksOp)
10788             self._autoPublish(anObj, theName, "hexa")
10789             return anObj
10790
10791         ## Create a hexahedral solid between two given faces.
10792         #  The missing faces will be built by creating the smallest ones.
10793         #  @param F1,F2 Two opposite faces for the hexahedral solid.
10794         #  @param theName Object name; when specified, this parameter is used
10795         #         for result publication in the study. Otherwise, if automatic
10796         #         publication is switched on, default value is used for result name.
10797         #
10798         #  @return New GEOM.GEOM_Object, containing the created solid.
10799         #
10800         #  @ref tui_building_by_blocks_page "Example 1"
10801         #  \n @ref swig_MakeHexa2Faces "Example 2"
10802         def MakeHexa2Faces(self, F1, F2, theName=None):
10803             """
10804             Create a hexahedral solid between two given faces.
10805             The missing faces will be built by creating the smallest ones.
10806
10807             Parameters: 
10808                 F1,F2 Two opposite faces for the hexahedral solid.
10809                 theName Object name; when specified, this parameter is used
10810                         for result publication in the study. Otherwise, if automatic
10811                         publication is switched on, default value is used for result name.
10812
10813             Returns:
10814                 New GEOM.GEOM_Object, containing the created solid.
10815
10816             Example of usage:
10817                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
10818             """
10819             # Example: see GEOM_Spanner.py
10820             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
10821             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
10822             self._autoPublish(anObj, theName, "hexa")
10823             return anObj
10824
10825         # end of l3_blocks
10826         ## @}
10827
10828         ## @addtogroup l3_blocks_op
10829         ## @{
10830
10831         ## Get a vertex, found in the given shape by its coordinates.
10832         #  @param theShape Block or a compound of blocks.
10833         #  @param theX,theY,theZ Coordinates of the sought vertex.
10834         #  @param theEpsilon Maximum allowed distance between the resulting
10835         #                    vertex and point with the given coordinates.
10836         #  @param theName Object name; when specified, this parameter is used
10837         #         for result publication in the study. Otherwise, if automatic
10838         #         publication is switched on, default value is used for result name.
10839         #
10840         #  @return New GEOM.GEOM_Object, containing the found vertex.
10841         #
10842         #  @ref swig_GetPoint "Example"
10843         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
10844             """
10845             Get a vertex, found in the given shape by its coordinates.
10846
10847             Parameters: 
10848                 theShape Block or a compound of blocks.
10849                 theX,theY,theZ Coordinates of the sought vertex.
10850                 theEpsilon Maximum allowed distance between the resulting
10851                            vertex and point with the given coordinates.
10852                 theName Object name; when specified, this parameter is used
10853                         for result publication in the study. Otherwise, if automatic
10854                         publication is switched on, default value is used for result name.
10855
10856             Returns:                  
10857                 New GEOM.GEOM_Object, containing the found vertex.
10858
10859             Example of usage:
10860                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
10861             """
10862             # Example: see GEOM_TestOthers.py
10863             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
10864             RaiseIfFailed("GetPoint", self.BlocksOp)
10865             self._autoPublish(anObj, theName, "vertex")
10866             return anObj
10867
10868         ## Find a vertex of the given shape, which has minimal distance to the given point.
10869         #  @param theShape Any shape.
10870         #  @param thePoint Point, close to the desired vertex.
10871         #  @param theName Object name; when specified, this parameter is used
10872         #         for result publication in the study. Otherwise, if automatic
10873         #         publication is switched on, default value is used for result name.
10874         #
10875         #  @return New GEOM.GEOM_Object, containing the found vertex.
10876         #
10877         #  @ref swig_GetVertexNearPoint "Example"
10878         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
10879             """
10880             Find a vertex of the given shape, which has minimal distance to the given point.
10881
10882             Parameters: 
10883                 theShape Any shape.
10884                 thePoint Point, close to the desired vertex.
10885                 theName Object name; when specified, this parameter is used
10886                         for result publication in the study. Otherwise, if automatic
10887                         publication is switched on, default value is used for result name.
10888
10889             Returns:
10890                 New GEOM.GEOM_Object, containing the found vertex.
10891
10892             Example of usage:
10893                 pmidle = geompy.MakeVertex(50, 0, 50)
10894                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
10895             """
10896             # Example: see GEOM_TestOthers.py
10897             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
10898             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
10899             self._autoPublish(anObj, theName, "vertex")
10900             return anObj
10901
10902         ## Get an edge, found in the given shape by two given vertices.
10903         #  @param theShape Block or a compound of blocks.
10904         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
10905         #  @param theName Object name; when specified, this parameter is used
10906         #         for result publication in the study. Otherwise, if automatic
10907         #         publication is switched on, default value is used for result name.
10908         #
10909         #  @return New GEOM.GEOM_Object, containing the found edge.
10910         #
10911         #  @ref swig_GetEdge "Example"
10912         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
10913             """
10914             Get an edge, found in the given shape by two given vertices.
10915
10916             Parameters: 
10917                 theShape Block or a compound of blocks.
10918                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
10919                 theName Object name; when specified, this parameter is used
10920                         for result publication in the study. Otherwise, if automatic
10921                         publication is switched on, default value is used for result name.
10922
10923             Returns:
10924                 New GEOM.GEOM_Object, containing the found edge.
10925             """
10926             # Example: see GEOM_Spanner.py
10927             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
10928             RaiseIfFailed("GetEdge", self.BlocksOp)
10929             self._autoPublish(anObj, theName, "edge")
10930             return anObj
10931
10932         ## Find an edge of the given shape, which has minimal distance to the given point.
10933         #  @param theShape Block or a compound of blocks.
10934         #  @param thePoint Point, close to the desired edge.
10935         #  @param theName Object name; when specified, this parameter is used
10936         #         for result publication in the study. Otherwise, if automatic
10937         #         publication is switched on, default value is used for result name.
10938         #
10939         #  @return New GEOM.GEOM_Object, containing the found edge.
10940         #
10941         #  @ref swig_GetEdgeNearPoint "Example"
10942         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
10943             """
10944             Find an edge of the given shape, which has minimal distance to the given point.
10945
10946             Parameters: 
10947                 theShape Block or a compound of blocks.
10948                 thePoint Point, close to the desired edge.
10949                 theName Object name; when specified, this parameter is used
10950                         for result publication in the study. Otherwise, if automatic
10951                         publication is switched on, default value is used for result name.
10952
10953             Returns:
10954                 New GEOM.GEOM_Object, containing the found edge.
10955             """
10956             # Example: see GEOM_TestOthers.py
10957             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
10958             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
10959             self._autoPublish(anObj, theName, "edge")
10960             return anObj
10961
10962         ## Returns a face, found in the given shape by four given corner vertices.
10963         #  @param theShape Block or a compound of blocks.
10964         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10965         #  @param theName Object name; when specified, this parameter is used
10966         #         for result publication in the study. Otherwise, if automatic
10967         #         publication is switched on, default value is used for result name.
10968         #
10969         #  @return New GEOM.GEOM_Object, containing the found face.
10970         #
10971         #  @ref swig_todo "Example"
10972         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
10973             """
10974             Returns a face, found in the given shape by four given corner vertices.
10975
10976             Parameters:
10977                 theShape Block or a compound of blocks.
10978                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10979                 theName Object name; when specified, this parameter is used
10980                         for result publication in the study. Otherwise, if automatic
10981                         publication is switched on, default value is used for result name.
10982
10983             Returns:
10984                 New GEOM.GEOM_Object, containing the found face.
10985             """
10986             # Example: see GEOM_Spanner.py
10987             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
10988             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
10989             self._autoPublish(anObj, theName, "face")
10990             return anObj
10991
10992         ## Get a face of block, found in the given shape by two given edges.
10993         #  @param theShape Block or a compound of blocks.
10994         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
10995         #  @param theName Object name; when specified, this parameter is used
10996         #         for result publication in the study. Otherwise, if automatic
10997         #         publication is switched on, default value is used for result name.
10998         #
10999         #  @return New GEOM.GEOM_Object, containing the found face.
11000         #
11001         #  @ref swig_todo "Example"
11002         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
11003             """
11004             Get a face of block, found in the given shape by two given edges.
11005
11006             Parameters:
11007                 theShape Block or a compound of blocks.
11008                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
11009                 theName Object name; when specified, this parameter is used
11010                         for result publication in the study. Otherwise, if automatic
11011                         publication is switched on, default value is used for result name.
11012
11013             Returns:
11014                 New GEOM.GEOM_Object, containing the found face.
11015             """
11016             # Example: see GEOM_Spanner.py
11017             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
11018             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
11019             self._autoPublish(anObj, theName, "face")
11020             return anObj
11021
11022         ## Find a face, opposite to the given one in the given block.
11023         #  @param theBlock Must be a hexahedral solid.
11024         #  @param theFace Face of \a theBlock, opposite to the desired face.
11025         #  @param theName Object name; when specified, this parameter is used
11026         #         for result publication in the study. Otherwise, if automatic
11027         #         publication is switched on, default value is used for result name.
11028         #
11029         #  @return New GEOM.GEOM_Object, containing the found face.
11030         #
11031         #  @ref swig_GetOppositeFace "Example"
11032         def GetOppositeFace(self, theBlock, theFace, theName=None):
11033             """
11034             Find a face, opposite to the given one in the given block.
11035
11036             Parameters:
11037                 theBlock Must be a hexahedral solid.
11038                 theFace Face of theBlock, opposite to the desired face.
11039                 theName Object name; when specified, this parameter is used
11040                         for result publication in the study. Otherwise, if automatic
11041                         publication is switched on, default value is used for result name.
11042
11043             Returns: 
11044                 New GEOM.GEOM_Object, containing the found face.
11045             """
11046             # Example: see GEOM_Spanner.py
11047             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
11048             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
11049             self._autoPublish(anObj, theName, "face")
11050             return anObj
11051
11052         ## Find a face of the given shape, which has minimal distance to the given point.
11053         #  @param theShape Block or a compound of blocks.
11054         #  @param thePoint Point, close to the desired face.
11055         #  @param theName Object name; when specified, this parameter is used
11056         #         for result publication in the study. Otherwise, if automatic
11057         #         publication is switched on, default value is used for result name.
11058         #
11059         #  @return New GEOM.GEOM_Object, containing the found face.
11060         #
11061         #  @ref swig_GetFaceNearPoint "Example"
11062         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
11063             """
11064             Find a face of the given shape, which has minimal distance to the given point.
11065
11066             Parameters:
11067                 theShape Block or a compound of blocks.
11068                 thePoint Point, close to the desired face.
11069                 theName Object name; when specified, this parameter is used
11070                         for result publication in the study. Otherwise, if automatic
11071                         publication is switched on, default value is used for result name.
11072
11073             Returns:
11074                 New GEOM.GEOM_Object, containing the found face.
11075             """
11076             # Example: see GEOM_Spanner.py
11077             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
11078             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
11079             self._autoPublish(anObj, theName, "face")
11080             return anObj
11081
11082         ## Find a face of block, whose outside normale has minimal angle with the given vector.
11083         #  @param theBlock Block or a compound of blocks.
11084         #  @param theVector Vector, close to the normale of the desired face.
11085         #  @param theName Object name; when specified, this parameter is used
11086         #         for result publication in the study. Otherwise, if automatic
11087         #         publication is switched on, default value is used for result name.
11088         #
11089         #  @return New GEOM.GEOM_Object, containing the found face.
11090         #
11091         #  @ref swig_todo "Example"
11092         def GetFaceByNormale(self, theBlock, theVector, theName=None):
11093             """
11094             Find a face of block, whose outside normale has minimal angle with the given vector.
11095
11096             Parameters:
11097                 theBlock Block or a compound of blocks.
11098                 theVector Vector, close to the normale of the desired face.
11099                 theName Object name; when specified, this parameter is used
11100                         for result publication in the study. Otherwise, if automatic
11101                         publication is switched on, default value is used for result name.
11102
11103             Returns:
11104                 New GEOM.GEOM_Object, containing the found face.
11105             """
11106             # Example: see GEOM_Spanner.py
11107             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
11108             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
11109             self._autoPublish(anObj, theName, "face")
11110             return anObj
11111
11112         ## Find all sub-shapes of type \a theShapeType of the given shape,
11113         #  which have minimal distance to the given point.
11114         #  @param theShape Any shape.
11115         #  @param thePoint Point, close to the desired shape.
11116         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
11117         #  @param theTolerance The tolerance for distances comparison. All shapes
11118         #                      with distances to the given point in interval
11119         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
11120         #  @param theName Object name; when specified, this parameter is used
11121         #         for result publication in the study. Otherwise, if automatic
11122         #         publication is switched on, default value is used for result name.
11123         #
11124         #  @return New GEOM_Object, containing a group of all found shapes.
11125         #
11126         #  @ref swig_GetShapesNearPoint "Example"
11127         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
11128             """
11129             Find all sub-shapes of type theShapeType of the given shape,
11130             which have minimal distance to the given point.
11131
11132             Parameters:
11133                 theShape Any shape.
11134                 thePoint Point, close to the desired shape.
11135                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
11136                 theTolerance The tolerance for distances comparison. All shapes
11137                                 with distances to the given point in interval
11138                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
11139                 theName Object name; when specified, this parameter is used
11140                         for result publication in the study. Otherwise, if automatic
11141                         publication is switched on, default value is used for result name.
11142
11143             Returns:
11144                 New GEOM_Object, containing a group of all found shapes.
11145             """
11146             # Example: see GEOM_TestOthers.py
11147             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
11148             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
11149             self._autoPublish(anObj, theName, "group")
11150             return anObj
11151
11152         # end of l3_blocks_op
11153         ## @}
11154
11155         ## @addtogroup l4_blocks_measure
11156         ## @{
11157
11158         ## Check, if the compound of blocks is given.
11159         #  To be considered as a compound of blocks, the
11160         #  given shape must satisfy the following conditions:
11161         #  - Each element of the compound should be a Block (6 faces and 12 edges).
11162         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11163         #  - The compound should be connexe.
11164         #  - The glue between two quadrangle faces should be applied.
11165         #  @param theCompound The compound to check.
11166         #  @return TRUE, if the given shape is a compound of blocks.
11167         #  If theCompound is not valid, prints all discovered errors.
11168         #
11169         #  @ref tui_measurement_tools_page "Example 1"
11170         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
11171         def CheckCompoundOfBlocks(self,theCompound):
11172             """
11173             Check, if the compound of blocks is given.
11174             To be considered as a compound of blocks, the
11175             given shape must satisfy the following conditions:
11176             - Each element of the compound should be a Block (6 faces and 12 edges).
11177             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11178             - The compound should be connexe.
11179             - The glue between two quadrangle faces should be applied.
11180
11181             Parameters:
11182                 theCompound The compound to check.
11183
11184             Returns:
11185                 TRUE, if the given shape is a compound of blocks.
11186                 If theCompound is not valid, prints all discovered errors.            
11187             """
11188             # Example: see GEOM_Spanner.py
11189             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
11190             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
11191             if IsValid == 0:
11192                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
11193                 print Descr
11194             return IsValid
11195
11196         ## Retrieve all non blocks solids and faces from \a theShape.
11197         #  @param theShape The shape to explore.
11198         #  @param theName Object name; when specified, this parameter is used
11199         #         for result publication in the study. Otherwise, if automatic
11200         #         publication is switched on, default value is used for result name.
11201         #
11202         #  @return A tuple of two GEOM_Objects. The first object is a group of all
11203         #          non block solids (= not 6 faces, or with 6 faces, but with the
11204         #          presence of non-quadrangular faces). The second object is a
11205         #          group of all non quadrangular faces.
11206         #
11207         #  @ref tui_measurement_tools_page "Example 1"
11208         #  \n @ref swig_GetNonBlocks "Example 2"
11209         def GetNonBlocks (self, theShape, theName=None):
11210             """
11211             Retrieve all non blocks solids and faces from theShape.
11212
11213             Parameters:
11214                 theShape The shape to explore.
11215                 theName Object name; when specified, this parameter is used
11216                         for result publication in the study. Otherwise, if automatic
11217                         publication is switched on, default value is used for result name.
11218
11219             Returns:
11220                 A tuple of two GEOM_Objects. The first object is a group of all
11221                 non block solids (= not 6 faces, or with 6 faces, but with the
11222                 presence of non-quadrangular faces). The second object is a
11223                 group of all non quadrangular faces.
11224
11225             Usage:
11226                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
11227             """
11228             # Example: see GEOM_Spanner.py
11229             aTuple = self.BlocksOp.GetNonBlocks(theShape)
11230             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
11231             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
11232             return aTuple
11233
11234         ## Remove all seam and degenerated edges from \a theShape.
11235         #  Unite faces and edges, sharing one surface. It means that
11236         #  this faces must have references to one C++ surface object (handle).
11237         #  @param theShape The compound or single solid to remove irregular edges from.
11238         #  @param doUnionFaces If True, then unite faces. If False (the default value),
11239         #         do not unite faces.
11240         #  @param theName Object name; when specified, this parameter is used
11241         #         for result publication in the study. Otherwise, if automatic
11242         #         publication is switched on, default value is used for result name.
11243         #
11244         #  @return Improved shape.
11245         #
11246         #  @ref swig_RemoveExtraEdges "Example"
11247         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
11248             """
11249             Remove all seam and degenerated edges from theShape.
11250             Unite faces and edges, sharing one surface. It means that
11251             this faces must have references to one C++ surface object (handle).
11252
11253             Parameters:
11254                 theShape The compound or single solid to remove irregular edges from.
11255                 doUnionFaces If True, then unite faces. If False (the default value),
11256                              do not unite faces.
11257                 theName Object name; when specified, this parameter is used
11258                         for result publication in the study. Otherwise, if automatic
11259                         publication is switched on, default value is used for result name.
11260
11261             Returns: 
11262                 Improved shape.
11263             """
11264             # Example: see GEOM_TestOthers.py
11265             nbFacesOptimum = -1 # -1 means do not unite faces
11266             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
11267             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
11268             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
11269             self._autoPublish(anObj, theName, "removeExtraEdges")
11270             return anObj
11271
11272         ## Performs union faces of \a theShape
11273         #  Unite faces sharing one surface. It means that
11274         #  these faces must have references to one C++ surface object (handle).
11275         #  @param theShape The compound or single solid that contains faces
11276         #         to perform union.
11277         #  @param theName Object name; when specified, this parameter is used
11278         #         for result publication in the study. Otherwise, if automatic
11279         #         publication is switched on, default value is used for result name.
11280         #
11281         #  @return Improved shape.
11282         #
11283         #  @ref swig_UnionFaces "Example"
11284         def UnionFaces(self, theShape, theName=None):
11285             """
11286             Performs union faces of theShape.
11287             Unite faces sharing one surface. It means that
11288             these faces must have references to one C++ surface object (handle).
11289
11290             Parameters:
11291                 theShape The compound or single solid that contains faces
11292                          to perform union.
11293                 theName Object name; when specified, this parameter is used
11294                         for result publication in the study. Otherwise, if automatic
11295                         publication is switched on, default value is used for result name.
11296
11297             Returns: 
11298                 Improved shape.
11299             """
11300             # Example: see GEOM_TestOthers.py
11301             anObj = self.BlocksOp.UnionFaces(theShape)
11302             RaiseIfFailed("UnionFaces", self.BlocksOp)
11303             self._autoPublish(anObj, theName, "unionFaces")
11304             return anObj
11305
11306         ## Check, if the given shape is a blocks compound.
11307         #  Fix all detected errors.
11308         #    \note Single block can be also fixed by this method.
11309         #  @param theShape The compound to check and improve.
11310         #  @param theName Object name; when specified, this parameter is used
11311         #         for result publication in the study. Otherwise, if automatic
11312         #         publication is switched on, default value is used for result name.
11313         #
11314         #  @return Improved compound.
11315         #
11316         #  @ref swig_CheckAndImprove "Example"
11317         def CheckAndImprove(self, theShape, theName=None):
11318             """
11319             Check, if the given shape is a blocks compound.
11320             Fix all detected errors.
11321
11322             Note:
11323                 Single block can be also fixed by this method.
11324
11325             Parameters:
11326                 theShape The compound to check and improve.
11327                 theName Object name; when specified, this parameter is used
11328                         for result publication in the study. Otherwise, if automatic
11329                         publication is switched on, default value is used for result name.
11330
11331             Returns: 
11332                 Improved compound.
11333             """
11334             # Example: see GEOM_TestOthers.py
11335             anObj = self.BlocksOp.CheckAndImprove(theShape)
11336             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
11337             self._autoPublish(anObj, theName, "improved")
11338             return anObj
11339
11340         # end of l4_blocks_measure
11341         ## @}
11342
11343         ## @addtogroup l3_blocks_op
11344         ## @{
11345
11346         ## Get all the blocks, contained in the given compound.
11347         #  @param theCompound The compound to explode.
11348         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
11349         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
11350         #  @param theName Object name; when specified, this parameter is used
11351         #         for result publication in the study. Otherwise, if automatic
11352         #         publication is switched on, default value is used for result name.
11353         #
11354         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11355         #
11356         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
11357         #
11358         #  @ref tui_explode_on_blocks "Example 1"
11359         #  \n @ref swig_MakeBlockExplode "Example 2"
11360         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
11361             """
11362             Get all the blocks, contained in the given compound.
11363
11364             Parameters:
11365                 theCompound The compound to explode.
11366                 theMinNbFaces If solid has lower number of faces, it is not a block.
11367                 theMaxNbFaces If solid has higher number of faces, it is not a block.
11368                 theName Object name; when specified, this parameter is used
11369                         for result publication in the study. Otherwise, if automatic
11370                         publication is switched on, default value is used for result name.
11371
11372             Note:
11373                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11374
11375             Returns:  
11376                 List of GEOM.GEOM_Object, containing the retrieved blocks.
11377             """
11378             # Example: see GEOM_TestOthers.py
11379             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
11380             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
11381             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
11382             for anObj in aList:
11383                 anObj.SetParameters(Parameters)
11384                 pass
11385             self._autoPublish(aList, theName, "block")
11386             return aList
11387
11388         ## Find block, containing the given point inside its volume or on boundary.
11389         #  @param theCompound Compound, to find block in.
11390         #  @param thePoint Point, close to the desired block. If the point lays on
11391         #         boundary between some blocks, we return block with nearest center.
11392         #  @param theName Object name; when specified, this parameter is used
11393         #         for result publication in the study. Otherwise, if automatic
11394         #         publication is switched on, default value is used for result name.
11395         #
11396         #  @return New GEOM.GEOM_Object, containing the found block.
11397         #
11398         #  @ref swig_todo "Example"
11399         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
11400             """
11401             Find block, containing the given point inside its volume or on boundary.
11402
11403             Parameters:
11404                 theCompound Compound, to find block in.
11405                 thePoint Point, close to the desired block. If the point lays on
11406                          boundary between some blocks, we return block with nearest center.
11407                 theName Object name; when specified, this parameter is used
11408                         for result publication in the study. Otherwise, if automatic
11409                         publication is switched on, default value is used for result name.
11410
11411             Returns:
11412                 New GEOM.GEOM_Object, containing the found block.
11413             """
11414             # Example: see GEOM_Spanner.py
11415             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
11416             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
11417             self._autoPublish(anObj, theName, "block")
11418             return anObj
11419
11420         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11421         #  @param theCompound Compound, to find block in.
11422         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
11423         #  @param theName Object name; when specified, this parameter is used
11424         #         for result publication in the study. Otherwise, if automatic
11425         #         publication is switched on, default value is used for result name.
11426         #
11427         #  @return New GEOM.GEOM_Object, containing the found block.
11428         #
11429         #  @ref swig_GetBlockByParts "Example"
11430         def GetBlockByParts(self, theCompound, theParts, theName=None):
11431             """
11432              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11433
11434              Parameters:
11435                 theCompound Compound, to find block in.
11436                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
11437                 theName Object name; when specified, this parameter is used
11438                         for result publication in the study. Otherwise, if automatic
11439                         publication is switched on, default value is used for result name.
11440
11441             Returns: 
11442                 New GEOM_Object, containing the found block.
11443             """
11444             # Example: see GEOM_TestOthers.py
11445             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
11446             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
11447             self._autoPublish(anObj, theName, "block")
11448             return anObj
11449
11450         ## Return all blocks, containing all the elements, passed as the parts.
11451         #  @param theCompound Compound, to find blocks in.
11452         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11453         #  @param theName Object name; when specified, this parameter is used
11454         #         for result publication in the study. Otherwise, if automatic
11455         #         publication is switched on, default value is used for result name.
11456         #
11457         #  @return List of GEOM.GEOM_Object, containing the found blocks.
11458         #
11459         #  @ref swig_todo "Example"
11460         def GetBlocksByParts(self, theCompound, theParts, theName=None):
11461             """
11462             Return all blocks, containing all the elements, passed as the parts.
11463
11464             Parameters:
11465                 theCompound Compound, to find blocks in.
11466                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11467                 theName Object name; when specified, this parameter is used
11468                         for result publication in the study. Otherwise, if automatic
11469                         publication is switched on, default value is used for result name.
11470
11471             Returns:
11472                 List of GEOM.GEOM_Object, containing the found blocks.
11473             """
11474             # Example: see GEOM_Spanner.py
11475             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11476             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11477             self._autoPublish(aList, theName, "block")
11478             return aList
11479
11480         ## Multi-transformate block and glue the result.
11481         #  Transformation is defined so, as to superpose direction faces.
11482         #  @param Block Hexahedral solid to be multi-transformed.
11483         #  @param DirFace1 ID of First direction face.
11484         #  @param DirFace2 ID of Second direction face.
11485         #  @param NbTimes Quantity of transformations to be done.
11486         #  @param theName Object name; when specified, this parameter is used
11487         #         for result publication in the study. Otherwise, if automatic
11488         #         publication is switched on, default value is used for result name.
11489         #
11490         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11491         #
11492         #  @return New GEOM.GEOM_Object, containing the result shape.
11493         #
11494         #  @ref tui_multi_transformation "Example"
11495         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11496             """
11497             Multi-transformate block and glue the result.
11498             Transformation is defined so, as to superpose direction faces.
11499
11500             Parameters:
11501                 Block Hexahedral solid to be multi-transformed.
11502                 DirFace1 ID of First direction face.
11503                 DirFace2 ID of Second direction face.
11504                 NbTimes Quantity of transformations to be done.
11505                 theName Object name; when specified, this parameter is used
11506                         for result publication in the study. Otherwise, if automatic
11507                         publication is switched on, default value is used for result name.
11508
11509             Note:
11510                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11511
11512             Returns:
11513                 New GEOM.GEOM_Object, containing the result shape.
11514             """
11515             # Example: see GEOM_Spanner.py
11516             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11517             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11518             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11519             anObj.SetParameters(Parameters)
11520             self._autoPublish(anObj, theName, "transformed")
11521             return anObj
11522
11523         ## Multi-transformate block and glue the result.
11524         #  @param Block Hexahedral solid to be multi-transformed.
11525         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11526         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11527         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11528         #  @param theName Object name; when specified, this parameter is used
11529         #         for result publication in the study. Otherwise, if automatic
11530         #         publication is switched on, default value is used for result name.
11531         #
11532         #  @return New GEOM.GEOM_Object, containing the result shape.
11533         #
11534         #  @ref tui_multi_transformation "Example"
11535         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11536                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11537             """
11538             Multi-transformate block and glue the result.
11539
11540             Parameters:
11541                 Block Hexahedral solid to be multi-transformed.
11542                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11543                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11544                 NbTimesU,NbTimesV Quantity of transformations to be done.
11545                 theName Object name; when specified, this parameter is used
11546                         for result publication in the study. Otherwise, if automatic
11547                         publication is switched on, default value is used for result name.
11548
11549             Returns:
11550                 New GEOM.GEOM_Object, containing the result shape.
11551             """
11552             # Example: see GEOM_Spanner.py
11553             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11554               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11555             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11556                                                             DirFace1V, DirFace2V, NbTimesV)
11557             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11558             anObj.SetParameters(Parameters)
11559             self._autoPublish(anObj, theName, "transformed")
11560             return anObj
11561
11562         ## Build all possible propagation groups.
11563         #  Propagation group is a set of all edges, opposite to one (main)
11564         #  edge of this group directly or through other opposite edges.
11565         #  Notion of Opposite Edge make sence only on quadrangle face.
11566         #  @param theShape Shape to build propagation groups on.
11567         #  @param theName Object name; when specified, this parameter is used
11568         #         for result publication in the study. Otherwise, if automatic
11569         #         publication is switched on, default value is used for result name.
11570         #
11571         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11572         #
11573         #  @ref swig_Propagate "Example"
11574         def Propagate(self, theShape, theName=None):
11575             """
11576             Build all possible propagation groups.
11577             Propagation group is a set of all edges, opposite to one (main)
11578             edge of this group directly or through other opposite edges.
11579             Notion of Opposite Edge make sence only on quadrangle face.
11580
11581             Parameters:
11582                 theShape Shape to build propagation groups on.
11583                 theName Object name; when specified, this parameter is used
11584                         for result publication in the study. Otherwise, if automatic
11585                         publication is switched on, default value is used for result name.
11586
11587             Returns:
11588                 List of GEOM.GEOM_Object, each of them is a propagation group.
11589             """
11590             # Example: see GEOM_TestOthers.py
11591             listChains = self.BlocksOp.Propagate(theShape)
11592             RaiseIfFailed("Propagate", self.BlocksOp)
11593             self._autoPublish(listChains, theName, "propagate")
11594             return listChains
11595
11596         # end of l3_blocks_op
11597         ## @}
11598
11599         ## @addtogroup l3_groups
11600         ## @{
11601
11602         ## Creates a new group which will store sub-shapes of theMainShape
11603         #  @param theMainShape is a GEOM object on which the group is selected
11604         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
11605         #  @param theName Object name; when specified, this parameter is used
11606         #         for result publication in the study. Otherwise, if automatic
11607         #         publication is switched on, default value is used for result name.
11608         #
11609         #  @return a newly created GEOM group (GEOM.GEOM_Object)
11610         #
11611         #  @ref tui_working_with_groups_page "Example 1"
11612         #  \n @ref swig_CreateGroup "Example 2"
11613         def CreateGroup(self, theMainShape, theShapeType, theName=None):
11614             """
11615             Creates a new group which will store sub-shapes of theMainShape
11616
11617             Parameters:
11618                theMainShape is a GEOM object on which the group is selected
11619                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
11620                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
11621                 theName Object name; when specified, this parameter is used
11622                         for result publication in the study. Otherwise, if automatic
11623                         publication is switched on, default value is used for result name.
11624
11625             Returns:
11626                a newly created GEOM group
11627
11628             Example of usage:
11629                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
11630                 
11631             """
11632             # Example: see GEOM_TestOthers.py
11633             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
11634             RaiseIfFailed("CreateGroup", self.GroupOp)
11635             self._autoPublish(anObj, theName, "group")
11636             return anObj
11637
11638         ## Adds a sub-object with ID theSubShapeId to the group
11639         #  @param theGroup is a GEOM group to which the new sub-shape is added
11640         #  @param theSubShapeID is a sub-shape ID in the main object.
11641         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11642         #
11643         #  @ref tui_working_with_groups_page "Example"
11644         def AddObject(self,theGroup, theSubShapeID):
11645             """
11646             Adds a sub-object with ID theSubShapeId to the group
11647
11648             Parameters:
11649                 theGroup       is a GEOM group to which the new sub-shape is added
11650                 theSubShapeID  is a sub-shape ID in the main object.
11651
11652             Note:
11653                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
11654             """
11655             # Example: see GEOM_TestOthers.py
11656             self.GroupOp.AddObject(theGroup, theSubShapeID)
11657             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
11658                 RaiseIfFailed("AddObject", self.GroupOp)
11659                 pass
11660             pass
11661
11662         ## Removes a sub-object with ID \a theSubShapeId from the group
11663         #  @param theGroup is a GEOM group from which the new sub-shape is removed
11664         #  @param theSubShapeID is a sub-shape ID in the main object.
11665         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11666         #
11667         #  @ref tui_working_with_groups_page "Example"
11668         def RemoveObject(self,theGroup, theSubShapeID):
11669             """
11670             Removes a sub-object with ID theSubShapeId from the group
11671
11672             Parameters:
11673                 theGroup is a GEOM group from which the new sub-shape is removed
11674                 theSubShapeID is a sub-shape ID in the main object.
11675
11676             Note:
11677                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11678             """
11679             # Example: see GEOM_TestOthers.py
11680             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
11681             RaiseIfFailed("RemoveObject", self.GroupOp)
11682             pass
11683
11684         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11685         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11686         #  @param theSubShapes is a list of sub-shapes to be added.
11687         #
11688         #  @ref tui_working_with_groups_page "Example"
11689         def UnionList (self,theGroup, theSubShapes):
11690             """
11691             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11692
11693             Parameters:
11694                 theGroup is a GEOM group to which the new sub-shapes are added.
11695                 theSubShapes is a list of sub-shapes to be added.
11696             """
11697             # Example: see GEOM_TestOthers.py
11698             self.GroupOp.UnionList(theGroup, theSubShapes)
11699             RaiseIfFailed("UnionList", self.GroupOp)
11700             pass
11701
11702         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11703         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11704         #  @param theSubShapes is a list of indices of sub-shapes to be added.
11705         #
11706         #  @ref swig_UnionIDs "Example"
11707         def UnionIDs(self,theGroup, theSubShapes):
11708             """
11709             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11710
11711             Parameters:
11712                 theGroup is a GEOM group to which the new sub-shapes are added.
11713                 theSubShapes is a list of indices of sub-shapes to be added.
11714             """
11715             # Example: see GEOM_TestOthers.py
11716             self.GroupOp.UnionIDs(theGroup, theSubShapes)
11717             RaiseIfFailed("UnionIDs", self.GroupOp)
11718             pass
11719
11720         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11721         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11722         #  @param theSubShapes is a list of sub-shapes to be removed.
11723         #
11724         #  @ref tui_working_with_groups_page "Example"
11725         def DifferenceList (self,theGroup, theSubShapes):
11726             """
11727             Removes from the group all the given shapes. No errors, if some shapes are not included.
11728
11729             Parameters:
11730                 theGroup is a GEOM group from which the sub-shapes are removed.
11731                 theSubShapes is a list of sub-shapes to be removed.
11732             """
11733             # Example: see GEOM_TestOthers.py
11734             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11735             RaiseIfFailed("DifferenceList", self.GroupOp)
11736             pass
11737
11738         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11739         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11740         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
11741         #
11742         #  @ref swig_DifferenceIDs "Example"
11743         def DifferenceIDs(self,theGroup, theSubShapes):
11744             """
11745             Removes from the group all the given shapes. No errors, if some shapes are not included.
11746
11747             Parameters:
11748                 theGroup is a GEOM group from which the sub-shapes are removed.
11749                 theSubShapes is a list of indices of sub-shapes to be removed.
11750             """            
11751             # Example: see GEOM_TestOthers.py
11752             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
11753             RaiseIfFailed("DifferenceIDs", self.GroupOp)
11754             pass
11755
11756         ## Union of two groups.
11757         #  New group is created. It will contain all entities
11758         #  which are present in groups theGroup1 and theGroup2.
11759         #  @param theGroup1, theGroup2 are the initial GEOM groups
11760         #                              to create the united group from.
11761         #  @param theName Object name; when specified, this parameter is used
11762         #         for result publication in the study. Otherwise, if automatic
11763         #         publication is switched on, default value is used for result name.
11764         #
11765         #  @return a newly created GEOM group.
11766         #
11767         #  @ref tui_union_groups_anchor "Example"
11768         def UnionGroups (self, theGroup1, theGroup2, theName=None):
11769             """
11770             Union of two groups.
11771             New group is created. It will contain all entities
11772             which are present in groups theGroup1 and theGroup2.
11773
11774             Parameters:
11775                 theGroup1, theGroup2 are the initial GEOM groups
11776                                      to create the united group from.
11777                 theName Object name; when specified, this parameter is used
11778                         for result publication in the study. Otherwise, if automatic
11779                         publication is switched on, default value is used for result name.
11780
11781             Returns:
11782                 a newly created GEOM group.
11783             """
11784             # Example: see GEOM_TestOthers.py
11785             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
11786             RaiseIfFailed("UnionGroups", self.GroupOp)
11787             self._autoPublish(aGroup, theName, "group")
11788             return aGroup
11789
11790         ## Intersection of two groups.
11791         #  New group is created. It will contain only those entities
11792         #  which are present in both groups theGroup1 and theGroup2.
11793         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11794         #  @param theName Object name; when specified, this parameter is used
11795         #         for result publication in the study. Otherwise, if automatic
11796         #         publication is switched on, default value is used for result name.
11797         #
11798         #  @return a newly created GEOM group.
11799         #
11800         #  @ref tui_intersect_groups_anchor "Example"
11801         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
11802             """
11803             Intersection of two groups.
11804             New group is created. It will contain only those entities
11805             which are present in both groups theGroup1 and theGroup2.
11806
11807             Parameters:
11808                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11809                 theName Object name; when specified, this parameter is used
11810                         for result publication in the study. Otherwise, if automatic
11811                         publication is switched on, default value is used for result name.
11812
11813             Returns:
11814                 a newly created GEOM group.
11815             """
11816             # Example: see GEOM_TestOthers.py
11817             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
11818             RaiseIfFailed("IntersectGroups", self.GroupOp)
11819             self._autoPublish(aGroup, theName, "group")
11820             return aGroup
11821
11822         ## Cut of two groups.
11823         #  New group is created. It will contain entities which are
11824         #  present in group theGroup1 but are not present in group theGroup2.
11825         #  @param theGroup1 is a GEOM group to include elements of.
11826         #  @param theGroup2 is a GEOM group to exclude elements of.
11827         #  @param theName Object name; when specified, this parameter is used
11828         #         for result publication in the study. Otherwise, if automatic
11829         #         publication is switched on, default value is used for result name.
11830         #
11831         #  @return a newly created GEOM group.
11832         #
11833         #  @ref tui_cut_groups_anchor "Example"
11834         def CutGroups (self, theGroup1, theGroup2, theName=None):
11835             """
11836             Cut of two groups.
11837             New group is created. It will contain entities which are
11838             present in group theGroup1 but are not present in group theGroup2.
11839
11840             Parameters:
11841                 theGroup1 is a GEOM group to include elements of.
11842                 theGroup2 is a GEOM group to exclude elements of.
11843                 theName Object name; when specified, this parameter is used
11844                         for result publication in the study. Otherwise, if automatic
11845                         publication is switched on, default value is used for result name.
11846
11847             Returns:
11848                 a newly created GEOM group.
11849             """
11850             # Example: see GEOM_TestOthers.py
11851             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
11852             RaiseIfFailed("CutGroups", self.GroupOp)
11853             self._autoPublish(aGroup, theName, "group")
11854             return aGroup
11855
11856         ## Union of list of groups.
11857         #  New group is created. It will contain all entities that are
11858         #  present in groups listed in theGList.
11859         #  @param theGList is a list of GEOM groups to create the united group from.
11860         #  @param theName Object name; when specified, this parameter is used
11861         #         for result publication in the study. Otherwise, if automatic
11862         #         publication is switched on, default value is used for result name.
11863         #
11864         #  @return a newly created GEOM group.
11865         #
11866         #  @ref tui_union_groups_anchor "Example"
11867         def UnionListOfGroups (self, theGList, theName=None):
11868             """
11869             Union of list of groups.
11870             New group is created. It will contain all entities that are
11871             present in groups listed in theGList.
11872
11873             Parameters:
11874                 theGList is a list of GEOM groups to create the united group from.
11875                 theName Object name; when specified, this parameter is used
11876                         for result publication in the study. Otherwise, if automatic
11877                         publication is switched on, default value is used for result name.
11878
11879             Returns:
11880                 a newly created GEOM group.
11881             """
11882             # Example: see GEOM_TestOthers.py
11883             aGroup = self.GroupOp.UnionListOfGroups(theGList)
11884             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
11885             self._autoPublish(aGroup, theName, "group")
11886             return aGroup
11887
11888         ## Cut of lists of groups.
11889         #  New group is created. It will contain only entities
11890         #  which are present in groups listed in theGList.
11891         #  @param theGList is a list of GEOM groups to include elements of.
11892         #  @param theName Object name; when specified, this parameter is used
11893         #         for result publication in the study. Otherwise, if automatic
11894         #         publication is switched on, default value is used for result name.
11895         #
11896         #  @return a newly created GEOM group.
11897         #
11898         #  @ref tui_intersect_groups_anchor "Example"
11899         def IntersectListOfGroups (self, theGList, theName=None):
11900             """
11901             Cut of lists of groups.
11902             New group is created. It will contain only entities
11903             which are present in groups listed in theGList.
11904
11905             Parameters:
11906                 theGList is a list of GEOM groups to include elements of.
11907                 theName Object name; when specified, this parameter is used
11908                         for result publication in the study. Otherwise, if automatic
11909                         publication is switched on, default value is used for result name.
11910
11911             Returns:
11912                 a newly created GEOM group.
11913             """
11914             # Example: see GEOM_TestOthers.py
11915             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
11916             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
11917             self._autoPublish(aGroup, theName, "group")
11918             return aGroup
11919
11920         ## Cut of lists of groups.
11921         #  New group is created. It will contain only entities
11922         #  which are present in groups listed in theGList1 but 
11923         #  are not present in groups from theGList2.
11924         #  @param theGList1 is a list of GEOM groups to include elements of.
11925         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11926         #  @param theName Object name; when specified, this parameter is used
11927         #         for result publication in the study. Otherwise, if automatic
11928         #         publication is switched on, default value is used for result name.
11929         #
11930         #  @return a newly created GEOM group.
11931         #
11932         #  @ref tui_cut_groups_anchor "Example"
11933         def CutListOfGroups (self, theGList1, theGList2, theName=None):
11934             """
11935             Cut of lists of groups.
11936             New group is created. It will contain only entities
11937             which are present in groups listed in theGList1 but 
11938             are not present in groups from theGList2.
11939
11940             Parameters:
11941                 theGList1 is a list of GEOM groups to include elements of.
11942                 theGList2 is a list of GEOM groups to exclude elements of.
11943                 theName Object name; when specified, this parameter is used
11944                         for result publication in the study. Otherwise, if automatic
11945                         publication is switched on, default value is used for result name.
11946
11947             Returns:
11948                 a newly created GEOM group.
11949             """
11950             # Example: see GEOM_TestOthers.py
11951             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
11952             RaiseIfFailed("CutListOfGroups", self.GroupOp)
11953             self._autoPublish(aGroup, theName, "group")
11954             return aGroup
11955
11956         ## Returns a list of sub-objects ID stored in the group
11957         #  @param theGroup is a GEOM group for which a list of IDs is requested
11958         #
11959         #  @ref swig_GetObjectIDs "Example"
11960         def GetObjectIDs(self,theGroup):
11961             """
11962             Returns a list of sub-objects ID stored in the group
11963
11964             Parameters:
11965                 theGroup is a GEOM group for which a list of IDs is requested
11966             """
11967             # Example: see GEOM_TestOthers.py
11968             ListIDs = self.GroupOp.GetObjects(theGroup)
11969             RaiseIfFailed("GetObjects", self.GroupOp)
11970             return ListIDs
11971
11972         ## Returns a type of sub-objects stored in the group
11973         #  @param theGroup is a GEOM group which type is returned.
11974         #
11975         #  @ref swig_GetType "Example"
11976         def GetType(self,theGroup):
11977             """
11978             Returns a type of sub-objects stored in the group
11979
11980             Parameters:
11981                 theGroup is a GEOM group which type is returned.
11982             """
11983             # Example: see GEOM_TestOthers.py
11984             aType = self.GroupOp.GetType(theGroup)
11985             RaiseIfFailed("GetType", self.GroupOp)
11986             return aType
11987
11988         ## Convert a type of geom object from id to string value
11989         #  @param theId is a GEOM obect type id.
11990         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11991         #  @ref swig_GetType "Example"
11992         def ShapeIdToType(self, theId):
11993             """
11994             Convert a type of geom object from id to string value
11995
11996             Parameters:
11997                 theId is a GEOM obect type id.
11998                 
11999             Returns:
12000                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12001             """
12002             if theId == 0:
12003                 return "COPY"
12004             if theId == 1:
12005                 return "IMPORT"
12006             if theId == 2:
12007                 return "POINT"
12008             if theId == 3:
12009                 return "VECTOR"
12010             if theId == 4:
12011                 return "PLANE"
12012             if theId == 5:
12013                 return "LINE"
12014             if theId == 6:
12015                 return "TORUS"
12016             if theId == 7:
12017                 return "BOX"
12018             if theId == 8:
12019                 return "CYLINDER"
12020             if theId == 9:
12021                 return "CONE"
12022             if theId == 10:
12023                 return "SPHERE"
12024             if theId == 11:
12025                 return "PRISM"
12026             if theId == 12:
12027                 return "REVOLUTION"
12028             if theId == 13:
12029                 return "BOOLEAN"
12030             if theId == 14:
12031                 return "PARTITION"
12032             if theId == 15:
12033                 return "POLYLINE"
12034             if theId == 16:
12035                 return "CIRCLE"
12036             if theId == 17:
12037                 return "SPLINE"
12038             if theId == 18:
12039                 return "ELLIPSE"
12040             if theId == 19:
12041                 return "CIRC_ARC"
12042             if theId == 20:
12043                 return "FILLET"
12044             if theId == 21:
12045                 return "CHAMFER"
12046             if theId == 22:
12047                 return "EDGE"
12048             if theId == 23:
12049                 return "WIRE"
12050             if theId == 24:
12051                 return "FACE"
12052             if theId == 25:
12053                 return "SHELL"
12054             if theId == 26:
12055                 return "SOLID"
12056             if theId == 27:
12057                 return "COMPOUND"
12058             if theId == 28:
12059                 return "SUBSHAPE"
12060             if theId == 29:
12061                 return "PIPE"
12062             if theId == 30:
12063                 return "ARCHIMEDE"
12064             if theId == 31:
12065                 return "FILLING"
12066             if theId == 32:
12067                 return "EXPLODE"
12068             if theId == 33:
12069                 return "GLUED"
12070             if theId == 34:
12071                 return "SKETCHER"
12072             if theId == 35:
12073                 return "CDG"
12074             if theId == 36:
12075                 return "FREE_BOUNDS"
12076             if theId == 37:
12077                 return "GROUP"
12078             if theId == 38:
12079                 return "BLOCK"
12080             if theId == 39:
12081                 return "MARKER"
12082             if theId == 40:
12083                 return "THRUSECTIONS"
12084             if theId == 41:
12085                 return "COMPOUNDFILTER"
12086             if theId == 42:
12087                 return "SHAPES_ON_SHAPE"
12088             if theId == 43:
12089                 return "ELLIPSE_ARC"
12090             if theId == 44:
12091                 return "3DSKETCHER"
12092             if theId == 45:
12093                 return "FILLET_2D"
12094             if theId == 46:
12095                 return "FILLET_1D"
12096             if theId == 201:
12097                 return "PIPETSHAPE"
12098             return "Shape Id not exist."
12099
12100         ## Returns a main shape associated with the group
12101         #  @param theGroup is a GEOM group for which a main shape object is requested
12102         #  @return a GEOM object which is a main shape for theGroup
12103         #
12104         #  @ref swig_GetMainShape "Example"
12105         def GetMainShape(self,theGroup):
12106             """
12107             Returns a main shape associated with the group
12108
12109             Parameters:
12110                 theGroup is a GEOM group for which a main shape object is requested
12111
12112             Returns:
12113                 a GEOM object which is a main shape for theGroup
12114
12115             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
12116             """
12117             # Example: see GEOM_TestOthers.py
12118             anObj = self.GroupOp.GetMainShape(theGroup)
12119             RaiseIfFailed("GetMainShape", self.GroupOp)
12120             return anObj
12121
12122         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
12123         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12124         #  @param theShape given shape (see GEOM.GEOM_Object)
12125         #  @param min_length minimum length of edges of theShape
12126         #  @param max_length maximum length of edges of theShape
12127         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12128         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12129         #  @param theName Object name; when specified, this parameter is used
12130         #         for result publication in the study. Otherwise, if automatic
12131         #         publication is switched on, default value is used for result name.
12132         #
12133         #  @return a newly created GEOM group of edges
12134         #
12135         #  @@ref swig_todo "Example"
12136         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
12137             """
12138             Create group of edges of theShape, whose length is in range [min_length, max_length].
12139             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12140
12141             Parameters:
12142                 theShape given shape
12143                 min_length minimum length of edges of theShape
12144                 max_length maximum length of edges of theShape
12145                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12146                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12147                 theName Object name; when specified, this parameter is used
12148                         for result publication in the study. Otherwise, if automatic
12149                         publication is switched on, default value is used for result name.
12150
12151              Returns:
12152                 a newly created GEOM group of edges.
12153             """
12154             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
12155             edges_in_range = []
12156             for edge in edges:
12157                 Props = self.BasicProperties(edge)
12158                 if min_length <= Props[0] and Props[0] <= max_length:
12159                     if (not include_min) and (min_length == Props[0]):
12160                         skip = 1
12161                     else:
12162                         if (not include_max) and (Props[0] == max_length):
12163                             skip = 1
12164                         else:
12165                             edges_in_range.append(edge)
12166
12167             if len(edges_in_range) <= 0:
12168                 print "No edges found by given criteria"
12169                 return None
12170
12171             # note: auto-publishing is done in self.CreateGroup()
12172             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
12173             self.UnionList(group_edges, edges_in_range)
12174
12175             return group_edges
12176
12177         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
12178         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12179         #  @param min_length minimum length of edges of selected shape
12180         #  @param max_length maximum length of edges of selected shape
12181         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12182         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12183         #  @return a newly created GEOM group of edges
12184         #  @ref swig_todo "Example"
12185         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
12186             """
12187             Create group of edges of selected shape, whose length is in range [min_length, max_length].
12188             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12189
12190             Parameters:
12191                 min_length minimum length of edges of selected shape
12192                 max_length maximum length of edges of selected shape
12193                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12194                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12195
12196              Returns:
12197                 a newly created GEOM group of edges.
12198             """
12199             nb_selected = sg.SelectedCount()
12200             if nb_selected < 1:
12201                 print "Select a shape before calling this function, please."
12202                 return 0
12203             if nb_selected > 1:
12204                 print "Only one shape must be selected"
12205                 return 0
12206
12207             id_shape = sg.getSelected(0)
12208             shape = IDToObject( id_shape )
12209
12210             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
12211
12212             left_str  = " < "
12213             right_str = " < "
12214             if include_min: left_str  = " <= "
12215             if include_max: right_str  = " <= "
12216
12217             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
12218                                     + left_str + "length" + right_str + `max_length`)
12219
12220             sg.updateObjBrowser(1)
12221
12222             return group_edges
12223
12224         # end of l3_groups
12225         ## @}
12226
12227         ## @addtogroup l4_advanced
12228         ## @{
12229
12230         ## Create a T-shape object with specified caracteristics for the main
12231         #  and the incident pipes (radius, width, half-length).
12232         #  The extremities of the main pipe are located on junctions points P1 and P2.
12233         #  The extremity of the incident pipe is located on junction point P3.
12234         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12235         #  the main plane of the T-shape is XOY.
12236         #
12237         #  @param theR1 Internal radius of main pipe
12238         #  @param theW1 Width of main pipe
12239         #  @param theL1 Half-length of main pipe
12240         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12241         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12242         #  @param theL2 Half-length of incident pipe
12243         #
12244         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12245         #  @param theP1 1st junction point of main pipe
12246         #  @param theP2 2nd junction point of main pipe
12247         #  @param theP3 Junction point of incident pipe
12248         #
12249         #  @param theRL Internal radius of left thickness reduction
12250         #  @param theWL Width of left thickness reduction
12251         #  @param theLtransL Length of left transition part
12252         #  @param theLthinL Length of left thin part
12253         #
12254         #  @param theRR Internal radius of right thickness reduction
12255         #  @param theWR Width of right thickness reduction
12256         #  @param theLtransR Length of right transition part
12257         #  @param theLthinR Length of right thin part
12258         #
12259         #  @param theRI Internal radius of incident thickness reduction
12260         #  @param theWI Width of incident thickness reduction
12261         #  @param theLtransI Length of incident transition part
12262         #  @param theLthinI Length of incident thin part
12263         #
12264         #  @param theName Object name; when specified, this parameter is used
12265         #         for result publication in the study. Otherwise, if automatic
12266         #         publication is switched on, default value is used for result name.
12267         #
12268         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12269         #
12270         #  @ref tui_creation_pipetshape "Example"
12271         def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
12272                             theHexMesh=True, theP1=None, theP2=None, theP3=None,
12273                             theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12274                             theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12275                             theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12276                             theName=None):
12277             """
12278             Create a T-shape object with specified caracteristics for the main
12279             and the incident pipes (radius, width, half-length).
12280             The extremities of the main pipe are located on junctions points P1 and P2.
12281             The extremity of the incident pipe is located on junction point P3.
12282             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12283             the main plane of the T-shape is XOY.
12284
12285             Parameters:
12286                 theR1 Internal radius of main pipe
12287                 theW1 Width of main pipe
12288                 theL1 Half-length of main pipe
12289                 theR2 Internal radius of incident pipe (R2 < R1)
12290                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12291                 theL2 Half-length of incident pipe
12292                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12293                 theP1 1st junction point of main pipe
12294                 theP2 2nd junction point of main pipe
12295                 theP3 Junction point of incident pipe
12296
12297                 theRL Internal radius of left thickness reduction
12298                 theWL Width of left thickness reduction
12299                 theLtransL Length of left transition part
12300                 theLthinL Length of left thin part
12301
12302                 theRR Internal radius of right thickness reduction
12303                 theWR Width of right thickness reduction
12304                 theLtransR Length of right transition part
12305                 theLthinR Length of right thin part
12306
12307                 theRI Internal radius of incident thickness reduction
12308                 theWI Width of incident thickness reduction
12309                 theLtransI Length of incident transition part
12310                 theLthinI Length of incident thin part
12311
12312                 theName Object name; when specified, this parameter is used
12313                         for result publication in the study. Otherwise, if automatic
12314                         publication is switched on, default value is used for result name.
12315
12316             Returns:
12317                 List of GEOM_Object, containing the created shape and propagation groups.
12318
12319             Example of usage:
12320                 # create PipeTShape object
12321                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
12322                 # create PipeTShape object with position
12323                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
12324                 # create PipeTShape object with left thickness reduction
12325                 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
12326             """
12327             theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
12328             if (theP1 and theP2 and theP3):
12329                 anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12330                                                                 theRL, theWL, theLtransL, theLthinL,
12331                                                                 theRR, theWR, theLtransR, theLthinR,
12332                                                                 theRI, theWI, theLtransI, theLthinI,
12333                                                                 theHexMesh, theP1, theP2, theP3)
12334             else:
12335                 anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
12336                                                     theRL, theWL, theLtransL, theLthinL,
12337                                                     theRR, theWR, theLtransR, theLthinR,
12338                                                     theRI, theWI, theLtransI, theLthinI,
12339                                                     theHexMesh)
12340             RaiseIfFailed("MakePipeTShape", self.AdvOp)
12341             if Parameters: anObj[0].SetParameters(Parameters)
12342             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12343             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12344             return anObj
12345
12346         ## Create a T-shape object with chamfer and with specified caracteristics for the main
12347         #  and the incident pipes (radius, width, half-length). The chamfer is
12348         #  created on the junction of the pipes.
12349         #  The extremities of the main pipe are located on junctions points P1 and P2.
12350         #  The extremity of the incident pipe is located on junction point P3.
12351         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12352         #  the main plane of the T-shape is XOY.
12353         #  @param theR1 Internal radius of main pipe
12354         #  @param theW1 Width of main pipe
12355         #  @param theL1 Half-length of main pipe
12356         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12357         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12358         #  @param theL2 Half-length of incident pipe
12359         #  @param theH Height of the chamfer.
12360         #  @param theW Width of the chamfer.
12361         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12362         #  @param theP1 1st junction point of main pipe
12363         #  @param theP2 2nd junction point of main pipe
12364         #  @param theP3 Junction point of incident pipe
12365         #
12366         #  @param theRL Internal radius of left thickness reduction
12367         #  @param theWL Width of left thickness reduction
12368         #  @param theLtransL Length of left transition part
12369         #  @param theLthinL Length of left thin part
12370         #
12371         #  @param theRR Internal radius of right thickness reduction
12372         #  @param theWR Width of right thickness reduction
12373         #  @param theLtransR Length of right transition part
12374         #  @param theLthinR Length of right thin part
12375         #
12376         #  @param theRI Internal radius of incident thickness reduction
12377         #  @param theWI Width of incident thickness reduction
12378         #  @param theLtransI Length of incident transition part
12379         #  @param theLthinI Length of incident thin part
12380         #
12381         #  @param theName Object name; when specified, this parameter is used
12382         #         for result publication in the study. Otherwise, if automatic
12383         #         publication is switched on, default value is used for result name.
12384         #
12385         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12386         #
12387         #  @ref tui_creation_pipetshape "Example"
12388         def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
12389                                    theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12390                                    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12391                                    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12392                                    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12393                                    theName=None):
12394             """
12395             Create a T-shape object with chamfer and with specified caracteristics for the main
12396             and the incident pipes (radius, width, half-length). The chamfer is
12397             created on the junction of the pipes.
12398             The extremities of the main pipe are located on junctions points P1 and P2.
12399             The extremity of the incident pipe is located on junction point P3.
12400             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12401             the main plane of the T-shape is XOY.
12402
12403             Parameters:
12404                 theR1 Internal radius of main pipe
12405                 theW1 Width of main pipe
12406                 theL1 Half-length of main pipe
12407                 theR2 Internal radius of incident pipe (R2 < R1)
12408                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12409                 theL2 Half-length of incident pipe
12410                 theH Height of the chamfer.
12411                 theW Width of the chamfer.
12412                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12413                 theP1 1st junction point of main pipe
12414                 theP2 2nd junction point of main pipe
12415                 theP3 Junction point of incident pipe
12416
12417                 theRL Internal radius of left thickness reduction
12418                 theWL Width of left thickness reduction
12419                 theLtransL Length of left transition part
12420                 theLthinL Length of left thin part
12421
12422                 theRR Internal radius of right thickness reduction
12423                 theWR Width of right thickness reduction
12424                 theLtransR Length of right transition part
12425                 theLthinR Length of right thin part
12426
12427                 theRI Internal radius of incident thickness reduction
12428                 theWI Width of incident thickness reduction
12429                 theLtransI Length of incident transition part
12430                 theLthinI Length of incident thin part
12431
12432                 theName Object name; when specified, this parameter is used
12433                         for result publication in the study. Otherwise, if automatic
12434                         publication is switched on, default value is used for result name.
12435
12436             Returns:
12437                 List of GEOM_Object, containing the created shape and propagation groups.
12438
12439             Example of usage:
12440                 # create PipeTShape with chamfer object
12441                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
12442                 # create PipeTShape with chamfer object with position
12443                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
12444                 # create PipeTShape with chamfer object with left thickness reduction
12445                 pipetshapechamfer_thr = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
12446             """
12447             theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
12448             if (theP1 and theP2 and theP3):
12449               anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12450                                                                      theRL, theWL, theLtransL, theLthinL,
12451                                                                      theRR, theWR, theLtransR, theLthinR,
12452                                                                      theRI, theWI, theLtransI, theLthinI,
12453                                                                      theH, theW, theHexMesh, theP1, theP2, theP3)
12454             else:
12455               anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
12456                                                          theRL, theWL, theLtransL, theLthinL,
12457                                                          theRR, theWR, theLtransR, theLthinR,
12458                                                          theRI, theWI, theLtransI, theLthinI,
12459                                                          theH, theW, theHexMesh)
12460             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
12461             if Parameters: anObj[0].SetParameters(Parameters)
12462             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12463             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12464             return anObj
12465
12466         ## Create a T-shape object with fillet and with specified caracteristics for the main
12467         #  and the incident pipes (radius, width, half-length). The fillet is
12468         #  created on the junction of the pipes.
12469         #  The extremities of the main pipe are located on junctions points P1 and P2.
12470         #  The extremity of the incident pipe is located on junction point P3.
12471         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12472         #  the main plane of the T-shape is XOY.
12473         #  @param theR1 Internal radius of main pipe
12474         #  @param theW1 Width of main pipe
12475         #  @param theL1 Half-length of main pipe
12476         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12477         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12478         #  @param theL2 Half-length of incident pipe
12479         #  @param theRF Radius of curvature of fillet.
12480         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12481         #  @param theP1 1st junction point of main pipe
12482         #  @param theP2 2nd junction point of main pipe
12483         #  @param theP3 Junction point of incident pipe
12484         #
12485         #  @param theRL Internal radius of left thickness reduction
12486         #  @param theWL Width of left thickness reduction
12487         #  @param theLtransL Length of left transition part
12488         #  @param theLthinL Length of left thin part
12489         #
12490         #  @param theRR Internal radius of right thickness reduction
12491         #  @param theWR Width of right thickness reduction
12492         #  @param theLtransR Length of right transition part
12493         #  @param theLthinR Length of right thin part
12494         #
12495         #  @param theRI Internal radius of incident thickness reduction
12496         #  @param theWI Width of incident thickness reduction
12497         #  @param theLtransI Length of incident transition part
12498         #  @param theLthinI Length of incident thin part
12499         #
12500         #  @param theName Object name; when specified, this parameter is used
12501         #         for result publication in the study. Otherwise, if automatic
12502         #         publication is switched on, default value is used for result name.
12503         #
12504         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12505         #
12506         #  @ref tui_creation_pipetshape "Example"
12507         def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
12508                                   theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12509                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12510                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12511                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12512                                   theName=None):
12513             """
12514             Create a T-shape object with fillet and with specified caracteristics for the main
12515             and the incident pipes (radius, width, half-length). The fillet is
12516             created on the junction of the pipes.
12517             The extremities of the main pipe are located on junctions points P1 and P2.
12518             The extremity of the incident pipe is located on junction point P3.
12519
12520             Parameters:
12521                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12522                 the main plane of the T-shape is XOY.
12523                 theR1 Internal radius of main pipe
12524                 theW1 Width of main pipe
12525                 heL1 Half-length of main pipe
12526                 theR2 Internal radius of incident pipe (R2 < R1)
12527                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12528                 theL2 Half-length of incident pipe
12529                 theRF Radius of curvature of fillet.
12530                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12531                 theP1 1st junction point of main pipe
12532                 theP2 2nd junction point of main pipe
12533                 theP3 Junction point of incident pipe
12534
12535                 theRL Internal radius of left thickness reduction
12536                 theWL Width of left thickness reduction
12537                 theLtransL Length of left transition part
12538                 theLthinL Length of left thin part
12539
12540                 theRR Internal radius of right thickness reduction
12541                 theWR Width of right thickness reduction
12542                 theLtransR Length of right transition part
12543                 theLthinR Length of right thin part
12544
12545                 theRI Internal radius of incident thickness reduction
12546                 theWI Width of incident thickness reduction
12547                 theLtransI Length of incident transition part
12548                 theLthinI Length of incident thin part
12549
12550                 theName Object name; when specified, this parameter is used
12551                         for result publication in the study. Otherwise, if automatic
12552                         publication is switched on, default value is used for result name.
12553                 
12554             Returns:
12555                 List of GEOM_Object, containing the created shape and propagation groups.
12556                 
12557             Example of usage:
12558                 # create PipeTShape with fillet object
12559                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
12560                 # create PipeTShape with fillet object with position
12561                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
12562                 # create PipeTShape with fillet object with left thickness reduction
12563                 pipetshapefillet_thr = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
12564             """
12565             theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
12566             if (theP1 and theP2 and theP3):
12567               anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12568                                                                     theRL, theWL, theLtransL, theLthinL,
12569                                                                     theRR, theWR, theLtransR, theLthinR,
12570                                                                     theRI, theWI, theLtransI, theLthinI,
12571                                                                     theRF, theHexMesh, theP1, theP2, theP3)
12572             else:
12573               anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
12574                                                         theRL, theWL, theLtransL, theLthinL,
12575                                                         theRR, theWR, theLtransR, theLthinR,
12576                                                         theRI, theWI, theLtransI, theLthinI,
12577                                                         theRF, theHexMesh)
12578             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
12579             if Parameters: anObj[0].SetParameters(Parameters)
12580             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12581             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12582             return anObj
12583
12584         ## This function allows creating a disk already divided into blocks. It
12585         #  can be used to create divided pipes for later meshing in hexaedra.
12586         #  @param theR Radius of the disk
12587         #  @param theOrientation Orientation of the plane on which the disk will be built
12588         #         1 = XOY, 2 = OYZ, 3 = OZX
12589         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12590         #  @param theName Object name; when specified, this parameter is used
12591         #         for result publication in the study. Otherwise, if automatic
12592         #         publication is switched on, default value is used for result name.
12593         #
12594         #  @return New GEOM_Object, containing the created shape.
12595         #
12596         #  @ref tui_creation_divideddisk "Example"
12597         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
12598             """
12599             Creates a disk, divided into blocks. It can be used to create divided pipes
12600             for later meshing in hexaedra.
12601
12602             Parameters:
12603                 theR Radius of the disk
12604                 theOrientation Orientation of the plane on which the disk will be built:
12605                                1 = XOY, 2 = OYZ, 3 = OZX
12606                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12607                 theName Object name; when specified, this parameter is used
12608                         for result publication in the study. Otherwise, if automatic
12609                         publication is switched on, default value is used for result name.
12610
12611             Returns:
12612                 New GEOM_Object, containing the created shape.
12613             """
12614             theR, Parameters = ParseParameters(theR)
12615             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
12616             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
12617             if Parameters: anObj.SetParameters(Parameters)
12618             self._autoPublish(anObj, theName, "dividedDisk")
12619             return anObj
12620             
12621         ## This function allows creating a disk already divided into blocks. It
12622         #  can be used to create divided pipes for later meshing in hexaedra.
12623         #  @param theCenter Center of the disk
12624         #  @param theVector Normal vector to the plane of the created disk
12625         #  @param theRadius Radius of the disk
12626         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12627         #  @param theName Object name; when specified, this parameter is used
12628         #         for result publication in the study. Otherwise, if automatic
12629         #         publication is switched on, default value is used for result name.
12630         #
12631         #  @return New GEOM_Object, containing the created shape.
12632         #
12633         #  @ref tui_creation_divideddisk "Example"
12634         def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
12635             """
12636             Creates a disk already divided into blocks. It can be used to create divided pipes
12637             for later meshing in hexaedra.
12638
12639             Parameters:
12640                 theCenter Center of the disk
12641                 theVector Normal vector to the plane of the created disk
12642                 theRadius Radius of the disk
12643                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12644                 theName Object name; when specified, this parameter is used
12645                         for result publication in the study. Otherwise, if automatic
12646                         publication is switched on, default value is used for result name.
12647
12648             Returns:
12649                 New GEOM_Object, containing the created shape.
12650             """
12651             theRadius, Parameters = ParseParameters(theRadius)
12652             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
12653             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
12654             if Parameters: anObj.SetParameters(Parameters)
12655             self._autoPublish(anObj, theName, "dividedDisk")
12656             return anObj
12657
12658         ## Builds a cylinder prepared for hexa meshes
12659         #  @param theR Radius of the cylinder
12660         #  @param theH Height of the cylinder
12661         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12662         #  @param theName Object name; when specified, this parameter is used
12663         #         for result publication in the study. Otherwise, if automatic
12664         #         publication is switched on, default value is used for result name.
12665         #
12666         #  @return New GEOM_Object, containing the created shape.
12667         #
12668         #  @ref tui_creation_dividedcylinder "Example"
12669         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
12670             """
12671             Builds a cylinder prepared for hexa meshes
12672
12673             Parameters:
12674                 theR Radius of the cylinder
12675                 theH Height of the cylinder
12676                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12677                 theName Object name; when specified, this parameter is used
12678                         for result publication in the study. Otherwise, if automatic
12679                         publication is switched on, default value is used for result name.
12680
12681             Returns:
12682                 New GEOM_Object, containing the created shape.
12683             """
12684             theR, theH, Parameters = ParseParameters(theR, theH)
12685             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
12686             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
12687             if Parameters: anObj.SetParameters(Parameters)
12688             self._autoPublish(anObj, theName, "dividedCylinder")
12689             return anObj
12690
12691         ## Create a surface from a cloud of points
12692         #  @param thelPoints list of points. Compounds of points are
12693         #         accepted as well.
12694         #  @param theNbMax maximum number of Bezier pieces in the resulting
12695         #         surface.
12696         #  @param theDegMax maximum degree of the resulting BSpline surface.
12697         #  @param theDMax specifies maximum value of the
12698         #         GeomPlate_PlateG0Criterion criterion.
12699         #  @param theName Object name; when specified, this parameter is used
12700         #         for result publication in the study. Otherwise, if automatic
12701         #         publication is switched on, default value is used for result name.
12702         #  @return New GEOM_Object, containing the created shape.
12703         #
12704         #  @ref tui_creation_smoothingsurface "Example"
12705         def MakeSmoothingSurface(self, thelPoints, theNbMax=2, theDegMax=8,
12706                                  theDMax=0.0, theName=None):
12707             """
12708             Create a surface from a cloud of points
12709
12710             Parameters:
12711                 thelPoints list of points. Compounds of points are
12712                            accepted as well.
12713                 theNbMax maximum number of Bezier pieces in the resulting
12714                          surface.
12715                 theDegMax maximum degree of the resulting BSpline surface.
12716                 theDMax specifies maximum value of the
12717                         GeomPlate_PlateG0Criterion criterion.
12718                 theName Object name; when specified, this parameter is used
12719                         for result publication in the study. Otherwise, if automatic
12720                         publication is switched on, default value is used for result name.
12721
12722             Returns:
12723                 New GEOM_Object, containing the created shape.
12724             """
12725             anObj = self.AdvOp.MakeSmoothingSurface(thelPoints, theNbMax,
12726                                                     theDegMax, theDMax)
12727             RaiseIfFailed("MakeSmoothingSurface", self.AdvOp)
12728             self._autoPublish(anObj, theName, "smoothing")
12729             return anObj
12730
12731         ## Export a shape to XAO format
12732         #  @param shape The shape to export
12733         #  @param groups The list of groups to export
12734         #  @param fields The list of fields to export
12735         #  @param author The author of the export
12736         #  @param fileName The name of the file to export
12737         #  @return boolean
12738         #
12739         #  @ref tui_exportxao "Example"
12740         def ExportXAO(self, shape, groups, fields, author, fileName):
12741             res = self.InsertOp.ExportXAO(shape, groups, fields, author, fileName)
12742             RaiseIfFailed("ExportXAO", self.InsertOp)
12743             return res
12744
12745         ## Import a shape from XAO format
12746         #  @param shape Shape to export
12747         #  @param fileName The name of the file to import
12748         #  @return tuple (res, shape, subShapes, groups, fields)
12749         #       res Flag indicating if the import was successful
12750         #       shape The imported shape
12751         #       subShapes The list of imported subShapes
12752         #       groups The list of imported groups
12753         #       fields The list of imported fields
12754         #
12755         #  @ref tui_importxao "Example"
12756         def ImportXAO(self, fileName):
12757             res = self.InsertOp.ImportXAO(fileName)
12758             RaiseIfFailed("ImportXAO", self.InsertOp)
12759             return res
12760
12761         #@@ insert new functions before this line @@ do not remove this line @@#
12762
12763         # end of l4_advanced
12764         ## @}
12765
12766         ## Create a copy of the given object
12767         #
12768         #  @param theOriginal geometry object for copy
12769         #  @param theName Object name; when specified, this parameter is used
12770         #         for result publication in the study. Otherwise, if automatic
12771         #         publication is switched on, default value is used for result name.
12772         #
12773         #  @return New GEOM_Object, containing the copied shape.
12774         #
12775         #  @ingroup l1_geomBuilder_auxiliary
12776         #  @ref swig_MakeCopy "Example"
12777         def MakeCopy(self, theOriginal, theName=None):
12778             """
12779             Create a copy of the given object
12780
12781             Parameters:
12782                 theOriginal geometry object for copy
12783                 theName Object name; when specified, this parameter is used
12784                         for result publication in the study. Otherwise, if automatic
12785                         publication is switched on, default value is used for result name.
12786
12787             Returns:
12788                 New GEOM_Object, containing the copied shape.
12789
12790             Example of usage: Copy = geompy.MakeCopy(Box)
12791             """
12792             # Example: see GEOM_TestAll.py
12793             anObj = self.InsertOp.MakeCopy(theOriginal)
12794             RaiseIfFailed("MakeCopy", self.InsertOp)
12795             self._autoPublish(anObj, theName, "copy")
12796             return anObj
12797
12798         ## Add Path to load python scripts from
12799         #  @param Path a path to load python scripts from
12800         #  @ingroup l1_geomBuilder_auxiliary
12801         def addPath(self,Path):
12802             """
12803             Add Path to load python scripts from
12804
12805             Parameters:
12806                 Path a path to load python scripts from
12807             """
12808             if (sys.path.count(Path) < 1):
12809                 sys.path.append(Path)
12810                 pass
12811             pass
12812
12813         ## Load marker texture from the file
12814         #  @param Path a path to the texture file
12815         #  @return unique texture identifier
12816         #  @ingroup l1_geomBuilder_auxiliary
12817         def LoadTexture(self, Path):
12818             """
12819             Load marker texture from the file
12820             
12821             Parameters:
12822                 Path a path to the texture file
12823                 
12824             Returns:
12825                 unique texture identifier
12826             """
12827             # Example: see GEOM_TestAll.py
12828             ID = self.InsertOp.LoadTexture(Path)
12829             RaiseIfFailed("LoadTexture", self.InsertOp)
12830             return ID
12831
12832         ## Get internal name of the object based on its study entry
12833         #  @note This method does not provide an unique identifier of the geometry object.
12834         #  @note This is internal function of GEOM component, though it can be used outside it for 
12835         #  appropriate reason (e.g. for identification of geometry object).
12836         #  @param obj geometry object
12837         #  @return unique object identifier
12838         #  @ingroup l1_geomBuilder_auxiliary
12839         def getObjectID(self, obj):
12840             """
12841             Get internal name of the object based on its study entry.
12842             Note: this method does not provide an unique identifier of the geometry object.
12843             It is an internal function of GEOM component, though it can be used outside GEOM for 
12844             appropriate reason (e.g. for identification of geometry object).
12845
12846             Parameters:
12847                 obj geometry object
12848
12849             Returns:
12850                 unique object identifier
12851             """
12852             ID = ""
12853             entry = salome.ObjectToID(obj)
12854             if entry is not None:
12855                 lst = entry.split(":")
12856                 if len(lst) > 0:
12857                     ID = lst[-1] # -1 means last item in the list            
12858                     return "GEOM_" + ID
12859             return ID
12860                 
12861             
12862
12863         ## Add marker texture. @a Width and @a Height parameters
12864         #  specify width and height of the texture in pixels.
12865         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12866         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12867         #  parameter should be unpacked string, in which '1' symbols represent opaque
12868         #  pixels and '0' represent transparent pixels of the texture bitmap.
12869         #
12870         #  @param Width texture width in pixels
12871         #  @param Height texture height in pixels
12872         #  @param Texture texture data
12873         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12874         #  @return unique texture identifier
12875         #  @ingroup l1_geomBuilder_auxiliary
12876         def AddTexture(self, Width, Height, Texture, RowData=False):
12877             """
12878             Add marker texture. Width and Height parameters
12879             specify width and height of the texture in pixels.
12880             If RowData is True, Texture parameter should represent texture data
12881             packed into the byte array. If RowData is False (default), Texture
12882             parameter should be unpacked string, in which '1' symbols represent opaque
12883             pixels and '0' represent transparent pixels of the texture bitmap.
12884
12885             Parameters:
12886                 Width texture width in pixels
12887                 Height texture height in pixels
12888                 Texture texture data
12889                 RowData if True, Texture data are packed in the byte stream
12890
12891             Returns:
12892                 return unique texture identifier
12893             """
12894             if not RowData: Texture = PackData(Texture)
12895             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12896             RaiseIfFailed("AddTexture", self.InsertOp)
12897             return ID
12898
12899         ## Creates a new folder object. It is a container for any GEOM objects.
12900         #  @param Name name of the container
12901         #  @param Father parent object. If None, 
12902         #         folder under 'Geometry' root object will be created.
12903         #  @return a new created folder
12904         #  @ingroup l1_publish_data
12905         def NewFolder(self, Name, Father=None):
12906             """
12907             Create a new folder object. It is an auxiliary container for any GEOM objects.
12908             
12909             Parameters:
12910                 Name name of the container
12911                 Father parent object. If None, 
12912                 folder under 'Geometry' root object will be created.
12913             
12914             Returns:
12915                 a new created folder
12916             """
12917             if not Father: Father = self.father
12918             return self.CreateFolder(Name, Father)
12919
12920         ## Move object to the specified folder
12921         #  @param Object object to move
12922         #  @param Folder target folder
12923         #  @ingroup l1_publish_data
12924         def PutToFolder(self, Object, Folder):
12925             """
12926             Move object to the specified folder
12927             
12928             Parameters:
12929                 Object object to move
12930                 Folder target folder
12931             """
12932             self.MoveToFolder(Object, Folder)
12933             pass
12934
12935         ## Move list of objects to the specified folder
12936         #  @param ListOfSO list of objects to move
12937         #  @param Folder target folder
12938         #  @ingroup l1_publish_data
12939         def PutListToFolder(self, ListOfSO, Folder):
12940             """
12941             Move list of objects to the specified folder
12942             
12943             Parameters:
12944                 ListOfSO list of objects to move
12945                 Folder target folder
12946             """
12947             self.MoveListToFolder(ListOfSO, Folder)
12948             pass
12949
12950         ## @addtogroup l2_field
12951         ## @{
12952
12953         ## Creates a field
12954         #  @param shape the shape the field lies on
12955         #  @param name the field name
12956         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
12957         #  @param dimension dimension of the shape the field lies on
12958         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12959         #  @param componentNames names of components
12960         #  @return a created field
12961         def CreateField(self, shape, name, type, dimension, componentNames):
12962             """
12963             Creates a field
12964
12965             Parameters:
12966                 shape the shape the field lies on
12967                 name  the field name
12968                 type  type of field data
12969                 dimension dimension of the shape the field lies on
12970                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12971                 componentNames names of components
12972             
12973             Returns:
12974                 a created field
12975             """
12976             if isinstance( type, int ):
12977                 if type < 0 or type > 3:
12978                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
12979                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
12980
12981             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
12982             RaiseIfFailed("CreateField", self.FieldOp)
12983             global geom
12984             geom._autoPublish( f, "", name)
12985             return f
12986
12987         ## Removes a field from the GEOM component
12988         #  @param field the field to remove
12989         def RemoveField(self, field):
12990             "Removes a field from the GEOM component"
12991             global geom
12992             if isinstance( field, GEOM._objref_GEOM_Field ):
12993                 geom.RemoveObject( field )
12994             elif isinstance( field, geomField ):
12995                 geom.RemoveObject( field.field )
12996             else:
12997                 raise RuntimeError, "RemoveField() : the object is not a field"
12998             return
12999
13000         ## Returns number of fields on a shape
13001         def CountFields(self, shape):
13002             "Returns number of fields on a shape"
13003             nb = self.FieldOp.CountFields( shape )
13004             RaiseIfFailed("CountFields", self.FieldOp)
13005             return nb
13006
13007         ## Returns all fields on a shape
13008         def GetFields(self, shape):
13009             "Returns all fields on a shape"
13010             ff = self.FieldOp.GetFields( shape )
13011             RaiseIfFailed("GetFields", self.FieldOp)
13012             return ff
13013
13014         ## Returns a field on a shape by its name
13015         def GetField(self, shape, name):
13016             "Returns a field on a shape by its name"
13017             f = self.FieldOp.GetField( shape, name )
13018             RaiseIfFailed("GetField", self.FieldOp)
13019             return f
13020
13021         # end of l2_field
13022         ## @}
13023
13024
13025 import omniORB
13026 # Register the new proxy for GEOM_Gen
13027 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
13028
13029
13030 ## Field on Geometry
13031 #  @ingroup l2_field
13032 class geomField( GEOM._objref_GEOM_Field ):
13033
13034     def __init__(self):
13035         GEOM._objref_GEOM_Field.__init__(self)
13036         self.field = GEOM._objref_GEOM_Field
13037         return
13038
13039     ## Returns the shape the field lies on
13040     def getShape(self):
13041         "Returns the shape the field lies on"
13042         return self.field.GetShape(self)
13043
13044     ## Returns the field name
13045     def getName(self):
13046         "Returns the field name"
13047         return self.field.GetName(self)
13048
13049     ## Returns type of field data as integer [0-3]
13050     def getType(self):
13051         "Returns type of field data"
13052         return self.field.GetDataType(self)._v
13053
13054     ## Returns type of field data:
13055     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
13056     def getTypeEnum(self):
13057         "Returns type of field data"
13058         return self.field.GetDataType(self)
13059
13060     ## Returns dimension of the shape the field lies on:
13061     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13062     def getDimension(self):
13063         """Returns dimension of the shape the field lies on:
13064         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
13065         return self.field.GetDimension(self)
13066
13067     ## Returns names of components
13068     def getComponents(self):
13069         "Returns names of components"
13070         return self.field.GetComponents(self)
13071
13072     ## Adds a time step to the field
13073     #  @param step the time step number futher used as the step identifier
13074     #  @param stamp the time step time
13075     #  @param values the values of the time step
13076     def addStep(self, step, stamp, values):
13077         "Adds a time step to the field"
13078         stp = self.field.AddStep( self, step, stamp )
13079         if not stp:
13080             raise RuntimeError, \
13081                   "Field.addStep() : Error: step %s already exists in this field"%step
13082         global geom
13083         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
13084         self.setValues( step, values )
13085         return stp
13086
13087     ## Remove a time step from the field
13088     def removeStep(self,step):
13089         "Remove a time step from the field"
13090         stepSO = None
13091         try:
13092             stepObj = self.field.GetStep( self, step )
13093             if stepObj:
13094                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
13095         except:
13096             #import traceback
13097             #traceback.print_exc()
13098             pass
13099         self.field.RemoveStep( self, step )
13100         if stepSO:
13101             geom.myBuilder.RemoveObjectWithChildren( stepSO )
13102         return
13103
13104     ## Returns number of time steps in the field
13105     def countSteps(self):
13106         "Returns number of time steps in the field"
13107         return self.field.CountSteps(self)
13108
13109     ## Returns a list of time step IDs in the field
13110     def getSteps(self):
13111         "Returns a list of time step IDs in the field"
13112         return self.field.GetSteps(self)
13113
13114     ## Returns a time step by its ID
13115     def getStep(self,step):
13116         "Returns a time step by its ID"
13117         stp = self.field.GetStep(self, step)
13118         if not stp:
13119             raise RuntimeError, "Step %s is missing from this field"%step
13120         return stp
13121
13122     ## Returns the time of the field step
13123     def getStamp(self,step):
13124         "Returns the time of the field step"
13125         return self.getStep(step).GetStamp()
13126
13127     ## Changes the time of the field step
13128     def setStamp(self, step, stamp):
13129         "Changes the time of the field step"
13130         return self.getStep(step).SetStamp(stamp)
13131
13132     ## Returns values of the field step
13133     def getValues(self, step):
13134         "Returns values of the field step"
13135         return self.getStep(step).GetValues()
13136
13137     ## Changes values of the field step
13138     def setValues(self, step, values):
13139         "Changes values of the field step"
13140         stp = self.getStep(step)
13141         errBeg = "Field.setValues(values) : Error: "
13142         try:
13143             ok = stp.SetValues( values )
13144         except Exception, e:
13145             excStr = str(e)
13146             if excStr.find("WrongPythonType") > 0:
13147                 raise RuntimeError, errBeg +\
13148                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
13149             raise RuntimeError, errBeg + str(e)
13150         if not ok:
13151             nbOK = self.field.GetArraySize(self)
13152             nbKO = len(values)
13153             if nbOK != nbKO:
13154                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
13155             else:
13156                 raise RuntimeError, errBeg + "failed"
13157         return
13158
13159     pass # end of class geomField
13160
13161 # Register the new proxy for GEOM_Field
13162 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
13163
13164
13165 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
13166 #  interface to GEOM operations.
13167 #
13168 #  Typical use is:
13169 #  \code
13170 #    import salome
13171 #    salome.salome_init()
13172 #    from salome.geom import geomBuilder
13173 #    geompy = geomBuilder.New(salome.myStudy)
13174 #  \endcode
13175 #  @param  study     SALOME study, generally obtained by salome.myStudy.
13176 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13177 #  @return geomBuilder instance
13178 def New( study, instance=None):
13179     """
13180     Create a new geomBuilder instance.The geomBuilder class provides the Python
13181     interface to GEOM operations.
13182
13183     Typical use is:
13184         import salome
13185         salome.salome_init()
13186         from salome.geom import geomBuilder
13187         geompy = geomBuilder.New(salome.myStudy)
13188
13189     Parameters:
13190         study     SALOME study, generally obtained by salome.myStudy.
13191         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13192     Returns:
13193         geomBuilder instance
13194     """
13195     #print "New geomBuilder ", study, instance
13196     global engine
13197     global geom
13198     global doLcc
13199     engine = instance
13200     if engine is None:
13201       doLcc = True
13202     geom = geomBuilder()
13203     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
13204     geom.init_geom(study)
13205     return geom