Salome HOME
Merge branch 'origin/ysn/doc_update_740': update documentation
[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             notebook.myStudy = theStudy
733             if self.father is None:
734                 self.father = self.myBuilder.NewComponent("GEOM")
735                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
736                 FName = A1._narrow(SALOMEDS.AttributeName)
737                 FName.SetValue("Geometry")
738                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
739                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
740                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
741                 self.myBuilder.DefineComponentInstance(self.father,self)
742                 pass
743             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
744             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
745             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
746             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
747             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
748             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
749             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
750             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
751             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
752             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
753             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
754             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
755             self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
756
757             # The below line is a right way to map all plugin functions to geomBuilder,
758             # but AdvancedOperations are already mapped, that is why this line is commented
759             # and presents here only as an axample
760             #self.AdvOp    = self.GetPluginOperations (self.myStudyId, "AdvancedEngine")
761
762             # self.AdvOp is used by functions MakePipeTShape*, MakeDividedDisk, etc.
763             self.AdvOp = GEOM._objref_GEOM_Gen.GetPluginOperations (self, self.myStudyId, "AdvancedEngine")
764
765             # set GEOM as root in the use case tree
766             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
767             self.myUseCaseBuilder.SetRootCurrent()
768             self.myUseCaseBuilder.Append(self.father)
769             pass
770
771         def GetPluginOperations(self, studyID, libraryName):
772             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
773             if op:
774                 # bind methods of operations to self
775                 methods = op.__class__.__dict__['__methods__']
776                 avoid_methods = self.BasicOp.__class__.__dict__['__methods__']
777                 for meth_name in methods:
778                     if not meth_name in avoid_methods: # avoid basic methods
779                         function = getattr(op.__class__, meth_name)
780                         if callable(function):
781                             #self.__dict__[meth_name] = self.__PluginOperation(op, function)
782                             self.__dict__[meth_name] = PluginOperation(op, function)
783             return op
784
785         ## Enable / disable results auto-publishing
786         # 
787         #  The automatic publishing is managed in the following way:
788         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
789         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
790         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
791         #  value passed as parameter has the same effect.
792         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
793         #  maximum number of sub-shapes allowed for publishing is set to specified value.
794         #
795         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
796         #  @ingroup l1_publish_data
797         def addToStudyAuto(self, maxNbSubShapes=-1):
798             """
799             Enable / disable results auto-publishing
800
801             The automatic publishing is managed in the following way:
802             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
803             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
804             maximum number of sub-shapes allowed for publishing is unlimited; any negative
805             value passed as parameter has the same effect.
806             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
807             maximum number of sub-shapes allowed for publishing is set to this value.
808
809             Parameters:
810                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
811
812             Example of usage:
813                 geompy.addToStudyAuto()   # enable auto-publishing
814                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
815                 geompy.addToStudyAuto(0)  # disable auto-publishing
816             """
817             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
818             pass
819
820         ## Dump component to the Python script
821         #  This method overrides IDL function to allow default values for the parameters.
822         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
823             """
824             Dump component to the Python script
825             This method overrides IDL function to allow default values for the parameters.
826             """
827             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
828
829         ## Get name for sub-shape aSubObj of shape aMainObj
830         #
831         # @ref swig_SubShapeName "Example"
832         def SubShapeName(self,aSubObj, aMainObj):
833             """
834             Get name for sub-shape aSubObj of shape aMainObj
835             """
836             # Example: see GEOM_TestAll.py
837
838             #aSubId  = orb.object_to_string(aSubObj)
839             #aMainId = orb.object_to_string(aMainObj)
840             #index = gg.getIndexTopology(aSubId, aMainId)
841             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
842             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
843             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
844             return name
845
846         ## Publish in study aShape with name aName
847         #
848         #  \param aShape the shape to be published
849         #  \param aName  the name for the shape
850         #  \param doRestoreSubShapes if True, finds and publishes also
851         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
852         #         and published sub-shapes of arguments
853         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
854         #                                                  these arguments description
855         #  \return study entry of the published shape in form of string
856         #
857         #  @ingroup l1_publish_data
858         #  @ref swig_all_addtostudy "Example"
859         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
860                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
861             """
862             Publish in study aShape with name aName
863
864             Parameters:
865                 aShape the shape to be published
866                 aName  the name for the shape
867                 doRestoreSubShapes if True, finds and publishes also
868                                    sub-shapes of aShape, corresponding to its arguments
869                                    and published sub-shapes of arguments
870                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
871                                                          these arguments description
872
873             Returns:
874                 study entry of the published shape in form of string
875
876             Example of usage:
877                 id_block1 = geompy.addToStudy(Block1, "Block 1")
878             """
879             # Example: see GEOM_TestAll.py
880             try:
881                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
882                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
883                 if doRestoreSubShapes:
884                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
885                                             theFindMethod, theInheritFirstArg, True )
886             except:
887                 print "addToStudy() failed"
888                 return ""
889             return aShape.GetStudyEntry()
890
891         ## Publish in study aShape with name aName as sub-object of previously published aFather
892         #  \param aFather previously published object
893         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
894         #  \param aName  the name for the shape
895         #
896         #  \return study entry of the published shape in form of string
897         #
898         #  @ingroup l1_publish_data
899         #  @ref swig_all_addtostudyInFather "Example"
900         def addToStudyInFather(self, aFather, aShape, aName):
901             """
902             Publish in study aShape with name aName as sub-object of previously published aFather
903
904             Parameters:
905                 aFather previously published object
906                 aShape the shape to be published as sub-object of aFather
907                 aName  the name for the shape
908
909             Returns:
910                 study entry of the published shape in form of string
911             """
912             # Example: see GEOM_TestAll.py
913             try:
914                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
915                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
916             except:
917                 print "addToStudyInFather() failed"
918                 return ""
919             return aShape.GetStudyEntry()
920
921         ## Unpublish object in study
922         #
923         #  \param obj the object to be unpublished
924         def hideInStudy(self, obj):
925             """
926             Unpublish object in study
927
928             Parameters:
929                 obj the object to be unpublished
930             """
931             ior = salome.orb.object_to_string(obj)
932             aSObject = self.myStudy.FindObjectIOR(ior)
933             if aSObject is not None:
934                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
935                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
936                 drwAttribute.SetDrawable(False)
937                 pass
938
939         # end of l1_geomBuilder_auxiliary
940         ## @}
941
942         ## @addtogroup l3_restore_ss
943         ## @{
944
945         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
946         #  To be used from python scripts out of addToStudy() (non-default usage)
947         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
948         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
949         #                   If this list is empty, all operation arguments will be published
950         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
951         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
952         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
953         #                            Do not publish sub-shapes in place of arguments, but only
954         #                            in place of sub-shapes of the first argument,
955         #                            because the whole shape corresponds to the first argument.
956         #                            Mainly to be used after transformations, but it also can be
957         #                            usefull after partition with one object shape, and some other
958         #                            operations, where only the first argument has to be considered.
959         #                            If theObject has only one argument shape, this flag is automatically
960         #                            considered as True, not regarding really passed value.
961         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
962         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
963         #  \return list of published sub-shapes
964         #
965         #  @ref tui_restore_prs_params "Example"
966         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
967                               theInheritFirstArg=False, theAddPrefix=True):
968             """
969             Publish sub-shapes, standing for arguments and sub-shapes of arguments
970             To be used from python scripts out of geompy.addToStudy (non-default usage)
971
972             Parameters:
973                 theObject published GEOM.GEOM_Object, arguments of which will be published
974                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
975                           If this list is empty, all operation arguments will be published
976                 theFindMethod method to search sub-shapes, corresponding to arguments and
977                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
978                 theInheritFirstArg set properties of the first argument for theObject.
979                                    Do not publish sub-shapes in place of arguments, but only
980                                    in place of sub-shapes of the first argument,
981                                    because the whole shape corresponds to the first argument.
982                                    Mainly to be used after transformations, but it also can be
983                                    usefull after partition with one object shape, and some other
984                                    operations, where only the first argument has to be considered.
985                                    If theObject has only one argument shape, this flag is automatically
986                                    considered as True, not regarding really passed value.
987                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
988                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
989             Returns:
990                 list of published sub-shapes
991             """
992             # Example: see GEOM_TestAll.py
993             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
994                                           theFindMethod, theInheritFirstArg, theAddPrefix)
995
996         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
997         #  To be used from python scripts out of addToStudy() (non-default usage)
998         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
999         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1000         #                   If this list is empty, all operation arguments will be published
1001         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1002         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1003         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1004         #                            Do not publish sub-shapes in place of arguments, but only
1005         #                            in place of sub-shapes of the first argument,
1006         #                            because the whole shape corresponds to the first argument.
1007         #                            Mainly to be used after transformations, but it also can be
1008         #                            usefull after partition with one object shape, and some other
1009         #                            operations, where only the first argument has to be considered.
1010         #                            If theObject has only one argument shape, this flag is automatically
1011         #                            considered as True, not regarding really passed value.
1012         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1013         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1014         #  \return list of published sub-shapes
1015         #
1016         #  @ref tui_restore_prs_params "Example"
1017         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1018                                    theInheritFirstArg=False, theAddPrefix=True):
1019             """
1020             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1021             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1022
1023             Parameters:
1024                 theObject published GEOM.GEOM_Object, arguments of which will be published
1025                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1026                           If this list is empty, all operation arguments will be published
1027                 theFindMethod method to search sub-shapes, corresponding to arguments and
1028                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1029                 theInheritFirstArg set properties of the first argument for theObject.
1030                                    Do not publish sub-shapes in place of arguments, but only
1031                                    in place of sub-shapes of the first argument,
1032                                    because the whole shape corresponds to the first argument.
1033                                    Mainly to be used after transformations, but it also can be
1034                                    usefull after partition with one object shape, and some other
1035                                    operations, where only the first argument has to be considered.
1036                                    If theObject has only one argument shape, this flag is automatically
1037                                    considered as True, not regarding really passed value.
1038                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1039                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1040
1041             Returns: 
1042                 list of published sub-shapes
1043             """
1044             # Example: see GEOM_TestAll.py
1045             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
1046                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1047
1048         # end of l3_restore_ss
1049         ## @}
1050
1051         ## @addtogroup l3_basic_go
1052         ## @{
1053
1054         ## Create point by three coordinates.
1055         #  @param theX The X coordinate of the point.
1056         #  @param theY The Y coordinate of the point.
1057         #  @param theZ The Z coordinate of the point.
1058         #  @param theName Object name; when specified, this parameter is used
1059         #         for result publication in the study. Otherwise, if automatic
1060         #         publication is switched on, default value is used for result name.
1061         #
1062         #  @return New GEOM.GEOM_Object, containing the created point.
1063         #
1064         #  @ref tui_creation_point "Example"
1065         def MakeVertex(self, theX, theY, theZ, theName=None):
1066             """
1067             Create point by three coordinates.
1068
1069             Parameters:
1070                 theX The X coordinate of the point.
1071                 theY The Y coordinate of the point.
1072                 theZ The Z coordinate of the point.
1073                 theName Object name; when specified, this parameter is used
1074                         for result publication in the study. Otherwise, if automatic
1075                         publication is switched on, default value is used for result name.
1076                 
1077             Returns: 
1078                 New GEOM.GEOM_Object, containing the created point.
1079             """
1080             # Example: see GEOM_TestAll.py
1081             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1082             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1083             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1084             anObj.SetParameters(Parameters)
1085             self._autoPublish(anObj, theName, "vertex")
1086             return anObj
1087
1088         ## Create a point, distant from the referenced point
1089         #  on the given distances along the coordinate axes.
1090         #  @param theReference The referenced point.
1091         #  @param theX Displacement from the referenced point along OX axis.
1092         #  @param theY Displacement from the referenced point along OY axis.
1093         #  @param theZ Displacement from the referenced point along OZ axis.
1094         #  @param theName Object name; when specified, this parameter is used
1095         #         for result publication in the study. Otherwise, if automatic
1096         #         publication is switched on, default value is used for result name.
1097         #
1098         #  @return New GEOM.GEOM_Object, containing the created point.
1099         #
1100         #  @ref tui_creation_point "Example"
1101         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1102             """
1103             Create a point, distant from the referenced point
1104             on the given distances along the coordinate axes.
1105
1106             Parameters:
1107                 theReference The referenced point.
1108                 theX Displacement from the referenced point along OX axis.
1109                 theY Displacement from the referenced point along OY axis.
1110                 theZ Displacement from the referenced point along OZ axis.
1111                 theName Object name; when specified, this parameter is used
1112                         for result publication in the study. Otherwise, if automatic
1113                         publication is switched on, default value is used for result name.
1114
1115             Returns:
1116                 New GEOM.GEOM_Object, containing the created point.
1117             """
1118             # Example: see GEOM_TestAll.py
1119             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1120             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1121             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1122             anObj.SetParameters(Parameters)
1123             self._autoPublish(anObj, theName, "vertex")
1124             return anObj
1125
1126         ## Create a point, corresponding to the given parameter on the given curve.
1127         #  @param theRefCurve The referenced curve.
1128         #  @param theParameter Value of parameter on the referenced curve.
1129         #  @param theName Object name; when specified, this parameter is used
1130         #         for result publication in the study. Otherwise, if automatic
1131         #         publication is switched on, default value is used for result name.
1132         #
1133         #  @return New GEOM.GEOM_Object, containing the created point.
1134         #
1135         #  @ref tui_creation_point "Example"
1136         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1137             """
1138             Create a point, corresponding to the given parameter on the given curve.
1139
1140             Parameters:
1141                 theRefCurve The referenced curve.
1142                 theParameter Value of parameter on the referenced curve.
1143                 theName Object name; when specified, this parameter is used
1144                         for result publication in the study. Otherwise, if automatic
1145                         publication is switched on, default value is used for result name.
1146
1147             Returns:
1148                 New GEOM.GEOM_Object, containing the created point.
1149
1150             Example of usage:
1151                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1152             """
1153             # Example: see GEOM_TestAll.py
1154             theParameter, Parameters = ParseParameters(theParameter)
1155             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1156             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1157             anObj.SetParameters(Parameters)
1158             self._autoPublish(anObj, theName, "vertex")
1159             return anObj
1160
1161         ## Create a point by projection give coordinates on the given curve
1162         #  @param theRefCurve The referenced curve.
1163         #  @param theX X-coordinate in 3D space
1164         #  @param theY Y-coordinate in 3D space
1165         #  @param theZ Z-coordinate in 3D space
1166         #  @param theName Object name; when specified, this parameter is used
1167         #         for result publication in the study. Otherwise, if automatic
1168         #         publication is switched on, default value is used for result name.
1169         #
1170         #  @return New GEOM.GEOM_Object, containing the created point.
1171         #
1172         #  @ref tui_creation_point "Example"
1173         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1174             """
1175             Create a point by projection give coordinates on the given curve
1176             
1177             Parameters:
1178                 theRefCurve The referenced curve.
1179                 theX X-coordinate in 3D space
1180                 theY Y-coordinate in 3D space
1181                 theZ Z-coordinate in 3D space
1182                 theName Object name; when specified, this parameter is used
1183                         for result publication in the study. Otherwise, if automatic
1184                         publication is switched on, default value is used for result name.
1185
1186             Returns:
1187                 New GEOM.GEOM_Object, containing the created point.
1188
1189             Example of usage:
1190                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1191             """
1192             # Example: see GEOM_TestAll.py
1193             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1194             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1195             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1196             anObj.SetParameters(Parameters)
1197             self._autoPublish(anObj, theName, "vertex")
1198             return anObj
1199
1200         ## Create a point, corresponding to the given length on the given curve.
1201         #  @param theRefCurve The referenced curve.
1202         #  @param theLength Length on the referenced curve. It can be negative.
1203         #  @param theStartPoint Point allowing to choose the direction for the calculation
1204         #                       of the length. If None, start from the first point of theRefCurve.
1205         #  @param theName Object name; when specified, this parameter is used
1206         #         for result publication in the study. Otherwise, if automatic
1207         #         publication is switched on, default value is used for result name.
1208         #
1209         #  @return New GEOM.GEOM_Object, containing the created point.
1210         #
1211         #  @ref tui_creation_point "Example"
1212         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1213             """
1214             Create a point, corresponding to the given length on the given curve.
1215
1216             Parameters:
1217                 theRefCurve The referenced curve.
1218                 theLength Length on the referenced curve. It can be negative.
1219                 theStartPoint Point allowing to choose the direction for the calculation
1220                               of the length. If None, start from the first point of theRefCurve.
1221                 theName Object name; when specified, this parameter is used
1222                         for result publication in the study. Otherwise, if automatic
1223                         publication is switched on, default value is used for result name.
1224
1225             Returns:
1226                 New GEOM.GEOM_Object, containing the created point.
1227             """
1228             # Example: see GEOM_TestAll.py
1229             theLength, Parameters = ParseParameters(theLength)
1230             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1231             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1232             anObj.SetParameters(Parameters)
1233             self._autoPublish(anObj, theName, "vertex")
1234             return anObj
1235
1236         ## Create a point, corresponding to the given parameters on the
1237         #    given surface.
1238         #  @param theRefSurf The referenced surface.
1239         #  @param theUParameter Value of U-parameter on the referenced surface.
1240         #  @param theVParameter Value of V-parameter on the referenced surface.
1241         #  @param theName Object name; when specified, this parameter is used
1242         #         for result publication in the study. Otherwise, if automatic
1243         #         publication is switched on, default value is used for result name.
1244         #
1245         #  @return New GEOM.GEOM_Object, containing the created point.
1246         #
1247         #  @ref swig_MakeVertexOnSurface "Example"
1248         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1249             """
1250             Create a point, corresponding to the given parameters on the
1251             given surface.
1252
1253             Parameters:
1254                 theRefSurf The referenced surface.
1255                 theUParameter Value of U-parameter on the referenced surface.
1256                 theVParameter Value of V-parameter on the referenced surface.
1257                 theName Object name; when specified, this parameter is used
1258                         for result publication in the study. Otherwise, if automatic
1259                         publication is switched on, default value is used for result name.
1260
1261             Returns:
1262                 New GEOM.GEOM_Object, containing the created point.
1263
1264             Example of usage:
1265                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1266             """
1267             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1268             # Example: see GEOM_TestAll.py
1269             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1270             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1271             anObj.SetParameters(Parameters);
1272             self._autoPublish(anObj, theName, "vertex")
1273             return anObj
1274
1275         ## Create a point by projection give coordinates on the given surface
1276         #  @param theRefSurf The referenced surface.
1277         #  @param theX X-coordinate in 3D space
1278         #  @param theY Y-coordinate in 3D space
1279         #  @param theZ Z-coordinate in 3D space
1280         #  @param theName Object name; when specified, this parameter is used
1281         #         for result publication in the study. Otherwise, if automatic
1282         #         publication is switched on, default value is used for result name.
1283         #
1284         #  @return New GEOM.GEOM_Object, containing the created point.
1285         #
1286         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1287         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1288             """
1289             Create a point by projection give coordinates on the given surface
1290
1291             Parameters:
1292                 theRefSurf The referenced surface.
1293                 theX X-coordinate in 3D space
1294                 theY Y-coordinate in 3D space
1295                 theZ Z-coordinate in 3D space
1296                 theName Object name; when specified, this parameter is used
1297                         for result publication in the study. Otherwise, if automatic
1298                         publication is switched on, default value is used for result name.
1299
1300             Returns:
1301                 New GEOM.GEOM_Object, containing the created point.
1302
1303             Example of usage:
1304                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1305             """
1306             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1307             # Example: see GEOM_TestAll.py
1308             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1309             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1310             anObj.SetParameters(Parameters);
1311             self._autoPublish(anObj, theName, "vertex")
1312             return anObj
1313
1314         ## Create a point, which lays on the given face.
1315         #  The point will lay in arbitrary place of the face.
1316         #  The only condition on it is a non-zero distance to the face boundary.
1317         #  Such point can be used to uniquely identify the face inside any
1318         #  shape in case, when the shape does not contain overlapped faces.
1319         #  @param theFace The referenced face.
1320         #  @param theName Object name; when specified, this parameter is used
1321         #         for result publication in the study. Otherwise, if automatic
1322         #         publication is switched on, default value is used for result name.
1323         #
1324         #  @return New GEOM.GEOM_Object, containing the created point.
1325         #
1326         #  @ref swig_MakeVertexInsideFace "Example"
1327         def MakeVertexInsideFace (self, theFace, theName=None):
1328             """
1329             Create a point, which lays on the given face.
1330             The point will lay in arbitrary place of the face.
1331             The only condition on it is a non-zero distance to the face boundary.
1332             Such point can be used to uniquely identify the face inside any
1333             shape in case, when the shape does not contain overlapped faces.
1334
1335             Parameters:
1336                 theFace The referenced face.
1337                 theName Object name; when specified, this parameter is used
1338                         for result publication in the study. Otherwise, if automatic
1339                         publication is switched on, default value is used for result name.
1340
1341             Returns:
1342                 New GEOM.GEOM_Object, containing the created point.
1343
1344             Example of usage:
1345                 p_on_face = geompy.MakeVertexInsideFace(Face)
1346             """
1347             # Example: see GEOM_TestAll.py
1348             anObj = self.BasicOp.MakePointOnFace(theFace)
1349             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1350             self._autoPublish(anObj, theName, "vertex")
1351             return anObj
1352
1353         ## Create a point on intersection of two lines.
1354         #  @param theRefLine1, theRefLine2 The referenced lines.
1355         #  @param theName Object name; when specified, this parameter is used
1356         #         for result publication in the study. Otherwise, if automatic
1357         #         publication is switched on, default value is used for result name.
1358         #
1359         #  @return New GEOM.GEOM_Object, containing the created point.
1360         #
1361         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1362         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1363             """
1364             Create a point on intersection of two lines.
1365
1366             Parameters:
1367                 theRefLine1, theRefLine2 The referenced lines.
1368                 theName Object name; when specified, this parameter is used
1369                         for result publication in the study. Otherwise, if automatic
1370                         publication is switched on, default value is used for result name.
1371
1372             Returns:
1373                 New GEOM.GEOM_Object, containing the created point.
1374             """
1375             # Example: see GEOM_TestAll.py
1376             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1377             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1378             self._autoPublish(anObj, theName, "vertex")
1379             return anObj
1380
1381         ## Create a tangent, corresponding to the given parameter on the given curve.
1382         #  @param theRefCurve The referenced curve.
1383         #  @param theParameter Value of parameter on the referenced curve.
1384         #  @param theName Object name; when specified, this parameter is used
1385         #         for result publication in the study. Otherwise, if automatic
1386         #         publication is switched on, default value is used for result name.
1387         #
1388         #  @return New GEOM.GEOM_Object, containing the created tangent.
1389         #
1390         #  @ref swig_MakeTangentOnCurve "Example"
1391         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1392             """
1393             Create a tangent, corresponding to the given parameter on the given curve.
1394
1395             Parameters:
1396                 theRefCurve The referenced curve.
1397                 theParameter Value of parameter on the referenced curve.
1398                 theName Object name; when specified, this parameter is used
1399                         for result publication in the study. Otherwise, if automatic
1400                         publication is switched on, default value is used for result name.
1401
1402             Returns:
1403                 New GEOM.GEOM_Object, containing the created tangent.
1404
1405             Example of usage:
1406                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1407             """
1408             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1409             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1410             self._autoPublish(anObj, theName, "tangent")
1411             return anObj
1412
1413         ## Create a tangent plane, corresponding to the given parameter on the given face.
1414         #  @param theFace The face for which tangent plane should be built.
1415         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1416         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1417         #  @param theTrimSize the size of plane.
1418         #  @param theName Object name; when specified, this parameter is used
1419         #         for result publication in the study. Otherwise, if automatic
1420         #         publication is switched on, default value is used for result name.
1421         #
1422         #  @return New GEOM.GEOM_Object, containing the created tangent.
1423         #
1424         #  @ref swig_MakeTangentPlaneOnFace "Example"
1425         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1426             """
1427             Create a tangent plane, corresponding to the given parameter on the given face.
1428
1429             Parameters:
1430                 theFace The face for which tangent plane should be built.
1431                 theParameterV vertical value of the center point (0.0 - 1.0).
1432                 theParameterU horisontal value of the center point (0.0 - 1.0).
1433                 theTrimSize the size of plane.
1434                 theName Object name; when specified, this parameter is used
1435                         for result publication in the study. Otherwise, if automatic
1436                         publication is switched on, default value is used for result name.
1437
1438            Returns: 
1439                 New GEOM.GEOM_Object, containing the created tangent.
1440
1441            Example of usage:
1442                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1443             """
1444             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1445             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1446             self._autoPublish(anObj, theName, "tangent")
1447             return anObj
1448
1449         ## Create a vector with the given components.
1450         #  @param theDX X component of the vector.
1451         #  @param theDY Y component of the vector.
1452         #  @param theDZ Z component of the vector.
1453         #  @param theName Object name; when specified, this parameter is used
1454         #         for result publication in the study. Otherwise, if automatic
1455         #         publication is switched on, default value is used for result name.
1456         #
1457         #  @return New GEOM.GEOM_Object, containing the created vector.
1458         #
1459         #  @ref tui_creation_vector "Example"
1460         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1461             """
1462             Create a vector with the given components.
1463
1464             Parameters:
1465                 theDX X component of the vector.
1466                 theDY Y component of the vector.
1467                 theDZ Z component of the vector.
1468                 theName Object name; when specified, this parameter is used
1469                         for result publication in the study. Otherwise, if automatic
1470                         publication is switched on, default value is used for result name.
1471
1472             Returns:     
1473                 New GEOM.GEOM_Object, containing the created vector.
1474             """
1475             # Example: see GEOM_TestAll.py
1476             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1477             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1478             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1479             anObj.SetParameters(Parameters)
1480             self._autoPublish(anObj, theName, "vector")
1481             return anObj
1482
1483         ## Create a vector between two points.
1484         #  @param thePnt1 Start point for the vector.
1485         #  @param thePnt2 End point for the vector.
1486         #  @param theName Object name; when specified, this parameter is used
1487         #         for result publication in the study. Otherwise, if automatic
1488         #         publication is switched on, default value is used for result name.
1489         #
1490         #  @return New GEOM.GEOM_Object, containing the created vector.
1491         #
1492         #  @ref tui_creation_vector "Example"
1493         def MakeVector(self, thePnt1, thePnt2, theName=None):
1494             """
1495             Create a vector between two points.
1496
1497             Parameters:
1498                 thePnt1 Start point for the vector.
1499                 thePnt2 End point for the vector.
1500                 theName Object name; when specified, this parameter is used
1501                         for result publication in the study. Otherwise, if automatic
1502                         publication is switched on, default value is used for result name.
1503
1504             Returns:        
1505                 New GEOM.GEOM_Object, containing the created vector.
1506             """
1507             # Example: see GEOM_TestAll.py
1508             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1509             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1510             self._autoPublish(anObj, theName, "vector")
1511             return anObj
1512
1513         ## Create a line, passing through the given point
1514         #  and parrallel to the given direction
1515         #  @param thePnt Point. The resulting line will pass through it.
1516         #  @param theDir Direction. The resulting line will be parallel to it.
1517         #  @param theName Object name; when specified, this parameter is used
1518         #         for result publication in the study. Otherwise, if automatic
1519         #         publication is switched on, default value is used for result name.
1520         #
1521         #  @return New GEOM.GEOM_Object, containing the created line.
1522         #
1523         #  @ref tui_creation_line "Example"
1524         def MakeLine(self, thePnt, theDir, theName=None):
1525             """
1526             Create a line, passing through the given point
1527             and parrallel to the given direction
1528
1529             Parameters:
1530                 thePnt Point. The resulting line will pass through it.
1531                 theDir Direction. The resulting line will be parallel to it.
1532                 theName Object name; when specified, this parameter is used
1533                         for result publication in the study. Otherwise, if automatic
1534                         publication is switched on, default value is used for result name.
1535
1536             Returns:
1537                 New GEOM.GEOM_Object, containing the created line.
1538             """
1539             # Example: see GEOM_TestAll.py
1540             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1541             RaiseIfFailed("MakeLine", self.BasicOp)
1542             self._autoPublish(anObj, theName, "line")
1543             return anObj
1544
1545         ## Create a line, passing through the given points
1546         #  @param thePnt1 First of two points, defining the line.
1547         #  @param thePnt2 Second of two points, defining the line.
1548         #  @param theName Object name; when specified, this parameter is used
1549         #         for result publication in the study. Otherwise, if automatic
1550         #         publication is switched on, default value is used for result name.
1551         #
1552         #  @return New GEOM.GEOM_Object, containing the created line.
1553         #
1554         #  @ref tui_creation_line "Example"
1555         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1556             """
1557             Create a line, passing through the given points
1558
1559             Parameters:
1560                 thePnt1 First of two points, defining the line.
1561                 thePnt2 Second of two points, defining the line.
1562                 theName Object name; when specified, this parameter is used
1563                         for result publication in the study. Otherwise, if automatic
1564                         publication is switched on, default value is used for result name.
1565
1566             Returns:
1567                 New GEOM.GEOM_Object, containing the created line.
1568             """
1569             # Example: see GEOM_TestAll.py
1570             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1571             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1572             self._autoPublish(anObj, theName, "line")
1573             return anObj
1574
1575         ## Create a line on two faces intersection.
1576         #  @param theFace1 First of two faces, defining the line.
1577         #  @param theFace2 Second of two faces, defining the line.
1578         #  @param theName Object name; when specified, this parameter is used
1579         #         for result publication in the study. Otherwise, if automatic
1580         #         publication is switched on, default value is used for result name.
1581         #
1582         #  @return New GEOM.GEOM_Object, containing the created line.
1583         #
1584         #  @ref swig_MakeLineTwoFaces "Example"
1585         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1586             """
1587             Create a line on two faces intersection.
1588
1589             Parameters:
1590                 theFace1 First of two faces, defining the line.
1591                 theFace2 Second of two faces, defining the line.
1592                 theName Object name; when specified, this parameter is used
1593                         for result publication in the study. Otherwise, if automatic
1594                         publication is switched on, default value is used for result name.
1595
1596             Returns:
1597                 New GEOM.GEOM_Object, containing the created line.
1598             """
1599             # Example: see GEOM_TestAll.py
1600             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1601             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1602             self._autoPublish(anObj, theName, "line")
1603             return anObj
1604
1605         ## Create a plane, passing through the given point
1606         #  and normal to the given vector.
1607         #  @param thePnt Point, the plane has to pass through.
1608         #  @param theVec Vector, defining the plane normal direction.
1609         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1610         #  @param theName Object name; when specified, this parameter is used
1611         #         for result publication in the study. Otherwise, if automatic
1612         #         publication is switched on, default value is used for result name.
1613         #
1614         #  @return New GEOM.GEOM_Object, containing the created plane.
1615         #
1616         #  @ref tui_creation_plane "Example"
1617         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1618             """
1619             Create a plane, passing through the given point
1620             and normal to the given vector.
1621
1622             Parameters:
1623                 thePnt Point, the plane has to pass through.
1624                 theVec Vector, defining the plane normal direction.
1625                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1626                 theName Object name; when specified, this parameter is used
1627                         for result publication in the study. Otherwise, if automatic
1628                         publication is switched on, default value is used for result name.
1629
1630             Returns:    
1631                 New GEOM.GEOM_Object, containing the created plane.
1632             """
1633             # Example: see GEOM_TestAll.py
1634             theTrimSize, Parameters = ParseParameters(theTrimSize);
1635             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1636             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1637             anObj.SetParameters(Parameters)
1638             self._autoPublish(anObj, theName, "plane")
1639             return anObj
1640
1641         ## Create a plane, passing through the three given points
1642         #  @param thePnt1 First of three points, defining the plane.
1643         #  @param thePnt2 Second of three points, defining the plane.
1644         #  @param thePnt3 Fird of three points, defining the plane.
1645         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1646         #  @param theName Object name; when specified, this parameter is used
1647         #         for result publication in the study. Otherwise, if automatic
1648         #         publication is switched on, default value is used for result name.
1649         #
1650         #  @return New GEOM.GEOM_Object, containing the created plane.
1651         #
1652         #  @ref tui_creation_plane "Example"
1653         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1654             """
1655             Create a plane, passing through the three given points
1656
1657             Parameters:
1658                 thePnt1 First of three points, defining the plane.
1659                 thePnt2 Second of three points, defining the plane.
1660                 thePnt3 Fird of three points, defining the plane.
1661                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1662                 theName Object name; when specified, this parameter is used
1663                         for result publication in the study. Otherwise, if automatic
1664                         publication is switched on, default value is used for result name.
1665
1666             Returns:
1667                 New GEOM.GEOM_Object, containing the created plane.
1668             """
1669             # Example: see GEOM_TestAll.py
1670             theTrimSize, Parameters = ParseParameters(theTrimSize);
1671             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1672             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1673             anObj.SetParameters(Parameters)
1674             self._autoPublish(anObj, theName, "plane")
1675             return anObj
1676
1677         ## Create a plane, similar to the existing one, but with another size of representing face.
1678         #  @param theFace Referenced plane or LCS(Marker).
1679         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1680         #  @param theName Object name; when specified, this parameter is used
1681         #         for result publication in the study. Otherwise, if automatic
1682         #         publication is switched on, default value is used for result name.
1683         #
1684         #  @return New GEOM.GEOM_Object, containing the created plane.
1685         #
1686         #  @ref tui_creation_plane "Example"
1687         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1688             """
1689             Create a plane, similar to the existing one, but with another size of representing face.
1690
1691             Parameters:
1692                 theFace Referenced plane or LCS(Marker).
1693                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1694                 theName Object name; when specified, this parameter is used
1695                         for result publication in the study. Otherwise, if automatic
1696                         publication is switched on, default value is used for result name.
1697
1698             Returns:
1699                 New GEOM.GEOM_Object, containing the created plane.
1700             """
1701             # Example: see GEOM_TestAll.py
1702             theTrimSize, Parameters = ParseParameters(theTrimSize);
1703             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1704             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1705             anObj.SetParameters(Parameters)
1706             self._autoPublish(anObj, theName, "plane")
1707             return anObj
1708
1709         ## Create a plane, passing through the 2 vectors
1710         #  with center in a start point of the first vector.
1711         #  @param theVec1 Vector, defining center point and plane direction.
1712         #  @param theVec2 Vector, defining the plane normal direction.
1713         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1714         #  @param theName Object name; when specified, this parameter is used
1715         #         for result publication in the study. Otherwise, if automatic
1716         #         publication is switched on, default value is used for result name.
1717         #
1718         #  @return New GEOM.GEOM_Object, containing the created plane.
1719         #
1720         #  @ref tui_creation_plane "Example"
1721         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1722             """
1723             Create a plane, passing through the 2 vectors
1724             with center in a start point of the first vector.
1725
1726             Parameters:
1727                 theVec1 Vector, defining center point and plane direction.
1728                 theVec2 Vector, defining the plane normal direction.
1729                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1730                 theName Object name; when specified, this parameter is used
1731                         for result publication in the study. Otherwise, if automatic
1732                         publication is switched on, default value is used for result name.
1733
1734             Returns: 
1735                 New GEOM.GEOM_Object, containing the created plane.
1736             """
1737             # Example: see GEOM_TestAll.py
1738             theTrimSize, Parameters = ParseParameters(theTrimSize);
1739             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1740             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1741             anObj.SetParameters(Parameters)
1742             self._autoPublish(anObj, theName, "plane")
1743             return anObj
1744
1745         ## Create a plane, based on a Local coordinate system.
1746         #  @param theLCS  coordinate system, defining plane.
1747         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1748         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1749         #  @param theName Object name; when specified, this parameter is used
1750         #         for result publication in the study. Otherwise, if automatic
1751         #         publication is switched on, default value is used for result name.
1752         #
1753         #  @return New GEOM.GEOM_Object, containing the created plane.
1754         #
1755         #  @ref tui_creation_plane "Example"
1756         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1757             """
1758             Create a plane, based on a Local coordinate system.
1759
1760            Parameters: 
1761                 theLCS  coordinate system, defining plane.
1762                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1763                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1764                 theName Object name; when specified, this parameter is used
1765                         for result publication in the study. Otherwise, if automatic
1766                         publication is switched on, default value is used for result name.
1767
1768             Returns: 
1769                 New GEOM.GEOM_Object, containing the created plane.
1770             """
1771             # Example: see GEOM_TestAll.py
1772             theTrimSize, Parameters = ParseParameters(theTrimSize);
1773             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1774             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1775             anObj.SetParameters(Parameters)
1776             self._autoPublish(anObj, theName, "plane")
1777             return anObj
1778
1779         ## Create a local coordinate system.
1780         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1781         #  @param XDX,XDY,XDZ Three components of OX direction
1782         #  @param YDX,YDY,YDZ Three components of OY direction
1783         #  @param theName Object name; when specified, this parameter is used
1784         #         for result publication in the study. Otherwise, if automatic
1785         #         publication is switched on, default value is used for result name.
1786         #
1787         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1788         #
1789         #  @ref swig_MakeMarker "Example"
1790         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1791             """
1792             Create a local coordinate system.
1793
1794             Parameters: 
1795                 OX,OY,OZ Three coordinates of coordinate system origin.
1796                 XDX,XDY,XDZ Three components of OX direction
1797                 YDX,YDY,YDZ Three components of OY direction
1798                 theName Object name; when specified, this parameter is used
1799                         for result publication in the study. Otherwise, if automatic
1800                         publication is switched on, default value is used for result name.
1801
1802             Returns: 
1803                 New GEOM.GEOM_Object, containing the created coordinate system.
1804             """
1805             # Example: see GEOM_TestAll.py
1806             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1807             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1808             RaiseIfFailed("MakeMarker", self.BasicOp)
1809             anObj.SetParameters(Parameters)
1810             self._autoPublish(anObj, theName, "lcs")
1811             return anObj
1812
1813         ## Create a local coordinate system from shape.
1814         #  @param theShape The initial shape to detect the coordinate system.
1815         #  @param theName Object name; when specified, this parameter is used
1816         #         for result publication in the study. Otherwise, if automatic
1817         #         publication is switched on, default value is used for result name.
1818         #
1819         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1820         #
1821         #  @ref tui_creation_lcs "Example"
1822         def MakeMarkerFromShape(self, theShape, theName=None):
1823             """
1824             Create a local coordinate system from shape.
1825
1826             Parameters:
1827                 theShape The initial shape to detect the coordinate system.
1828                 theName Object name; when specified, this parameter is used
1829                         for result publication in the study. Otherwise, if automatic
1830                         publication is switched on, default value is used for result name.
1831                 
1832             Returns: 
1833                 New GEOM.GEOM_Object, containing the created coordinate system.
1834             """
1835             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1836             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1837             self._autoPublish(anObj, theName, "lcs")
1838             return anObj
1839
1840         ## Create a local coordinate system from point and two vectors.
1841         #  @param theOrigin Point of coordinate system origin.
1842         #  @param theXVec Vector of X direction
1843         #  @param theYVec Vector of Y direction
1844         #  @param theName Object name; when specified, this parameter is used
1845         #         for result publication in the study. Otherwise, if automatic
1846         #         publication is switched on, default value is used for result name.
1847         #
1848         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1849         #
1850         #  @ref tui_creation_lcs "Example"
1851         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1852             """
1853             Create a local coordinate system from point and two vectors.
1854
1855             Parameters:
1856                 theOrigin Point of coordinate system origin.
1857                 theXVec Vector of X direction
1858                 theYVec Vector of Y direction
1859                 theName Object name; when specified, this parameter is used
1860                         for result publication in the study. Otherwise, if automatic
1861                         publication is switched on, default value is used for result name.
1862
1863             Returns: 
1864                 New GEOM.GEOM_Object, containing the created coordinate system.
1865
1866             """
1867             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1868             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1869             self._autoPublish(anObj, theName, "lcs")
1870             return anObj
1871
1872         # end of l3_basic_go
1873         ## @}
1874
1875         ## @addtogroup l4_curves
1876         ## @{
1877
1878         ##  Create an arc of circle, passing through three given points.
1879         #  @param thePnt1 Start point of the arc.
1880         #  @param thePnt2 Middle point of the arc.
1881         #  @param thePnt3 End point of the arc.
1882         #  @param theName Object name; when specified, this parameter is used
1883         #         for result publication in the study. Otherwise, if automatic
1884         #         publication is switched on, default value is used for result name.
1885         #
1886         #  @return New GEOM.GEOM_Object, containing the created arc.
1887         #
1888         #  @ref swig_MakeArc "Example"
1889         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1890             """
1891             Create an arc of circle, passing through three given points.
1892
1893             Parameters:
1894                 thePnt1 Start point of the arc.
1895                 thePnt2 Middle point of the arc.
1896                 thePnt3 End point of the arc.
1897                 theName Object name; when specified, this parameter is used
1898                         for result publication in the study. Otherwise, if automatic
1899                         publication is switched on, default value is used for result name.
1900
1901             Returns: 
1902                 New GEOM.GEOM_Object, containing the created arc.
1903             """
1904             # Example: see GEOM_TestAll.py
1905             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1906             RaiseIfFailed("MakeArc", self.CurvesOp)
1907             self._autoPublish(anObj, theName, "arc")
1908             return anObj
1909
1910         ##  Create an arc of circle from a center and 2 points.
1911         #  @param thePnt1 Center of the arc
1912         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1913         #  @param thePnt3 End point of the arc (Gives also a direction)
1914         #  @param theSense Orientation of the arc
1915         #  @param theName Object name; when specified, this parameter is used
1916         #         for result publication in the study. Otherwise, if automatic
1917         #         publication is switched on, default value is used for result name.
1918         #
1919         #  @return New GEOM.GEOM_Object, containing the created arc.
1920         #
1921         #  @ref swig_MakeArc "Example"
1922         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1923             """
1924             Create an arc of circle from a center and 2 points.
1925
1926             Parameters:
1927                 thePnt1 Center of the arc
1928                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1929                 thePnt3 End point of the arc (Gives also a direction)
1930                 theSense Orientation of the arc
1931                 theName Object name; when specified, this parameter is used
1932                         for result publication in the study. Otherwise, if automatic
1933                         publication is switched on, default value is used for result name.
1934
1935             Returns:
1936                 New GEOM.GEOM_Object, containing the created arc.
1937             """
1938             # Example: see GEOM_TestAll.py
1939             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1940             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1941             self._autoPublish(anObj, theName, "arc")
1942             return anObj
1943
1944         ##  Create an arc of ellipse, of center and two points.
1945         #  @param theCenter Center of the arc.
1946         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1947         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1948         #  @param theName Object name; when specified, this parameter is used
1949         #         for result publication in the study. Otherwise, if automatic
1950         #         publication is switched on, default value is used for result name.
1951         #
1952         #  @return New GEOM.GEOM_Object, containing the created arc.
1953         #
1954         #  @ref swig_MakeArc "Example"
1955         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
1956             """
1957             Create an arc of ellipse, of center and two points.
1958
1959             Parameters:
1960                 theCenter Center of the arc.
1961                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1962                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1963                 theName Object name; when specified, this parameter is used
1964                         for result publication in the study. Otherwise, if automatic
1965                         publication is switched on, default value is used for result name.
1966
1967             Returns:
1968                 New GEOM.GEOM_Object, containing the created arc.
1969             """
1970             # Example: see GEOM_TestAll.py
1971             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
1972             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
1973             self._autoPublish(anObj, theName, "arc")
1974             return anObj
1975
1976         ## Create a circle with given center, normal vector and radius.
1977         #  @param thePnt Circle center.
1978         #  @param theVec Vector, normal to the plane of the circle.
1979         #  @param theR Circle radius.
1980         #  @param theName Object name; when specified, this parameter is used
1981         #         for result publication in the study. Otherwise, if automatic
1982         #         publication is switched on, default value is used for result name.
1983         #
1984         #  @return New GEOM.GEOM_Object, containing the created circle.
1985         #
1986         #  @ref tui_creation_circle "Example"
1987         def MakeCircle(self, thePnt, theVec, theR, theName=None):
1988             """
1989             Create a circle with given center, normal vector and radius.
1990
1991             Parameters:
1992                 thePnt Circle center.
1993                 theVec Vector, normal to the plane of the circle.
1994                 theR Circle radius.
1995                 theName Object name; when specified, this parameter is used
1996                         for result publication in the study. Otherwise, if automatic
1997                         publication is switched on, default value is used for result name.
1998
1999             Returns:
2000                 New GEOM.GEOM_Object, containing the created circle.
2001             """
2002             # Example: see GEOM_TestAll.py
2003             theR, Parameters = ParseParameters(theR)
2004             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2005             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2006             anObj.SetParameters(Parameters)
2007             self._autoPublish(anObj, theName, "circle")
2008             return anObj
2009
2010         ## Create a circle with given radius.
2011         #  Center of the circle will be in the origin of global
2012         #  coordinate system and normal vector will be codirected with Z axis
2013         #  @param theR Circle radius.
2014         #  @param theName Object name; when specified, this parameter is used
2015         #         for result publication in the study. Otherwise, if automatic
2016         #         publication is switched on, default value is used for result name.
2017         #
2018         #  @return New GEOM.GEOM_Object, containing the created circle.
2019         def MakeCircleR(self, theR, theName=None):
2020             """
2021             Create a circle with given radius.
2022             Center of the circle will be in the origin of global
2023             coordinate system and normal vector will be codirected with Z axis
2024
2025             Parameters:
2026                 theR Circle radius.
2027                 theName Object name; when specified, this parameter is used
2028                         for result publication in the study. Otherwise, if automatic
2029                         publication is switched on, default value is used for result name.
2030
2031             Returns:
2032                 New GEOM.GEOM_Object, containing the created circle.
2033             """
2034             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2035             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2036             self._autoPublish(anObj, theName, "circle")
2037             return anObj
2038
2039         ## Create a circle, passing through three given points
2040         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2041         #  @param theName Object name; when specified, this parameter is used
2042         #         for result publication in the study. Otherwise, if automatic
2043         #         publication is switched on, default value is used for result name.
2044         #
2045         #  @return New GEOM.GEOM_Object, containing the created circle.
2046         #
2047         #  @ref tui_creation_circle "Example"
2048         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2049             """
2050             Create a circle, passing through three given points
2051
2052             Parameters:
2053                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2054                 theName Object name; when specified, this parameter is used
2055                         for result publication in the study. Otherwise, if automatic
2056                         publication is switched on, default value is used for result name.
2057
2058             Returns:
2059                 New GEOM.GEOM_Object, containing the created circle.
2060             """
2061             # Example: see GEOM_TestAll.py
2062             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2063             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2064             self._autoPublish(anObj, theName, "circle")
2065             return anObj
2066
2067         ## Create a circle, with given point1 as center,
2068         #  passing through the point2 as radius and laying in the plane,
2069         #  defined by all three given points.
2070         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2071         #  @param theName Object name; when specified, this parameter is used
2072         #         for result publication in the study. Otherwise, if automatic
2073         #         publication is switched on, default value is used for result name.
2074         #
2075         #  @return New GEOM.GEOM_Object, containing the created circle.
2076         #
2077         #  @ref swig_MakeCircle "Example"
2078         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2079             """
2080             Create a circle, with given point1 as center,
2081             passing through the point2 as radius and laying in the plane,
2082             defined by all three given points.
2083
2084             Parameters:
2085                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2086                 theName Object name; when specified, this parameter is used
2087                         for result publication in the study. Otherwise, if automatic
2088                         publication is switched on, default value is used for result name.
2089
2090             Returns:
2091                 New GEOM.GEOM_Object, containing the created circle.
2092             """
2093             # Example: see GEOM_example6.py
2094             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2095             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2096             self._autoPublish(anObj, theName, "circle")
2097             return anObj
2098
2099         ## Create an ellipse with given center, normal vector and radiuses.
2100         #  @param thePnt Ellipse center.
2101         #  @param theVec Vector, normal to the plane of the ellipse.
2102         #  @param theRMajor Major ellipse radius.
2103         #  @param theRMinor Minor ellipse radius.
2104         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2105         #  @param theName Object name; when specified, this parameter is used
2106         #         for result publication in the study. Otherwise, if automatic
2107         #         publication is switched on, default value is used for result name.
2108         #
2109         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2110         #
2111         #  @ref tui_creation_ellipse "Example"
2112         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2113             """
2114             Create an ellipse with given center, normal vector and radiuses.
2115
2116             Parameters:
2117                 thePnt Ellipse center.
2118                 theVec Vector, normal to the plane of the ellipse.
2119                 theRMajor Major ellipse radius.
2120                 theRMinor Minor ellipse radius.
2121                 theVecMaj Vector, direction of the ellipse's main axis.
2122                 theName Object name; when specified, this parameter is used
2123                         for result publication in the study. Otherwise, if automatic
2124                         publication is switched on, default value is used for result name.
2125
2126             Returns:    
2127                 New GEOM.GEOM_Object, containing the created ellipse.
2128             """
2129             # Example: see GEOM_TestAll.py
2130             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2131             if theVecMaj is not None:
2132                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2133             else:
2134                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2135                 pass
2136             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2137             anObj.SetParameters(Parameters)
2138             self._autoPublish(anObj, theName, "ellipse")
2139             return anObj
2140
2141         ## Create an ellipse with given radiuses.
2142         #  Center of the ellipse will be in the origin of global
2143         #  coordinate system and normal vector will be codirected with Z axis
2144         #  @param theRMajor Major ellipse radius.
2145         #  @param theRMinor Minor ellipse radius.
2146         #  @param theName Object name; when specified, this parameter is used
2147         #         for result publication in the study. Otherwise, if automatic
2148         #         publication is switched on, default value is used for result name.
2149         #
2150         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2151         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2152             """
2153             Create an ellipse with given radiuses.
2154             Center of the ellipse will be in the origin of global
2155             coordinate system and normal vector will be codirected with Z axis
2156
2157             Parameters:
2158                 theRMajor Major ellipse radius.
2159                 theRMinor Minor ellipse radius.
2160                 theName Object name; when specified, this parameter is used
2161                         for result publication in the study. Otherwise, if automatic
2162                         publication is switched on, default value is used for result name.
2163
2164             Returns:
2165             New GEOM.GEOM_Object, containing the created ellipse.
2166             """
2167             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2168             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2169             self._autoPublish(anObj, theName, "ellipse")
2170             return anObj
2171
2172         ## Create a polyline on the set of points.
2173         #  @param thePoints Sequence of points for the polyline.
2174         #  @param theIsClosed If True, build a closed wire.
2175         #  @param theName Object name; when specified, this parameter is used
2176         #         for result publication in the study. Otherwise, if automatic
2177         #         publication is switched on, default value is used for result name.
2178         #
2179         #  @return New GEOM.GEOM_Object, containing the created polyline.
2180         #
2181         #  @ref tui_creation_curve "Example"
2182         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2183             """
2184             Create a polyline on the set of points.
2185
2186             Parameters:
2187                 thePoints Sequence of points for the polyline.
2188                 theIsClosed If True, build a closed wire.
2189                 theName Object name; when specified, this parameter is used
2190                         for result publication in the study. Otherwise, if automatic
2191                         publication is switched on, default value is used for result name.
2192
2193             Returns:
2194                 New GEOM.GEOM_Object, containing the created polyline.
2195             """
2196             # Example: see GEOM_TestAll.py
2197             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2198             RaiseIfFailed("MakePolyline", self.CurvesOp)
2199             self._autoPublish(anObj, theName, "polyline")
2200             return anObj
2201
2202         ## Create bezier curve on the set of points.
2203         #  @param thePoints Sequence of points for the bezier curve.
2204         #  @param theIsClosed If True, build a closed curve.
2205         #  @param theName Object name; when specified, this parameter is used
2206         #         for result publication in the study. Otherwise, if automatic
2207         #         publication is switched on, default value is used for result name.
2208         #
2209         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2210         #
2211         #  @ref tui_creation_curve "Example"
2212         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2213             """
2214             Create bezier curve on the set of points.
2215
2216             Parameters:
2217                 thePoints Sequence of points for the bezier curve.
2218                 theIsClosed If True, build a closed curve.
2219                 theName Object name; when specified, this parameter is used
2220                         for result publication in the study. Otherwise, if automatic
2221                         publication is switched on, default value is used for result name.
2222
2223             Returns:
2224                 New GEOM.GEOM_Object, containing the created bezier curve.
2225             """
2226             # Example: see GEOM_TestAll.py
2227             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2228             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2229             self._autoPublish(anObj, theName, "bezier")
2230             return anObj
2231
2232         ## Create B-Spline curve on the set of points.
2233         #  @param thePoints Sequence of points for the B-Spline curve.
2234         #  @param theIsClosed If True, build a closed curve.
2235         #  @param theDoReordering If TRUE, the algo does not follow the order of
2236         #                         \a thePoints but searches for the closest vertex.
2237         #  @param theName Object name; when specified, this parameter is used
2238         #         for result publication in the study. Otherwise, if automatic
2239         #         publication is switched on, default value is used for result name.
2240         #
2241         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2242         #
2243         #  @ref tui_creation_curve "Example"
2244         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2245             """
2246             Create B-Spline curve on the set of points.
2247
2248             Parameters:
2249                 thePoints Sequence of points for the B-Spline curve.
2250                 theIsClosed If True, build a closed curve.
2251                 theDoReordering If True, the algo does not follow the order of
2252                                 thePoints but searches for the closest vertex.
2253                 theName Object name; when specified, this parameter is used
2254                         for result publication in the study. Otherwise, if automatic
2255                         publication is switched on, default value is used for result name.
2256
2257             Returns:                     
2258                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2259             """
2260             # Example: see GEOM_TestAll.py
2261             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2262             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2263             self._autoPublish(anObj, theName, "bspline")
2264             return anObj
2265
2266         ## Create B-Spline curve on the set of points.
2267         #  @param thePoints Sequence of points for the B-Spline curve.
2268         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2269         #  @param theLastVec Vector object, defining the curve direction at its last point.
2270         #  @param theName Object name; when specified, this parameter is used
2271         #         for result publication in the study. Otherwise, if automatic
2272         #         publication is switched on, default value is used for result name.
2273         #
2274         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2275         #
2276         #  @ref tui_creation_curve "Example"
2277         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2278             """
2279             Create B-Spline curve on the set of points.
2280
2281             Parameters:
2282                 thePoints Sequence of points for the B-Spline curve.
2283                 theFirstVec Vector object, defining the curve direction at its first point.
2284                 theLastVec Vector object, defining the curve direction at its last point.
2285                 theName Object name; when specified, this parameter is used
2286                         for result publication in the study. Otherwise, if automatic
2287                         publication is switched on, default value is used for result name.
2288
2289             Returns:                     
2290                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2291             """
2292             # Example: see GEOM_TestAll.py
2293             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2294             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2295             self._autoPublish(anObj, theName, "bspline")
2296             return anObj
2297
2298         ## Creates a curve using the parametric definition of the basic points.
2299         #  @param thexExpr parametric equation of the coordinates X.
2300         #  @param theyExpr parametric equation of the coordinates Y.
2301         #  @param thezExpr parametric equation of the coordinates Z.
2302         #  @param theParamMin the minimal value of the parameter.
2303         #  @param theParamMax the maximum value of the parameter.
2304         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2305         #  @param theCurveType the type of the curve,
2306         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2307         #  @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.
2308         #  @param theName Object name; when specified, this parameter is used
2309         #         for result publication in the study. Otherwise, if automatic
2310         #         publication is switched on, default value is used for result name.
2311         #
2312         #  @return New GEOM.GEOM_Object, containing the created curve.
2313         #
2314         #  @ref tui_creation_curve "Example"
2315         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2316                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2317             """
2318             Creates a curve using the parametric definition of the basic points.
2319
2320             Parameters:
2321                 thexExpr parametric equation of the coordinates X.
2322                 theyExpr parametric equation of the coordinates Y.
2323                 thezExpr parametric equation of the coordinates Z.
2324                 theParamMin the minimal value of the parameter.
2325                 theParamMax the maximum value of the parameter.
2326                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2327                 theCurveType the type of the curve,
2328                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2329                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2330                              method is used which can lead to a bug.
2331                 theName Object name; when specified, this parameter is used
2332                         for result publication in the study. Otherwise, if automatic
2333                         publication is switched on, default value is used for result name.
2334
2335             Returns:
2336                 New GEOM.GEOM_Object, containing the created curve.
2337             """
2338             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2339             if theNewMethod:
2340               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2341             else:
2342               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
2343             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2344             anObj.SetParameters(Parameters)
2345             self._autoPublish(anObj, theName, "curve")
2346             return anObj
2347
2348         ## Create an isoline curve on a face.
2349         #  @param theFace the face for which an isoline is created.
2350         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2351         #         creation.
2352         #  @param theParameter the U parameter for U-isoline or V parameter
2353         #         for V-isoline.
2354         #  @param theName Object name; when specified, this parameter is used
2355         #         for result publication in the study. Otherwise, if automatic
2356         #         publication is switched on, default value is used for result name.
2357         #
2358         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2359         #          a compound of edges.
2360         #
2361         #  @ref tui_creation_curve "Example"
2362         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2363             """
2364             Create an isoline curve on a face.
2365
2366             Parameters:
2367                 theFace the face for which an isoline is created.
2368                 IsUIsoline True for U-isoline creation; False for V-isoline
2369                            creation.
2370                 theParameter the U parameter for U-isoline or V parameter
2371                              for V-isoline.
2372                 theName Object name; when specified, this parameter is used
2373                         for result publication in the study. Otherwise, if automatic
2374                         publication is switched on, default value is used for result name.
2375
2376             Returns:
2377                 New GEOM.GEOM_Object, containing the created isoline edge or a
2378                 compound of edges.
2379             """
2380             # Example: see GEOM_TestAll.py
2381             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2382             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2383             if IsUIsoline:
2384                 self._autoPublish(anObj, theName, "U-Isoline")
2385             else:
2386                 self._autoPublish(anObj, theName, "V-Isoline")
2387             return anObj
2388
2389         # end of l4_curves
2390         ## @}
2391
2392         ## @addtogroup l3_sketcher
2393         ## @{
2394
2395         ## Create a sketcher (wire or face), following the textual description,
2396         #  passed through <VAR>theCommand</VAR> argument. \n
2397         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2398         #  Format of the description string have to be the following:
2399         #
2400         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2401         #
2402         #  Where:
2403         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2404         #  - CMD is one of
2405         #     - "R angle" : Set the direction by angle
2406         #     - "D dx dy" : Set the direction by DX & DY
2407         #     .
2408         #       \n
2409         #     - "TT x y" : Create segment by point at X & Y
2410         #     - "T dx dy" : Create segment by point with DX & DY
2411         #     - "L length" : Create segment by direction & Length
2412         #     - "IX x" : Create segment by direction & Intersect. X
2413         #     - "IY y" : Create segment by direction & Intersect. Y
2414         #     .
2415         #       \n
2416         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2417         #     - "AA x y": Create arc by point at X & Y
2418         #     - "A dx dy" : Create arc by point with DX & DY
2419         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2420         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2421         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2422         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2423         #     .
2424         #       \n
2425         #     - "WW" : Close Wire (to finish)
2426         #     - "WF" : Close Wire and build face (to finish)
2427         #     .
2428         #        \n
2429         #  - Flag1 (= reverse) is 0 or 2 ...
2430         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2431         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2432         #     .
2433         #        \n
2434         #  - Flag2 (= control tolerance) is 0 or 1 ...
2435         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2436         #     - if 1 the wire is built only if the end point is on the arc
2437         #       with a tolerance of 10^-7 on the distance else the creation fails
2438         #
2439         #  @param theCommand String, defining the sketcher in local
2440         #                    coordinates of the working plane.
2441         #  @param theWorkingPlane Nine double values, defining origin,
2442         #                         OZ and OX directions of the working plane.
2443         #  @param theName Object name; when specified, this parameter is used
2444         #         for result publication in the study. Otherwise, if automatic
2445         #         publication is switched on, default value is used for result name.
2446         #
2447         #  @return New GEOM.GEOM_Object, containing the created wire.
2448         #
2449         #  @ref tui_sketcher_page "Example"
2450         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2451             """
2452             Create a sketcher (wire or face), following the textual description, passed
2453             through theCommand argument.
2454             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2455             Format of the description string have to be the following:
2456                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2457             Where:
2458             - x1, y1 are coordinates of the first sketcher point (zero by default),
2459             - CMD is one of
2460                - "R angle" : Set the direction by angle
2461                - "D dx dy" : Set the direction by DX & DY
2462                
2463                - "TT x y" : Create segment by point at X & Y
2464                - "T dx dy" : Create segment by point with DX & DY
2465                - "L length" : Create segment by direction & Length
2466                - "IX x" : Create segment by direction & Intersect. X
2467                - "IY y" : Create segment by direction & Intersect. Y
2468
2469                - "C radius length" : Create arc by direction, radius and length(in degree)
2470                - "AA x y": Create arc by point at X & Y
2471                - "A dx dy" : Create arc by point with DX & DY
2472                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2473                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2474                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2475                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2476
2477                - "WW" : Close Wire (to finish)
2478                - "WF" : Close Wire and build face (to finish)
2479             
2480             - Flag1 (= reverse) is 0 or 2 ...
2481                - if 0 the drawn arc is the one of lower angle (< Pi)
2482                - if 2 the drawn arc ius the one of greater angle (> Pi)
2483         
2484             - Flag2 (= control tolerance) is 0 or 1 ...
2485                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2486                - if 1 the wire is built only if the end point is on the arc
2487                  with a tolerance of 10^-7 on the distance else the creation fails
2488
2489             Parameters:
2490                 theCommand String, defining the sketcher in local
2491                            coordinates of the working plane.
2492                 theWorkingPlane Nine double values, defining origin,
2493                                 OZ and OX directions of the working plane.
2494                 theName Object name; when specified, this parameter is used
2495                         for result publication in the study. Otherwise, if automatic
2496                         publication is switched on, default value is used for result name.
2497
2498             Returns:
2499                 New GEOM.GEOM_Object, containing the created wire.
2500             """
2501             # Example: see GEOM_TestAll.py
2502             theCommand,Parameters = ParseSketcherCommand(theCommand)
2503             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2504             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2505             anObj.SetParameters(Parameters)
2506             self._autoPublish(anObj, theName, "wire")
2507             return anObj
2508
2509         ## Create a sketcher (wire or face), following the textual description,
2510         #  passed through <VAR>theCommand</VAR> argument. \n
2511         #  For format of the description string see MakeSketcher() method.\n
2512         #  @param theCommand String, defining the sketcher in local
2513         #                    coordinates of the working plane.
2514         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2515         #  @param theName Object name; when specified, this parameter is used
2516         #         for result publication in the study. Otherwise, if automatic
2517         #         publication is switched on, default value is used for result name.
2518         #
2519         #  @return New GEOM.GEOM_Object, containing the created wire.
2520         #
2521         #  @ref tui_sketcher_page "Example"
2522         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2523             """
2524             Create a sketcher (wire or face), following the textual description,
2525             passed through theCommand argument.
2526             For format of the description string see geompy.MakeSketcher() method.
2527
2528             Parameters:
2529                 theCommand String, defining the sketcher in local
2530                            coordinates of the working plane.
2531                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2532                 theName Object name; when specified, this parameter is used
2533                         for result publication in the study. Otherwise, if automatic
2534                         publication is switched on, default value is used for result name.
2535
2536             Returns:
2537                 New GEOM.GEOM_Object, containing the created wire.
2538             """
2539             theCommand,Parameters = ParseSketcherCommand(theCommand)
2540             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2541             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2542             anObj.SetParameters(Parameters)
2543             self._autoPublish(anObj, theName, "wire")
2544             return anObj
2545
2546         ## Obtain a 2D sketcher interface
2547         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface      
2548         def Sketcher2D (self):
2549             """
2550             Obtain a 2D sketcher interface.
2551
2552             Example of usage:
2553                sk = geompy.Sketcher2D()
2554                sk.addPoint(20, 20)
2555                sk.addSegmentRelative(15, 70)
2556                sk.addSegmentPerpY(50)
2557                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2558                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2559                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2560                sk.close()
2561                Sketch_1 = sk.wire(geomObj_1)
2562             """
2563             sk = Sketcher2D (self)
2564             return sk
2565         
2566         ## Create a sketcher wire, following the numerical description,
2567         #  passed through <VAR>theCoordinates</VAR> argument. \n
2568         #  @param theCoordinates double values, defining points to create a wire,
2569         #                                                      passing from it.
2570         #  @param theName Object name; when specified, this parameter is used
2571         #         for result publication in the study. Otherwise, if automatic
2572         #         publication is switched on, default value is used for result name.
2573         #
2574         #  @return New GEOM.GEOM_Object, containing the created wire.
2575         #
2576         #  @ref tui_3dsketcher_page "Example"
2577         def Make3DSketcher(self, theCoordinates, theName=None):
2578             """
2579             Create a sketcher wire, following the numerical description,
2580             passed through theCoordinates argument.
2581
2582             Parameters:
2583                 theCoordinates double values, defining points to create a wire,
2584                                passing from it.
2585                 theName Object name; when specified, this parameter is used
2586                         for result publication in the study. Otherwise, if automatic
2587                         publication is switched on, default value is used for result name.
2588
2589             Returns:
2590                 New GEOM_Object, containing the created wire.
2591             """
2592             theCoordinates,Parameters = ParseParameters(theCoordinates)
2593             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2594             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2595             anObj.SetParameters(Parameters)
2596             self._autoPublish(anObj, theName, "wire")
2597             return anObj
2598
2599         ## Obtain a 3D sketcher interface
2600         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2601         #
2602         #  @ref tui_3dsketcher_page "Example"
2603         def Sketcher3D (self):
2604             """
2605             Obtain a 3D sketcher interface.
2606
2607             Example of usage:
2608                 sk = geompy.Sketcher3D()
2609                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2610                 sk.addPointsRelative(0, 0, 130)
2611                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2612                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2613                 sk.close()
2614                 a3D_Sketcher_1 = sk.wire()
2615             """
2616             sk = Sketcher3D (self)
2617             return sk
2618
2619         # end of l3_sketcher
2620         ## @}
2621
2622         ## @addtogroup l3_3d_primitives
2623         ## @{
2624
2625         ## Create a box by coordinates of two opposite vertices.
2626         #
2627         #  @param x1,y1,z1 double values, defining first point it.
2628         #  @param x2,y2,z2 double values, defining first point it.
2629         #  @param theName Object name; when specified, this parameter is used
2630         #         for result publication in the study. Otherwise, if automatic
2631         #         publication is switched on, default value is used for result name.
2632         #
2633         #  @return New GEOM.GEOM_Object, containing the created box.
2634         #
2635         #  @ref tui_creation_box "Example"
2636         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2637             """
2638             Create a box by coordinates of two opposite vertices.
2639             
2640             Parameters:
2641                 x1,y1,z1 double values, defining first point.
2642                 x2,y2,z2 double values, defining second point.
2643                 theName Object name; when specified, this parameter is used
2644                         for result publication in the study. Otherwise, if automatic
2645                         publication is switched on, default value is used for result name.
2646                 
2647             Returns:
2648                 New GEOM.GEOM_Object, containing the created box.
2649             """
2650             # Example: see GEOM_TestAll.py
2651             pnt1 = self.MakeVertex(x1,y1,z1)
2652             pnt2 = self.MakeVertex(x2,y2,z2)
2653             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2654             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2655
2656         ## Create a box with specified dimensions along the coordinate axes
2657         #  and with edges, parallel to the coordinate axes.
2658         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2659         #  @param theDX Length of Box edges, parallel to OX axis.
2660         #  @param theDY Length of Box edges, parallel to OY axis.
2661         #  @param theDZ Length of Box edges, parallel to OZ axis.
2662         #  @param theName Object name; when specified, this parameter is used
2663         #         for result publication in the study. Otherwise, if automatic
2664         #         publication is switched on, default value is used for result name.
2665         #
2666         #  @return New GEOM.GEOM_Object, containing the created box.
2667         #
2668         #  @ref tui_creation_box "Example"
2669         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2670             """
2671             Create a box with specified dimensions along the coordinate axes
2672             and with edges, parallel to the coordinate axes.
2673             Center of the box will be at point (DX/2, DY/2, DZ/2).
2674
2675             Parameters:
2676                 theDX Length of Box edges, parallel to OX axis.
2677                 theDY Length of Box edges, parallel to OY axis.
2678                 theDZ Length of Box edges, parallel to OZ axis.
2679                 theName Object name; when specified, this parameter is used
2680                         for result publication in the study. Otherwise, if automatic
2681                         publication is switched on, default value is used for result name.
2682
2683             Returns:   
2684                 New GEOM.GEOM_Object, containing the created box.
2685             """
2686             # Example: see GEOM_TestAll.py
2687             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2688             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2689             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2690             anObj.SetParameters(Parameters)
2691             self._autoPublish(anObj, theName, "box")
2692             return anObj
2693
2694         ## Create a box with two specified opposite vertices,
2695         #  and with edges, parallel to the coordinate axes
2696         #  @param thePnt1 First of two opposite vertices.
2697         #  @param thePnt2 Second of two opposite vertices.
2698         #  @param theName Object name; when specified, this parameter is used
2699         #         for result publication in the study. Otherwise, if automatic
2700         #         publication is switched on, default value is used for result name.
2701         #
2702         #  @return New GEOM.GEOM_Object, containing the created box.
2703         #
2704         #  @ref tui_creation_box "Example"
2705         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2706             """
2707             Create a box with two specified opposite vertices,
2708             and with edges, parallel to the coordinate axes
2709
2710             Parameters:
2711                 thePnt1 First of two opposite vertices.
2712                 thePnt2 Second of two opposite vertices.
2713                 theName Object name; when specified, this parameter is used
2714                         for result publication in the study. Otherwise, if automatic
2715                         publication is switched on, default value is used for result name.
2716
2717             Returns:
2718                 New GEOM.GEOM_Object, containing the created box.
2719             """
2720             # Example: see GEOM_TestAll.py
2721             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2722             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2723             self._autoPublish(anObj, theName, "box")
2724             return anObj
2725
2726         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2727         #  @param theH height of Face.
2728         #  @param theW width of Face.
2729         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2730         #  @param theName Object name; when specified, this parameter is used
2731         #         for result publication in the study. Otherwise, if automatic
2732         #         publication is switched on, default value is used for result name.
2733         #
2734         #  @return New GEOM.GEOM_Object, containing the created face.
2735         #
2736         #  @ref tui_creation_face "Example"
2737         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2738             """
2739             Create a face with specified dimensions with edges parallel to coordinate axes.
2740
2741             Parameters:
2742                 theH height of Face.
2743                 theW width of Face.
2744                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2745                 theName Object name; when specified, this parameter is used
2746                         for result publication in the study. Otherwise, if automatic
2747                         publication is switched on, default value is used for result name.
2748
2749             Returns:
2750                 New GEOM.GEOM_Object, containing the created face.
2751             """
2752             # Example: see GEOM_TestAll.py
2753             theH,theW,Parameters = ParseParameters(theH, theW)
2754             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2755             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2756             anObj.SetParameters(Parameters)
2757             self._autoPublish(anObj, theName, "rectangle")
2758             return anObj
2759
2760         ## Create a face from another plane and two sizes,
2761         #  vertical size and horisontal size.
2762         #  @param theObj   Normale vector to the creating face or
2763         #  the face object.
2764         #  @param theH     Height (vertical size).
2765         #  @param theW     Width (horisontal size).
2766         #  @param theName Object name; when specified, this parameter is used
2767         #         for result publication in the study. Otherwise, if automatic
2768         #         publication is switched on, default value is used for result name.
2769         #
2770         #  @return New GEOM.GEOM_Object, containing the created face.
2771         #
2772         #  @ref tui_creation_face "Example"
2773         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2774             """
2775             Create a face from another plane and two sizes,
2776             vertical size and horisontal size.
2777
2778             Parameters:
2779                 theObj   Normale vector to the creating face or
2780                          the face object.
2781                 theH     Height (vertical size).
2782                 theW     Width (horisontal size).
2783                 theName Object name; when specified, this parameter is used
2784                         for result publication in the study. Otherwise, if automatic
2785                         publication is switched on, default value is used for result name.
2786
2787             Returns:
2788                 New GEOM_Object, containing the created face.
2789             """
2790             # Example: see GEOM_TestAll.py
2791             theH,theW,Parameters = ParseParameters(theH, theW)
2792             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2793             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2794             anObj.SetParameters(Parameters)
2795             self._autoPublish(anObj, theName, "rectangle")
2796             return anObj
2797
2798         ## Create a disk with given center, normal vector and radius.
2799         #  @param thePnt Disk center.
2800         #  @param theVec Vector, normal to the plane of the disk.
2801         #  @param theR Disk radius.
2802         #  @param theName Object name; when specified, this parameter is used
2803         #         for result publication in the study. Otherwise, if automatic
2804         #         publication is switched on, default value is used for result name.
2805         #
2806         #  @return New GEOM.GEOM_Object, containing the created disk.
2807         #
2808         #  @ref tui_creation_disk "Example"
2809         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2810             """
2811             Create a disk with given center, normal vector and radius.
2812
2813             Parameters:
2814                 thePnt Disk center.
2815                 theVec Vector, normal to the plane of the disk.
2816                 theR Disk radius.
2817                 theName Object name; when specified, this parameter is used
2818                         for result publication in the study. Otherwise, if automatic
2819                         publication is switched on, default value is used for result name.
2820
2821             Returns:    
2822                 New GEOM.GEOM_Object, containing the created disk.
2823             """
2824             # Example: see GEOM_TestAll.py
2825             theR,Parameters = ParseParameters(theR)
2826             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2827             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2828             anObj.SetParameters(Parameters)
2829             self._autoPublish(anObj, theName, "disk")
2830             return anObj
2831
2832         ## Create a disk, passing through three given points
2833         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2834         #  @param theName Object name; when specified, this parameter is used
2835         #         for result publication in the study. Otherwise, if automatic
2836         #         publication is switched on, default value is used for result name.
2837         #
2838         #  @return New GEOM.GEOM_Object, containing the created disk.
2839         #
2840         #  @ref tui_creation_disk "Example"
2841         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2842             """
2843             Create a disk, passing through three given points
2844
2845             Parameters:
2846                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2847                 theName Object name; when specified, this parameter is used
2848                         for result publication in the study. Otherwise, if automatic
2849                         publication is switched on, default value is used for result name.
2850
2851             Returns:    
2852                 New GEOM.GEOM_Object, containing the created disk.
2853             """
2854             # Example: see GEOM_TestAll.py
2855             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2856             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2857             self._autoPublish(anObj, theName, "disk")
2858             return anObj
2859
2860         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2861         #  @param theR Radius of Face.
2862         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2863         #  @param theName Object name; when specified, this parameter is used
2864         #         for result publication in the study. Otherwise, if automatic
2865         #         publication is switched on, default value is used for result name.
2866         #
2867         #  @return New GEOM.GEOM_Object, containing the created disk.
2868         #
2869         #  @ref tui_creation_face "Example"
2870         def MakeDiskR(self, theR, theOrientation, theName=None):
2871             """
2872             Create a disk with specified dimensions along OX-OY coordinate axes.
2873
2874             Parameters:
2875                 theR Radius of Face.
2876                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2877                 theName Object name; when specified, this parameter is used
2878                         for result publication in the study. Otherwise, if automatic
2879                         publication is switched on, default value is used for result name.
2880
2881             Returns: 
2882                 New GEOM.GEOM_Object, containing the created disk.
2883
2884             Example of usage:
2885                 Disk3 = geompy.MakeDiskR(100., 1)
2886             """
2887             # Example: see GEOM_TestAll.py
2888             theR,Parameters = ParseParameters(theR)
2889             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2890             RaiseIfFailed("MakeDiskR", self.PrimOp)
2891             anObj.SetParameters(Parameters)
2892             self._autoPublish(anObj, theName, "disk")
2893             return anObj
2894
2895         ## Create a cylinder with given base point, axis, radius and height.
2896         #  @param thePnt Central point of cylinder base.
2897         #  @param theAxis Cylinder axis.
2898         #  @param theR Cylinder radius.
2899         #  @param theH Cylinder height.
2900         #  @param theName Object name; when specified, this parameter is used
2901         #         for result publication in the study. Otherwise, if automatic
2902         #         publication is switched on, default value is used for result name.
2903         #
2904         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2905         #
2906         #  @ref tui_creation_cylinder "Example"
2907         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2908             """
2909             Create a cylinder with given base point, axis, radius and height.
2910
2911             Parameters:
2912                 thePnt Central point of cylinder base.
2913                 theAxis Cylinder axis.
2914                 theR Cylinder radius.
2915                 theH Cylinder height.
2916                 theName Object name; when specified, this parameter is used
2917                         for result publication in the study. Otherwise, if automatic
2918                         publication is switched on, default value is used for result name.
2919
2920             Returns: 
2921                 New GEOM.GEOM_Object, containing the created cylinder.
2922             """
2923             # Example: see GEOM_TestAll.py
2924             theR,theH,Parameters = ParseParameters(theR, theH)
2925             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
2926             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
2927             anObj.SetParameters(Parameters)
2928             self._autoPublish(anObj, theName, "cylinder")
2929             return anObj
2930
2931         ## Create a cylinder with given radius and height at
2932         #  the origin of coordinate system. Axis of the cylinder
2933         #  will be collinear to the OZ axis of the coordinate system.
2934         #  @param theR Cylinder radius.
2935         #  @param theH Cylinder height.
2936         #  @param theName Object name; when specified, this parameter is used
2937         #         for result publication in the study. Otherwise, if automatic
2938         #         publication is switched on, default value is used for result name.
2939         #
2940         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2941         #
2942         #  @ref tui_creation_cylinder "Example"
2943         def MakeCylinderRH(self, theR, theH, theName=None):
2944             """
2945             Create a cylinder with given radius and height at
2946             the origin of coordinate system. Axis of the cylinder
2947             will be collinear to the OZ axis of the coordinate system.
2948
2949             Parameters:
2950                 theR Cylinder radius.
2951                 theH Cylinder height.
2952                 theName Object name; when specified, this parameter is used
2953                         for result publication in the study. Otherwise, if automatic
2954                         publication is switched on, default value is used for result name.
2955
2956             Returns:    
2957                 New GEOM.GEOM_Object, containing the created cylinder.
2958             """
2959             # Example: see GEOM_TestAll.py
2960             theR,theH,Parameters = ParseParameters(theR, theH)
2961             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
2962             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
2963             anObj.SetParameters(Parameters)
2964             self._autoPublish(anObj, theName, "cylinder")
2965             return anObj
2966
2967         ## Create a sphere with given center and radius.
2968         #  @param thePnt Sphere center.
2969         #  @param theR Sphere radius.
2970         #  @param theName Object name; when specified, this parameter is used
2971         #         for result publication in the study. Otherwise, if automatic
2972         #         publication is switched on, default value is used for result name.
2973         #
2974         #  @return New GEOM.GEOM_Object, containing the created sphere.
2975         #
2976         #  @ref tui_creation_sphere "Example"
2977         def MakeSpherePntR(self, thePnt, theR, theName=None):
2978             """
2979             Create a sphere with given center and radius.
2980
2981             Parameters:
2982                 thePnt Sphere center.
2983                 theR Sphere radius.
2984                 theName Object name; when specified, this parameter is used
2985                         for result publication in the study. Otherwise, if automatic
2986                         publication is switched on, default value is used for result name.
2987
2988             Returns:    
2989                 New GEOM.GEOM_Object, containing the created sphere.            
2990             """
2991             # Example: see GEOM_TestAll.py
2992             theR,Parameters = ParseParameters(theR)
2993             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
2994             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
2995             anObj.SetParameters(Parameters)
2996             self._autoPublish(anObj, theName, "sphere")
2997             return anObj
2998
2999         ## Create a sphere with given center and radius.
3000         #  @param x,y,z Coordinates of sphere center.
3001         #  @param theR Sphere radius.
3002         #  @param theName Object name; when specified, this parameter is used
3003         #         for result publication in the study. Otherwise, if automatic
3004         #         publication is switched on, default value is used for result name.
3005         #
3006         #  @return New GEOM.GEOM_Object, containing the created sphere.
3007         #
3008         #  @ref tui_creation_sphere "Example"
3009         def MakeSphere(self, x, y, z, theR, theName=None):
3010             """
3011             Create a sphere with given center and radius.
3012
3013             Parameters: 
3014                 x,y,z Coordinates of sphere center.
3015                 theR Sphere radius.
3016                 theName Object name; when specified, this parameter is used
3017                         for result publication in the study. Otherwise, if automatic
3018                         publication is switched on, default value is used for result name.
3019
3020             Returns:
3021                 New GEOM.GEOM_Object, containing the created sphere.
3022             """
3023             # Example: see GEOM_TestAll.py
3024             point = self.MakeVertex(x, y, z)
3025             # note: auto-publishing is done in self.MakeSpherePntR()
3026             anObj = self.MakeSpherePntR(point, theR, theName)
3027             return anObj
3028
3029         ## Create a sphere with given radius at the origin of coordinate system.
3030         #  @param theR Sphere radius.
3031         #  @param theName Object name; when specified, this parameter is used
3032         #         for result publication in the study. Otherwise, if automatic
3033         #         publication is switched on, default value is used for result name.
3034         #
3035         #  @return New GEOM.GEOM_Object, containing the created sphere.
3036         #
3037         #  @ref tui_creation_sphere "Example"
3038         def MakeSphereR(self, theR, theName=None):
3039             """
3040             Create a sphere with given radius at the origin of coordinate system.
3041
3042             Parameters: 
3043                 theR Sphere radius.
3044                 theName Object name; when specified, this parameter is used
3045                         for result publication in the study. Otherwise, if automatic
3046                         publication is switched on, default value is used for result name.
3047
3048             Returns:
3049                 New GEOM.GEOM_Object, containing the created sphere.            
3050             """
3051             # Example: see GEOM_TestAll.py
3052             theR,Parameters = ParseParameters(theR)
3053             anObj = self.PrimOp.MakeSphereR(theR)
3054             RaiseIfFailed("MakeSphereR", self.PrimOp)
3055             anObj.SetParameters(Parameters)
3056             self._autoPublish(anObj, theName, "sphere")
3057             return anObj
3058
3059         ## Create a cone with given base point, axis, height and radiuses.
3060         #  @param thePnt Central point of the first cone base.
3061         #  @param theAxis Cone axis.
3062         #  @param theR1 Radius of the first cone base.
3063         #  @param theR2 Radius of the second cone base.
3064         #    \note If both radiuses are non-zero, the cone will be truncated.
3065         #    \note If the radiuses are equal, a cylinder will be created instead.
3066         #  @param theH Cone height.
3067         #  @param theName Object name; when specified, this parameter is used
3068         #         for result publication in the study. Otherwise, if automatic
3069         #         publication is switched on, default value is used for result name.
3070         #
3071         #  @return New GEOM.GEOM_Object, containing the created cone.
3072         #
3073         #  @ref tui_creation_cone "Example"
3074         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3075             """
3076             Create a cone with given base point, axis, height and radiuses.
3077
3078             Parameters: 
3079                 thePnt Central point of the first cone base.
3080                 theAxis Cone axis.
3081                 theR1 Radius of the first cone base.
3082                 theR2 Radius of the second cone base.
3083                 theH Cone height.
3084                 theName Object name; when specified, this parameter is used
3085                         for result publication in the study. Otherwise, if automatic
3086                         publication is switched on, default value is used for result name.
3087
3088             Note:
3089                 If both radiuses are non-zero, the cone will be truncated.
3090                 If the radiuses are equal, a cylinder will be created instead.
3091
3092             Returns:
3093                 New GEOM.GEOM_Object, containing the created cone.
3094             """
3095             # Example: see GEOM_TestAll.py
3096             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3097             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3098             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3099             anObj.SetParameters(Parameters)
3100             self._autoPublish(anObj, theName, "cone")
3101             return anObj
3102
3103         ## Create a cone with given height and radiuses at
3104         #  the origin of coordinate system. Axis of the cone will
3105         #  be collinear to the OZ axis of the coordinate system.
3106         #  @param theR1 Radius of the first cone base.
3107         #  @param theR2 Radius of the second cone base.
3108         #    \note If both radiuses are non-zero, the cone will be truncated.
3109         #    \note If the radiuses are equal, a cylinder will be created instead.
3110         #  @param theH Cone height.
3111         #  @param theName Object name; when specified, this parameter is used
3112         #         for result publication in the study. Otherwise, if automatic
3113         #         publication is switched on, default value is used for result name.
3114         #
3115         #  @return New GEOM.GEOM_Object, containing the created cone.
3116         #
3117         #  @ref tui_creation_cone "Example"
3118         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3119             """
3120             Create a cone with given height and radiuses at
3121             the origin of coordinate system. Axis of the cone will
3122             be collinear to the OZ axis of the coordinate system.
3123
3124             Parameters: 
3125                 theR1 Radius of the first cone base.
3126                 theR2 Radius of the second cone base.
3127                 theH Cone height.
3128                 theName Object name; when specified, this parameter is used
3129                         for result publication in the study. Otherwise, if automatic
3130                         publication is switched on, default value is used for result name.
3131
3132             Note:
3133                 If both radiuses are non-zero, the cone will be truncated.
3134                 If the radiuses are equal, a cylinder will be created instead.
3135
3136             Returns:
3137                 New GEOM.GEOM_Object, containing the created cone.
3138             """
3139             # Example: see GEOM_TestAll.py
3140             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3141             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3142             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3143             anObj.SetParameters(Parameters)
3144             self._autoPublish(anObj, theName, "cone")
3145             return anObj
3146
3147         ## Create a torus with given center, normal vector and radiuses.
3148         #  @param thePnt Torus central point.
3149         #  @param theVec Torus axis of symmetry.
3150         #  @param theRMajor Torus major radius.
3151         #  @param theRMinor Torus minor radius.
3152         #  @param theName Object name; when specified, this parameter is used
3153         #         for result publication in the study. Otherwise, if automatic
3154         #         publication is switched on, default value is used for result name.
3155         #
3156         #  @return New GEOM.GEOM_Object, containing the created torus.
3157         #
3158         #  @ref tui_creation_torus "Example"
3159         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3160             """
3161             Create a torus with given center, normal vector and radiuses.
3162
3163             Parameters: 
3164                 thePnt Torus central point.
3165                 theVec Torus axis of symmetry.
3166                 theRMajor Torus major radius.
3167                 theRMinor Torus minor radius.
3168                 theName Object name; when specified, this parameter is used
3169                         for result publication in the study. Otherwise, if automatic
3170                         publication is switched on, default value is used for result name.
3171
3172            Returns:
3173                 New GEOM.GEOM_Object, containing the created torus.
3174             """
3175             # Example: see GEOM_TestAll.py
3176             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3177             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3178             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3179             anObj.SetParameters(Parameters)
3180             self._autoPublish(anObj, theName, "torus")
3181             return anObj
3182
3183         ## Create a torus with given radiuses at the origin of coordinate system.
3184         #  @param theRMajor Torus major radius.
3185         #  @param theRMinor Torus minor radius.
3186         #  @param theName Object name; when specified, this parameter is used
3187         #         for result publication in the study. Otherwise, if automatic
3188         #         publication is switched on, default value is used for result name.
3189         #
3190         #  @return New GEOM.GEOM_Object, containing the created torus.
3191         #
3192         #  @ref tui_creation_torus "Example"
3193         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3194             """
3195            Create a torus with given radiuses at the origin of coordinate system.
3196
3197            Parameters: 
3198                 theRMajor Torus major radius.
3199                 theRMinor Torus minor radius.
3200                 theName Object name; when specified, this parameter is used
3201                         for result publication in the study. Otherwise, if automatic
3202                         publication is switched on, default value is used for result name.
3203
3204            Returns:
3205                 New GEOM.GEOM_Object, containing the created torus.            
3206             """
3207             # Example: see GEOM_TestAll.py
3208             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3209             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3210             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3211             anObj.SetParameters(Parameters)
3212             self._autoPublish(anObj, theName, "torus")
3213             return anObj
3214
3215         # end of l3_3d_primitives
3216         ## @}
3217
3218         ## @addtogroup l3_complex
3219         ## @{
3220
3221         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3222         #  @param theBase Base shape to be extruded.
3223         #  @param thePoint1 First end of extrusion vector.
3224         #  @param thePoint2 Second end of extrusion vector.
3225         #  @param theScaleFactor Use it to make prism with scaled second base.
3226         #                        Nagative value means not scaled second base.
3227         #  @param theName Object name; when specified, this parameter is used
3228         #         for result publication in the study. Otherwise, if automatic
3229         #         publication is switched on, default value is used for result name.
3230         #
3231         #  @return New GEOM.GEOM_Object, containing the created prism.
3232         #
3233         #  @ref tui_creation_prism "Example"
3234         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3235             """
3236             Create a shape by extrusion of the base shape along a vector, defined by two points.
3237
3238             Parameters: 
3239                 theBase Base shape to be extruded.
3240                 thePoint1 First end of extrusion vector.
3241                 thePoint2 Second end of extrusion vector.
3242                 theScaleFactor Use it to make prism with scaled second base.
3243                                Nagative value means not scaled second base.
3244                 theName Object name; when specified, this parameter is used
3245                         for result publication in the study. Otherwise, if automatic
3246                         publication is switched on, default value is used for result name.
3247
3248             Returns:
3249                 New GEOM.GEOM_Object, containing the created prism.
3250             """
3251             # Example: see GEOM_TestAll.py
3252             anObj = None
3253             Parameters = ""
3254             if theScaleFactor > 0:
3255                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3256                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3257             else:
3258                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3259             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3260             anObj.SetParameters(Parameters)
3261             self._autoPublish(anObj, theName, "prism")
3262             return anObj
3263
3264         ## Create a shape by extrusion of the base shape along a
3265         #  vector, defined by two points, in 2 Ways (forward/backward).
3266         #  @param theBase Base shape to be extruded.
3267         #  @param thePoint1 First end of extrusion vector.
3268         #  @param thePoint2 Second end of extrusion vector.
3269         #  @param theName Object name; when specified, this parameter is used
3270         #         for result publication in the study. Otherwise, if automatic
3271         #         publication is switched on, default value is used for result name.
3272         #
3273         #  @return New GEOM.GEOM_Object, containing the created prism.
3274         #
3275         #  @ref tui_creation_prism "Example"
3276         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3277             """
3278             Create a shape by extrusion of the base shape along a
3279             vector, defined by two points, in 2 Ways (forward/backward).
3280
3281             Parameters: 
3282                 theBase Base shape to be extruded.
3283                 thePoint1 First end of extrusion vector.
3284                 thePoint2 Second end of extrusion vector.
3285                 theName Object name; when specified, this parameter is used
3286                         for result publication in the study. Otherwise, if automatic
3287                         publication is switched on, default value is used for result name.
3288
3289             Returns:
3290                 New GEOM.GEOM_Object, containing the created prism.
3291             """
3292             # Example: see GEOM_TestAll.py
3293             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3294             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3295             self._autoPublish(anObj, theName, "prism")
3296             return anObj
3297
3298         ## Create a shape by extrusion of the base shape along the vector,
3299         #  i.e. all the space, transfixed by the base shape during its translation
3300         #  along the vector on the given distance.
3301         #  @param theBase Base shape to be extruded.
3302         #  @param theVec Direction of extrusion.
3303         #  @param theH Prism dimension along theVec.
3304         #  @param theScaleFactor Use it to make prism with scaled second base.
3305         #                        Negative value means not scaled second base.
3306         #  @param theName Object name; when specified, this parameter is used
3307         #         for result publication in the study. Otherwise, if automatic
3308         #         publication is switched on, default value is used for result name.
3309         #
3310         #  @return New GEOM.GEOM_Object, containing the created prism.
3311         #
3312         #  @ref tui_creation_prism "Example"
3313         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3314             """
3315             Create a shape by extrusion of the base shape along the vector,
3316             i.e. all the space, transfixed by the base shape during its translation
3317             along the vector on the given distance.
3318
3319             Parameters: 
3320                 theBase Base shape to be extruded.
3321                 theVec Direction of extrusion.
3322                 theH Prism dimension along theVec.
3323                 theScaleFactor Use it to make prism with scaled second base.
3324                                Negative value means not scaled second base.
3325                 theName Object name; when specified, this parameter is used
3326                         for result publication in the study. Otherwise, if automatic
3327                         publication is switched on, default value is used for result name.
3328
3329             Returns:
3330                 New GEOM.GEOM_Object, containing the created prism.
3331             """
3332             # Example: see GEOM_TestAll.py
3333             anObj = None
3334             Parameters = ""
3335             if theScaleFactor > 0:
3336                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3337                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3338             else:
3339                 theH,Parameters = ParseParameters(theH)
3340                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3341             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3342             anObj.SetParameters(Parameters)
3343             self._autoPublish(anObj, theName, "prism")
3344             return anObj
3345
3346         ## Create a shape by extrusion of the base shape along the vector,
3347         #  i.e. all the space, transfixed by the base shape during its translation
3348         #  along the vector on the given distance in 2 Ways (forward/backward).
3349         #  @param theBase Base shape to be extruded.
3350         #  @param theVec Direction of extrusion.
3351         #  @param theH Prism dimension along theVec in forward direction.
3352         #  @param theName Object name; when specified, this parameter is used
3353         #         for result publication in the study. Otherwise, if automatic
3354         #         publication is switched on, default value is used for result name.
3355         #
3356         #  @return New GEOM.GEOM_Object, containing the created prism.
3357         #
3358         #  @ref tui_creation_prism "Example"
3359         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3360             """
3361             Create a shape by extrusion of the base shape along the vector,
3362             i.e. all the space, transfixed by the base shape during its translation
3363             along the vector on the given distance in 2 Ways (forward/backward).
3364
3365             Parameters:
3366                 theBase Base shape to be extruded.
3367                 theVec Direction of extrusion.
3368                 theH Prism dimension along theVec in forward direction.
3369                 theName Object name; when specified, this parameter is used
3370                         for result publication in the study. Otherwise, if automatic
3371                         publication is switched on, default value is used for result name.
3372
3373             Returns:
3374                 New GEOM.GEOM_Object, containing the created prism.
3375             """
3376             # Example: see GEOM_TestAll.py
3377             theH,Parameters = ParseParameters(theH)
3378             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3379             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3380             anObj.SetParameters(Parameters)
3381             self._autoPublish(anObj, theName, "prism")
3382             return anObj
3383
3384         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3385         #  @param theBase Base shape to be extruded.
3386         #  @param theDX, theDY, theDZ Directions of extrusion.
3387         #  @param theScaleFactor Use it to make prism with scaled second base.
3388         #                        Nagative value means not scaled second base.
3389         #  @param theName Object name; when specified, this parameter is used
3390         #         for result publication in the study. Otherwise, if automatic
3391         #         publication is switched on, default value is used for result name.
3392         #
3393         #  @return New GEOM.GEOM_Object, containing the created prism.
3394         #
3395         #  @ref tui_creation_prism "Example"
3396         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3397             """
3398             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3399
3400             Parameters:
3401                 theBase Base shape to be extruded.
3402                 theDX, theDY, theDZ Directions of extrusion.
3403                 theScaleFactor Use it to make prism with scaled second base.
3404                                Nagative value means not scaled second base.
3405                 theName Object name; when specified, this parameter is used
3406                         for result publication in the study. Otherwise, if automatic
3407                         publication is switched on, default value is used for result name.
3408
3409             Returns: 
3410                 New GEOM.GEOM_Object, containing the created prism.
3411             """
3412             # Example: see GEOM_TestAll.py
3413             anObj = None
3414             Parameters = ""
3415             if theScaleFactor > 0:
3416                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3417                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3418             else:
3419                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3420                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3421             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3422             anObj.SetParameters(Parameters)
3423             self._autoPublish(anObj, theName, "prism")
3424             return anObj
3425
3426         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3427         #  i.e. all the space, transfixed by the base shape during its translation
3428         #  along the vector on the given distance in 2 Ways (forward/backward).
3429         #  @param theBase Base shape to be extruded.
3430         #  @param theDX, theDY, theDZ Directions of extrusion.
3431         #  @param theName Object name; when specified, this parameter is used
3432         #         for result publication in the study. Otherwise, if automatic
3433         #         publication is switched on, default value is used for result name.
3434         #
3435         #  @return New GEOM.GEOM_Object, containing the created prism.
3436         #
3437         #  @ref tui_creation_prism "Example"
3438         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3439             """
3440             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3441             i.e. all the space, transfixed by the base shape during its translation
3442             along the vector on the given distance in 2 Ways (forward/backward).
3443
3444             Parameters:
3445                 theBase Base shape to be extruded.
3446                 theDX, theDY, theDZ Directions of extrusion.
3447                 theName Object name; when specified, this parameter is used
3448                         for result publication in the study. Otherwise, if automatic
3449                         publication is switched on, default value is used for result name.
3450
3451             Returns:
3452                 New GEOM.GEOM_Object, containing the created prism.
3453             """
3454             # Example: see GEOM_TestAll.py
3455             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3456             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3457             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3458             anObj.SetParameters(Parameters)
3459             self._autoPublish(anObj, theName, "prism")
3460             return anObj
3461
3462         ## Create a shape by revolution of the base shape around the axis
3463         #  on the given angle, i.e. all the space, transfixed by the base
3464         #  shape during its rotation around the axis on the given angle.
3465         #  @param theBase Base shape to be rotated.
3466         #  @param theAxis Rotation axis.
3467         #  @param theAngle Rotation angle in radians.
3468         #  @param theName Object name; when specified, this parameter is used
3469         #         for result publication in the study. Otherwise, if automatic
3470         #         publication is switched on, default value is used for result name.
3471         #
3472         #  @return New GEOM.GEOM_Object, containing the created revolution.
3473         #
3474         #  @ref tui_creation_revolution "Example"
3475         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3476             """
3477             Create a shape by revolution of the base shape around the axis
3478             on the given angle, i.e. all the space, transfixed by the base
3479             shape during its rotation around the axis on the given angle.
3480
3481             Parameters:
3482                 theBase Base shape to be rotated.
3483                 theAxis Rotation axis.
3484                 theAngle Rotation angle in radians.
3485                 theName Object name; when specified, this parameter is used
3486                         for result publication in the study. Otherwise, if automatic
3487                         publication is switched on, default value is used for result name.
3488
3489             Returns: 
3490                 New GEOM.GEOM_Object, containing the created revolution.
3491             """
3492             # Example: see GEOM_TestAll.py
3493             theAngle,Parameters = ParseParameters(theAngle)
3494             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3495             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3496             anObj.SetParameters(Parameters)
3497             self._autoPublish(anObj, theName, "revolution")
3498             return anObj
3499
3500         ## Create a shape by revolution of the base shape around the axis
3501         #  on the given angle, i.e. all the space, transfixed by the base
3502         #  shape during its rotation around the axis on the given angle in
3503         #  both directions (forward/backward)
3504         #  @param theBase Base shape to be rotated.
3505         #  @param theAxis Rotation axis.
3506         #  @param theAngle Rotation angle in radians.
3507         #  @param theName Object name; when specified, this parameter is used
3508         #         for result publication in the study. Otherwise, if automatic
3509         #         publication is switched on, default value is used for result name.
3510         #
3511         #  @return New GEOM.GEOM_Object, containing the created revolution.
3512         #
3513         #  @ref tui_creation_revolution "Example"
3514         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3515             """
3516             Create a shape by revolution of the base shape around the axis
3517             on the given angle, i.e. all the space, transfixed by the base
3518             shape during its rotation around the axis on the given angle in
3519             both directions (forward/backward).
3520
3521             Parameters:
3522                 theBase Base shape to be rotated.
3523                 theAxis Rotation axis.
3524                 theAngle Rotation angle in radians.
3525                 theName Object name; when specified, this parameter is used
3526                         for result publication in the study. Otherwise, if automatic
3527                         publication is switched on, default value is used for result name.
3528
3529             Returns: 
3530                 New GEOM.GEOM_Object, containing the created revolution.
3531             """
3532             theAngle,Parameters = ParseParameters(theAngle)
3533             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3534             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3535             anObj.SetParameters(Parameters)
3536             self._autoPublish(anObj, theName, "revolution")
3537             return anObj
3538
3539         ## Create a filling from the given compound of contours.
3540         #  @param theShape the compound of contours
3541         #  @param theMinDeg a minimal degree of BSpline surface to create
3542         #  @param theMaxDeg a maximal degree of BSpline surface to create
3543         #  @param theTol2D a 2d tolerance to be reached
3544         #  @param theTol3D a 3d tolerance to be reached
3545         #  @param theNbIter a number of iteration of approximation algorithm
3546         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3547         #  @param isApprox if True, BSpline curves are generated in the process
3548         #                  of surface construction. By default it is False, that means
3549         #                  the surface is created using given curves. The usage of
3550         #                  Approximation makes the algorithm work slower, but allows
3551         #                  building the surface for rather complex cases.
3552         #  @param theName Object name; when specified, this parameter is used
3553         #         for result publication in the study. Otherwise, if automatic
3554         #         publication is switched on, default value is used for result name.
3555         #
3556         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3557         #
3558         #  @ref tui_creation_filling "Example"
3559         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3560                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3561             """
3562             Create a filling from the given compound of contours.
3563
3564             Parameters:
3565                 theShape the compound of contours
3566                 theMinDeg a minimal degree of BSpline surface to create
3567                 theMaxDeg a maximal degree of BSpline surface to create
3568                 theTol2D a 2d tolerance to be reached
3569                 theTol3D a 3d tolerance to be reached
3570                 theNbIter a number of iteration of approximation algorithm
3571                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3572                 isApprox if True, BSpline curves are generated in the process
3573                          of surface construction. By default it is False, that means
3574                          the surface is created using given curves. The usage of
3575                          Approximation makes the algorithm work slower, but allows
3576                          building the surface for rather complex cases
3577                 theName Object name; when specified, this parameter is used
3578                         for result publication in the study. Otherwise, if automatic
3579                         publication is switched on, default value is used for result name.
3580
3581             Returns: 
3582                 New GEOM.GEOM_Object, containing the created filling surface.
3583
3584             Example of usage:
3585                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3586             """
3587             # Example: see GEOM_TestAll.py
3588             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3589             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3590                                             theTol2D, theTol3D, theNbIter,
3591                                             theMethod, isApprox)
3592             RaiseIfFailed("MakeFilling", self.PrimOp)
3593             anObj.SetParameters(Parameters)
3594             self._autoPublish(anObj, theName, "filling")
3595             return anObj
3596
3597
3598         ## Create a filling from the given compound of contours.
3599         #  This method corresponds to MakeFilling with isApprox=True
3600         #  @param theShape the compound of contours
3601         #  @param theMinDeg a minimal degree of BSpline surface to create
3602         #  @param theMaxDeg a maximal degree of BSpline surface to create
3603         #  @param theTol3D a 3d tolerance to be reached
3604         #  @param theName Object name; when specified, this parameter is used
3605         #         for result publication in the study. Otherwise, if automatic
3606         #         publication is switched on, default value is used for result name.
3607         #
3608         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3609         #
3610         #  @ref tui_creation_filling "Example"
3611         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3612             """
3613             Create a filling from the given compound of contours.
3614             This method corresponds to MakeFilling with isApprox=True
3615
3616             Parameters:
3617                 theShape the compound of contours
3618                 theMinDeg a minimal degree of BSpline surface to create
3619                 theMaxDeg a maximal degree of BSpline surface to create
3620                 theTol3D a 3d tolerance to be reached
3621                 theName Object name; when specified, this parameter is used
3622                         for result publication in the study. Otherwise, if automatic
3623                         publication is switched on, default value is used for result name.
3624
3625             Returns: 
3626                 New GEOM.GEOM_Object, containing the created filling surface.
3627
3628             Example of usage:
3629                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3630             """
3631             # Example: see GEOM_TestAll.py
3632             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3633             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3634                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3635             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3636             anObj.SetParameters(Parameters)
3637             self._autoPublish(anObj, theName, "filling")
3638             return anObj
3639
3640         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3641         #  @param theSeqSections - set of specified sections.
3642         #  @param theModeSolid - mode defining building solid or shell
3643         #  @param thePreci - precision 3D used for smoothing
3644         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3645         #  @param theName Object name; when specified, this parameter is used
3646         #         for result publication in the study. Otherwise, if automatic
3647         #         publication is switched on, default value is used for result name.
3648         #
3649         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3650         #
3651         #  @ref swig_todo "Example"
3652         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3653             """
3654             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3655
3656             Parameters:
3657                 theSeqSections - set of specified sections.
3658                 theModeSolid - mode defining building solid or shell
3659                 thePreci - precision 3D used for smoothing
3660                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3661                 theName Object name; when specified, this parameter is used
3662                         for result publication in the study. Otherwise, if automatic
3663                         publication is switched on, default value is used for result name.
3664
3665             Returns:
3666                 New GEOM.GEOM_Object, containing the created shell or solid.
3667             """
3668             # Example: see GEOM_TestAll.py
3669             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3670             RaiseIfFailed("MakeThruSections", self.PrimOp)
3671             self._autoPublish(anObj, theName, "filling")
3672             return anObj
3673
3674         ## Create a shape by extrusion of the base shape along
3675         #  the path shape. The path shape can be a wire or an edge.
3676         #  @param theBase Base shape to be extruded.
3677         #  @param thePath Path shape to extrude the base shape along it.
3678         #  @param theName Object name; when specified, this parameter is used
3679         #         for result publication in the study. Otherwise, if automatic
3680         #         publication is switched on, default value is used for result name.
3681         #
3682         #  @return New GEOM.GEOM_Object, containing the created pipe.
3683         #
3684         #  @ref tui_creation_pipe "Example"
3685         def MakePipe(self, theBase, thePath, theName=None):
3686             """
3687             Create a shape by extrusion of the base shape along
3688             the path shape. The path shape can be a wire or an edge.
3689
3690             Parameters:
3691                 theBase Base shape to be extruded.
3692                 thePath Path shape to extrude the base shape along it.
3693                 theName Object name; when specified, this parameter is used
3694                         for result publication in the study. Otherwise, if automatic
3695                         publication is switched on, default value is used for result name.
3696
3697             Returns:
3698                 New GEOM.GEOM_Object, containing the created pipe.
3699             """
3700             # Example: see GEOM_TestAll.py
3701             anObj = self.PrimOp.MakePipe(theBase, thePath)
3702             RaiseIfFailed("MakePipe", self.PrimOp)
3703             self._autoPublish(anObj, theName, "pipe")
3704             return anObj
3705
3706         ## Create a shape by extrusion of the profile shape along
3707         #  the path shape. The path shape can be a wire or an edge.
3708         #  the several profiles can be specified in the several locations of path.
3709         #  @param theSeqBases - list of  Bases shape to be extruded.
3710         #  @param theLocations - list of locations on the path corresponding
3711         #                        specified list of the Bases shapes. Number of locations
3712         #                        should be equal to number of bases or list of locations can be empty.
3713         #  @param thePath - Path shape to extrude the base shape along it.
3714         #  @param theWithContact - the mode defining that the section is translated to be in
3715         #                          contact with the spine.
3716         #  @param theWithCorrection - defining that the section is rotated to be
3717         #                             orthogonal to the spine tangent in the correspondent point
3718         #  @param theName Object name; when specified, this parameter is used
3719         #         for result publication in the study. Otherwise, if automatic
3720         #         publication is switched on, default value is used for result name.
3721         #
3722         #  @return New GEOM.GEOM_Object, containing the created pipe.
3723         #
3724         #  @ref tui_creation_pipe_with_diff_sec "Example"
3725         def MakePipeWithDifferentSections(self, theSeqBases,
3726                                           theLocations, thePath,
3727                                           theWithContact, theWithCorrection, theName=None):
3728             """
3729             Create a shape by extrusion of the profile shape along
3730             the path shape. The path shape can be a wire or an edge.
3731             the several profiles can be specified in the several locations of path.
3732
3733             Parameters:
3734                 theSeqBases - list of  Bases shape to be extruded.
3735                 theLocations - list of locations on the path corresponding
3736                                specified list of the Bases shapes. Number of locations
3737                                should be equal to number of bases or list of locations can be empty.
3738                 thePath - Path shape to extrude the base shape along it.
3739                 theWithContact - the mode defining that the section is translated to be in
3740                                  contact with the spine(0/1)
3741                 theWithCorrection - defining that the section is rotated to be
3742                                     orthogonal to the spine tangent in the correspondent point (0/1)
3743                 theName Object name; when specified, this parameter is used
3744                         for result publication in the study. Otherwise, if automatic
3745                         publication is switched on, default value is used for result name.
3746
3747             Returns:
3748                 New GEOM.GEOM_Object, containing the created pipe.
3749             """
3750             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3751                                                               theLocations, thePath,
3752                                                               theWithContact, theWithCorrection)
3753             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3754             self._autoPublish(anObj, theName, "pipe")
3755             return anObj
3756
3757         ## Create a shape by extrusion of the profile shape along
3758         #  the path shape. The path shape can be a wire or a edge.
3759         #  the several profiles can be specified in the several locations of path.
3760         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3761         #                       shell or face. If number of faces in neighbour sections
3762         #                       aren't coincided result solid between such sections will
3763         #                       be created using external boundaries of this shells.
3764         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3765         #                          This list is used for searching correspondences between
3766         #                          faces in the sections. Size of this list must be equal
3767         #                          to size of list of base shapes.
3768         #  @param theLocations - list of locations on the path corresponding
3769         #                        specified list of the Bases shapes. Number of locations
3770         #                        should be equal to number of bases. First and last
3771         #                        locations must be coincided with first and last vertexes
3772         #                        of path correspondingly.
3773         #  @param thePath - Path shape to extrude the base shape along it.
3774         #  @param theWithContact - the mode defining that the section is translated to be in
3775         #                          contact with the spine.
3776         #  @param theWithCorrection - defining that the section is rotated to be
3777         #                             orthogonal to the spine tangent in the correspondent point
3778         #  @param theName Object name; when specified, this parameter is used
3779         #         for result publication in the study. Otherwise, if automatic
3780         #         publication is switched on, default value is used for result name.
3781         #
3782         #  @return New GEOM.GEOM_Object, containing the created solids.
3783         #
3784         #  @ref tui_creation_pipe_with_shell_sec "Example"
3785         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3786                                       theLocations, thePath,
3787                                       theWithContact, theWithCorrection, theName=None):
3788             """
3789             Create a shape by extrusion of the profile shape along
3790             the path shape. The path shape can be a wire or a edge.
3791             the several profiles can be specified in the several locations of path.
3792
3793             Parameters:
3794                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3795                               shell or face. If number of faces in neighbour sections
3796                               aren't coincided result solid between such sections will
3797                               be created using external boundaries of this shells.
3798                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3799                                  This list is used for searching correspondences between
3800                                  faces in the sections. Size of this list must be equal
3801                                  to size of list of base shapes.
3802                 theLocations - list of locations on the path corresponding
3803                                specified list of the Bases shapes. Number of locations
3804                                should be equal to number of bases. First and last
3805                                locations must be coincided with first and last vertexes
3806                                of path correspondingly.
3807                 thePath - Path shape to extrude the base shape along it.
3808                 theWithContact - the mode defining that the section is translated to be in
3809                                  contact with the spine (0/1)
3810                 theWithCorrection - defining that the section is rotated to be
3811                                     orthogonal to the spine tangent in the correspondent point (0/1)
3812                 theName Object name; when specified, this parameter is used
3813                         for result publication in the study. Otherwise, if automatic
3814                         publication is switched on, default value is used for result name.
3815
3816             Returns:                           
3817                 New GEOM.GEOM_Object, containing the created solids.
3818             """
3819             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
3820                                                           theLocations, thePath,
3821                                                           theWithContact, theWithCorrection)
3822             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3823             self._autoPublish(anObj, theName, "pipe")
3824             return anObj
3825
3826         ## Create a shape by extrusion of the profile shape along
3827         #  the path shape. This function is used only for debug pipe
3828         #  functionality - it is a version of function MakePipeWithShellSections()
3829         #  which give a possibility to recieve information about
3830         #  creating pipe between each pair of sections step by step.
3831         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
3832                                              theLocations, thePath,
3833                                              theWithContact, theWithCorrection, theName=None):
3834             """
3835             Create a shape by extrusion of the profile shape along
3836             the path shape. This function is used only for debug pipe
3837             functionality - it is a version of previous function
3838             geompy.MakePipeWithShellSections() which give a possibility to
3839             recieve information about creating pipe between each pair of
3840             sections step by step.
3841             """
3842             res = []
3843             nbsect = len(theSeqBases)
3844             nbsubsect = len(theSeqSubBases)
3845             #print "nbsect = ",nbsect
3846             for i in range(1,nbsect):
3847                 #print "  i = ",i
3848                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
3849                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
3850                 tmpSeqSubBases = []
3851                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
3852                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
3853                                                               tmpLocations, thePath,
3854                                                               theWithContact, theWithCorrection)
3855                 if self.PrimOp.IsDone() == 0:
3856                     print "Problems with pipe creation between ",i," and ",i+1," sections"
3857                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3858                     break
3859                 else:
3860                     print "Pipe between ",i," and ",i+1," sections is OK"
3861                     res.append(anObj)
3862                     pass
3863                 pass
3864
3865             resc = self.MakeCompound(res)
3866             #resc = self.MakeSewing(res, 0.001)
3867             #print "resc: ",resc
3868             self._autoPublish(resc, theName, "pipe")
3869             return resc
3870
3871         ## Create solids between given sections
3872         #  @param theSeqBases - list of sections (shell or face).
3873         #  @param theLocations - list of corresponding vertexes
3874         #  @param theName Object name; when specified, this parameter is used
3875         #         for result publication in the study. Otherwise, if automatic
3876         #         publication is switched on, default value is used for result name.
3877         #
3878         #  @return New GEOM.GEOM_Object, containing the created solids.
3879         #
3880         #  @ref tui_creation_pipe_without_path "Example"
3881         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
3882             """
3883             Create solids between given sections
3884
3885             Parameters:
3886                 theSeqBases - list of sections (shell or face).
3887                 theLocations - list of corresponding vertexes
3888                 theName Object name; when specified, this parameter is used
3889                         for result publication in the study. Otherwise, if automatic
3890                         publication is switched on, default value is used for result name.
3891
3892             Returns:
3893                 New GEOM.GEOM_Object, containing the created solids.
3894             """
3895             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
3896             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
3897             self._autoPublish(anObj, theName, "pipe")
3898             return anObj
3899
3900         ## Create a shape by extrusion of the base shape along
3901         #  the path shape with constant bi-normal direction along the given vector.
3902         #  The path shape can be a wire or an edge.
3903         #  @param theBase Base shape to be extruded.
3904         #  @param thePath Path shape to extrude the base shape along it.
3905         #  @param theVec Vector defines a constant binormal direction to keep the
3906         #                same angle beetween the direction and the sections
3907         #                along the sweep surface.
3908         #  @param theName Object name; when specified, this parameter is used
3909         #         for result publication in the study. Otherwise, if automatic
3910         #         publication is switched on, default value is used for result name.
3911         #
3912         #  @return New GEOM.GEOM_Object, containing the created pipe.
3913         #
3914         #  @ref tui_creation_pipe "Example"
3915         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
3916             """
3917             Create a shape by extrusion of the base shape along
3918             the path shape with constant bi-normal direction along the given vector.
3919             The path shape can be a wire or an edge.
3920
3921             Parameters:
3922                 theBase Base shape to be extruded.
3923                 thePath Path shape to extrude the base shape along it.
3924                 theVec Vector defines a constant binormal direction to keep the
3925                        same angle beetween the direction and the sections
3926                        along the sweep surface.
3927                 theName Object name; when specified, this parameter is used
3928                         for result publication in the study. Otherwise, if automatic
3929                         publication is switched on, default value is used for result name.
3930
3931             Returns:              
3932                 New GEOM.GEOM_Object, containing the created pipe.
3933             """
3934             # Example: see GEOM_TestAll.py
3935             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
3936             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
3937             self._autoPublish(anObj, theName, "pipe")
3938             return anObj
3939               
3940         ## Makes a thick solid from a face or a shell
3941         #  @param theShape Face or Shell to be thicken
3942         #  @param theThickness Thickness of the resulting solid
3943         #  @param theName Object name; when specified, this parameter is used
3944         #         for result publication in the study. Otherwise, if automatic
3945         #         publication is switched on, default value is used for result name.
3946         #
3947         #  @return New GEOM.GEOM_Object, containing the created solid
3948         #
3949         def MakeThickSolid(self, theShape, theThickness, theName=None):
3950             """
3951             Make a thick solid from a face or a shell
3952
3953             Parameters:
3954                  theShape Face or Shell to be thicken
3955                  theThickness Thickness of the resulting solid
3956                  theName Object name; when specified, this parameter is used
3957                  for result publication in the study. Otherwise, if automatic
3958                  publication is switched on, default value is used for result name.
3959                  
3960             Returns:
3961                 New GEOM.GEOM_Object, containing the created solid
3962             """
3963             # Example: see GEOM_TestAll.py
3964             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
3965             RaiseIfFailed("MakeThickening", self.PrimOp)
3966             self._autoPublish(anObj, theName, "pipe")
3967             return anObj
3968             
3969
3970         ## Modifies a face or a shell to make it a thick solid
3971         #  @param theShape Face or Shell to be thicken
3972         #  @param theThickness Thickness of the resulting solid
3973         #
3974         #  @return The modified shape
3975         #
3976         def Thicken(self, theShape, theThickness):
3977             """
3978             Modifies a face or a shell to make it a thick solid
3979
3980             Parameters:
3981                 theBase Base shape to be extruded.
3982                 thePath Path shape to extrude the base shape along it.
3983                 theName Object name; when specified, this parameter is used
3984                         for result publication in the study. Otherwise, if automatic
3985                         publication is switched on, default value is used for result name.
3986
3987             Returns:
3988                 The modified shape
3989             """
3990             # Example: see GEOM_TestAll.py
3991             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
3992             RaiseIfFailed("MakeThickening", self.PrimOp)
3993             return anObj
3994
3995         ## Build a middle path of a pipe-like shape.
3996         #  The path shape can be a wire or an edge.
3997         #  @param theShape It can be closed or unclosed pipe-like shell
3998         #                  or a pipe-like solid.
3999         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4000         #                            should be wires or faces of theShape.
4001         #  @param theName Object name; when specified, this parameter is used
4002         #         for result publication in the study. Otherwise, if automatic
4003         #         publication is switched on, default value is used for result name.
4004         #
4005         #  @note It is not assumed that exact or approximate copy of theShape
4006         #        can be obtained by applying existing Pipe operation on the
4007         #        resulting "Path" wire taking theBase1 as the base - it is not
4008         #        always possible; though in some particular cases it might work
4009         #        it is not guaranteed. Thus, RestorePath function should not be
4010         #        considered as an exact reverse operation of the Pipe.
4011         #
4012         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4013         #                                source pipe's "path".
4014         #
4015         #  @ref tui_creation_pipe_path "Example"
4016         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4017             """
4018             Build a middle path of a pipe-like shape.
4019             The path shape can be a wire or an edge.
4020
4021             Parameters:
4022                 theShape It can be closed or unclosed pipe-like shell
4023                          or a pipe-like solid.
4024                 theBase1, theBase2 Two bases of the supposed pipe. This
4025                                    should be wires or faces of theShape.
4026                 theName Object name; when specified, this parameter is used
4027                         for result publication in the study. Otherwise, if automatic
4028                         publication is switched on, default value is used for result name.
4029
4030             Returns:
4031                 New GEOM_Object, containing an edge or wire that represent
4032                                  source pipe's path.
4033             """
4034             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4035             RaiseIfFailed("RestorePath", self.PrimOp)
4036             self._autoPublish(anObj, theName, "path")
4037             return anObj
4038
4039         ## Build a middle path of a pipe-like shape.
4040         #  The path shape can be a wire or an edge.
4041         #  @param theShape It can be closed or unclosed pipe-like shell
4042         #                  or a pipe-like solid.
4043         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4044         #                                should be lists of edges of theShape.
4045         #  @param theName Object name; when specified, this parameter is used
4046         #         for result publication in the study. Otherwise, if automatic
4047         #         publication is switched on, default value is used for result name.
4048         #
4049         #  @note It is not assumed that exact or approximate copy of theShape
4050         #        can be obtained by applying existing Pipe operation on the
4051         #        resulting "Path" wire taking theBase1 as the base - it is not
4052         #        always possible; though in some particular cases it might work
4053         #        it is not guaranteed. Thus, RestorePath function should not be
4054         #        considered as an exact reverse operation of the Pipe.
4055         #
4056         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4057         #                                source pipe's "path".
4058         #
4059         #  @ref tui_creation_pipe_path "Example"
4060         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4061             """
4062             Build a middle path of a pipe-like shape.
4063             The path shape can be a wire or an edge.
4064
4065             Parameters:
4066                 theShape It can be closed or unclosed pipe-like shell
4067                          or a pipe-like solid.
4068                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4069                                        should be lists of edges of theShape.
4070                 theName Object name; when specified, this parameter is used
4071                         for result publication in the study. Otherwise, if automatic
4072                         publication is switched on, default value is used for result name.
4073
4074             Returns:
4075                 New GEOM_Object, containing an edge or wire that represent
4076                                  source pipe's path.
4077             """
4078             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4079             RaiseIfFailed("RestorePath", self.PrimOp)
4080             self._autoPublish(anObj, theName, "path")
4081             return anObj
4082
4083         # end of l3_complex
4084         ## @}
4085
4086         ## @addtogroup l3_advanced
4087         ## @{
4088
4089         ## Create a linear edge with specified ends.
4090         #  @param thePnt1 Point for the first end of edge.
4091         #  @param thePnt2 Point for the second end of edge.
4092         #  @param theName Object name; when specified, this parameter is used
4093         #         for result publication in the study. Otherwise, if automatic
4094         #         publication is switched on, default value is used for result name.
4095         #
4096         #  @return New GEOM.GEOM_Object, containing the created edge.
4097         #
4098         #  @ref tui_creation_edge "Example"
4099         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4100             """
4101             Create a linear edge with specified ends.
4102
4103             Parameters:
4104                 thePnt1 Point for the first end of edge.
4105                 thePnt2 Point for the second end of edge.
4106                 theName Object name; when specified, this parameter is used
4107                         for result publication in the study. Otherwise, if automatic
4108                         publication is switched on, default value is used for result name.
4109
4110             Returns:           
4111                 New GEOM.GEOM_Object, containing the created edge.
4112             """
4113             # Example: see GEOM_TestAll.py
4114             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4115             RaiseIfFailed("MakeEdge", self.ShapesOp)
4116             self._autoPublish(anObj, theName, "edge")
4117             return anObj
4118
4119         ## Create a new edge, corresponding to the given length on the given curve.
4120         #  @param theRefCurve The referenced curve (edge).
4121         #  @param theLength Length on the referenced curve. It can be negative.
4122         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4123         #                       at the end of \a theRefCurve, close to the selected point.
4124         #                       If None, start from the first point of \a theRefCurve.
4125         #  @param theName Object name; when specified, this parameter is used
4126         #         for result publication in the study. Otherwise, if automatic
4127         #         publication is switched on, default value is used for result name.
4128         #
4129         #  @return New GEOM.GEOM_Object, containing the created edge.
4130         #
4131         #  @ref tui_creation_edge "Example"
4132         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4133             """
4134             Create a new edge, corresponding to the given length on the given curve.
4135
4136             Parameters:
4137                 theRefCurve The referenced curve (edge).
4138                 theLength Length on the referenced curve. It can be negative.
4139                 theStartPoint Any point can be selected for it, the new edge will begin
4140                               at the end of theRefCurve, close to the selected point.
4141                               If None, start from the first point of theRefCurve.
4142                 theName Object name; when specified, this parameter is used
4143                         for result publication in the study. Otherwise, if automatic
4144                         publication is switched on, default value is used for result name.
4145
4146             Returns:              
4147                 New GEOM.GEOM_Object, containing the created edge.
4148             """
4149             # Example: see GEOM_TestAll.py
4150             theLength, Parameters = ParseParameters(theLength)
4151             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4152             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4153             anObj.SetParameters(Parameters)
4154             self._autoPublish(anObj, theName, "edge")
4155             return anObj
4156
4157         ## Create an edge from specified wire.
4158         #  @param theWire source Wire
4159         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4160         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4161         #  @param theName Object name; when specified, this parameter is used
4162         #         for result publication in the study. Otherwise, if automatic
4163         #         publication is switched on, default value is used for result name.
4164         #
4165         #  @return New GEOM.GEOM_Object, containing the created edge.
4166         #
4167         #  @ref tui_creation_edge "Example"
4168         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4169             """
4170             Create an edge from specified wire.
4171
4172             Parameters:
4173                 theWire source Wire
4174                 theLinearTolerance linear tolerance value (default = 1e-07)
4175                 theAngularTolerance angular tolerance value (default = 1e-12)
4176                 theName Object name; when specified, this parameter is used
4177                         for result publication in the study. Otherwise, if automatic
4178                         publication is switched on, default value is used for result name.
4179
4180             Returns:
4181                 New GEOM.GEOM_Object, containing the created edge.
4182             """
4183             # Example: see GEOM_TestAll.py
4184             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4185             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4186             self._autoPublish(anObj, theName, "edge")
4187             return anObj
4188
4189         ## Create a wire from the set of edges and wires.
4190         #  @param theEdgesAndWires List of edges and/or wires.
4191         #  @param theTolerance Maximum distance between vertices, that will be merged.
4192         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4193         #  @param theName Object name; when specified, this parameter is used
4194         #         for result publication in the study. Otherwise, if automatic
4195         #         publication is switched on, default value is used for result name.
4196         #
4197         #  @return New GEOM.GEOM_Object, containing the created wire.
4198         #
4199         #  @ref tui_creation_wire "Example"
4200         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4201             """
4202             Create a wire from the set of edges and wires.
4203
4204             Parameters:
4205                 theEdgesAndWires List of edges and/or wires.
4206                 theTolerance Maximum distance between vertices, that will be merged.
4207                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4208                 theName Object name; when specified, this parameter is used
4209                         for result publication in the study. Otherwise, if automatic
4210                         publication is switched on, default value is used for result name.
4211
4212             Returns:                    
4213                 New GEOM.GEOM_Object, containing the created wire.
4214             """
4215             # Example: see GEOM_TestAll.py
4216             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4217             RaiseIfFailed("MakeWire", self.ShapesOp)
4218             self._autoPublish(anObj, theName, "wire")
4219             return anObj
4220
4221         ## Create a face on the given wire.
4222         #  @param theWire closed Wire or Edge to build the face on.
4223         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4224         #                        If the tolerance of the obtained planar face is less
4225         #                        than 1e-06, this face will be returned, otherwise the
4226         #                        algorithm tries to build any suitable face on the given
4227         #                        wire and prints a warning message.
4228         #  @param theName Object name; when specified, this parameter is used
4229         #         for result publication in the study. Otherwise, if automatic
4230         #         publication is switched on, default value is used for result name.
4231         #
4232         #  @return New GEOM.GEOM_Object, containing the created face.
4233         #
4234         #  @ref tui_creation_face "Example"
4235         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4236             """
4237             Create a face on the given wire.
4238
4239             Parameters:
4240                 theWire closed Wire or Edge to build the face on.
4241                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4242                                If the tolerance of the obtained planar face is less
4243                                than 1e-06, this face will be returned, otherwise the
4244                                algorithm tries to build any suitable face on the given
4245                                wire and prints a warning message.
4246                 theName Object name; when specified, this parameter is used
4247                         for result publication in the study. Otherwise, if automatic
4248                         publication is switched on, default value is used for result name.
4249
4250             Returns:
4251                 New GEOM.GEOM_Object, containing the created face.
4252             """
4253             # Example: see GEOM_TestAll.py
4254             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4255             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4256                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4257             else:
4258                 RaiseIfFailed("MakeFace", self.ShapesOp)
4259             self._autoPublish(anObj, theName, "face")
4260             return anObj
4261
4262         ## Create a face on the given wires set.
4263         #  @param theWires List of closed wires or edges to build the face on.
4264         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4265         #                        If the tolerance of the obtained planar face is less
4266         #                        than 1e-06, this face will be returned, otherwise the
4267         #                        algorithm tries to build any suitable face on the given
4268         #                        wire and prints a warning message.
4269         #  @param theName Object name; when specified, this parameter is used
4270         #         for result publication in the study. Otherwise, if automatic
4271         #         publication is switched on, default value is used for result name.
4272         #
4273         #  @return New GEOM.GEOM_Object, containing the created face.
4274         #
4275         #  @ref tui_creation_face "Example"
4276         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4277             """
4278             Create a face on the given wires set.
4279
4280             Parameters:
4281                 theWires List of closed wires or edges to build the face on.
4282                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4283                                If the tolerance of the obtained planar face is less
4284                                than 1e-06, this face will be returned, otherwise the
4285                                algorithm tries to build any suitable face on the given
4286                                wire and prints a warning message.
4287                 theName Object name; when specified, this parameter is used
4288                         for result publication in the study. Otherwise, if automatic
4289                         publication is switched on, default value is used for result name.
4290
4291             Returns: 
4292                 New GEOM.GEOM_Object, containing the created face.
4293             """
4294             # Example: see GEOM_TestAll.py
4295             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4296             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4297                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4298             else:
4299                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4300             self._autoPublish(anObj, theName, "face")
4301             return anObj
4302
4303         ## See MakeFaceWires() method for details.
4304         #
4305         #  @ref tui_creation_face "Example 1"
4306         #  \n @ref swig_MakeFaces  "Example 2"
4307         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4308             """
4309             See geompy.MakeFaceWires() method for details.
4310             """
4311             # Example: see GEOM_TestOthers.py
4312             # note: auto-publishing is done in self.MakeFaceWires()
4313             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4314             return anObj
4315
4316         ## Create a shell from the set of faces and shells.
4317         #  @param theFacesAndShells List of faces and/or shells.
4318         #  @param theName Object name; when specified, this parameter is used
4319         #         for result publication in the study. Otherwise, if automatic
4320         #         publication is switched on, default value is used for result name.
4321         #
4322         #  @return New GEOM.GEOM_Object, containing the created shell.
4323         #
4324         #  @ref tui_creation_shell "Example"
4325         def MakeShell(self, theFacesAndShells, theName=None):
4326             """
4327             Create a shell from the set of faces and shells.
4328
4329             Parameters:
4330                 theFacesAndShells List of faces and/or shells.
4331                 theName Object name; when specified, this parameter is used
4332                         for result publication in the study. Otherwise, if automatic
4333                         publication is switched on, default value is used for result name.
4334
4335             Returns:
4336                 New GEOM.GEOM_Object, containing the created shell.
4337             """
4338             # Example: see GEOM_TestAll.py
4339             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4340             RaiseIfFailed("MakeShell", self.ShapesOp)
4341             self._autoPublish(anObj, theName, "shell")
4342             return anObj
4343
4344         ## Create a solid, bounded by the given shells.
4345         #  @param theShells Sequence of bounding shells.
4346         #  @param theName Object name; when specified, this parameter is used
4347         #         for result publication in the study. Otherwise, if automatic
4348         #         publication is switched on, default value is used for result name.
4349         #
4350         #  @return New GEOM.GEOM_Object, containing the created solid.
4351         #
4352         #  @ref tui_creation_solid "Example"
4353         def MakeSolid(self, theShells, theName=None):
4354             """
4355             Create a solid, bounded by the given shells.
4356
4357             Parameters:
4358                 theShells Sequence of bounding shells.
4359                 theName Object name; when specified, this parameter is used
4360                         for result publication in the study. Otherwise, if automatic
4361                         publication is switched on, default value is used for result name.
4362
4363             Returns:
4364                 New GEOM.GEOM_Object, containing the created solid.
4365             """
4366             # Example: see GEOM_TestAll.py
4367             if len(theShells) == 1:
4368                 descr = self.MeasuOp.IsGoodForSolid(theShells[0])
4369                 #if len(descr) > 0:
4370                 #    raise RuntimeError, "MakeSolidShells : " + descr
4371                 if descr == "WRN_SHAPE_UNCLOSED":
4372                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4373             anObj = self.ShapesOp.MakeSolidShells(theShells)
4374             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4375             self._autoPublish(anObj, theName, "solid")
4376             return anObj
4377
4378         ## Create a compound of the given shapes.
4379         #  @param theShapes List of shapes to put in compound.
4380         #  @param theName Object name; when specified, this parameter is used
4381         #         for result publication in the study. Otherwise, if automatic
4382         #         publication is switched on, default value is used for result name.
4383         #
4384         #  @return New GEOM.GEOM_Object, containing the created compound.
4385         #
4386         #  @ref tui_creation_compound "Example"
4387         def MakeCompound(self, theShapes, theName=None):
4388             """
4389             Create a compound of the given shapes.
4390
4391             Parameters:
4392                 theShapes List of shapes to put in compound.
4393                 theName Object name; when specified, this parameter is used
4394                         for result publication in the study. Otherwise, if automatic
4395                         publication is switched on, default value is used for result name.
4396
4397             Returns:
4398                 New GEOM.GEOM_Object, containing the created compound.
4399             """
4400             # Example: see GEOM_TestAll.py
4401             self.ShapesOp.StartOperation()
4402             anObj = self.ShapesOp.MakeCompound(theShapes)
4403             RaiseIfFailed("MakeCompound", self.ShapesOp)
4404             self._autoPublish(anObj, theName, "compound")
4405             return anObj
4406
4407         # end of l3_advanced
4408         ## @}
4409
4410         ## @addtogroup l2_measure
4411         ## @{
4412
4413         ## Gives quantity of faces in the given shape.
4414         #  @param theShape Shape to count faces of.
4415         #  @return Quantity of faces.
4416         #
4417         #  @ref swig_NumberOf "Example"
4418         def NumberOfFaces(self, theShape):
4419             """
4420             Gives quantity of faces in the given shape.
4421
4422             Parameters:
4423                 theShape Shape to count faces of.
4424
4425             Returns:    
4426                 Quantity of faces.
4427             """
4428             # Example: see GEOM_TestOthers.py
4429             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4430             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4431             return nb_faces
4432
4433         ## Gives quantity of edges in the given shape.
4434         #  @param theShape Shape to count edges of.
4435         #  @return Quantity of edges.
4436         #
4437         #  @ref swig_NumberOf "Example"
4438         def NumberOfEdges(self, theShape):
4439             """
4440             Gives quantity of edges in the given shape.
4441
4442             Parameters:
4443                 theShape Shape to count edges of.
4444
4445             Returns:    
4446                 Quantity of edges.
4447             """
4448             # Example: see GEOM_TestOthers.py
4449             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4450             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4451             return nb_edges
4452
4453         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4454         #  @param theShape Shape to count sub-shapes of.
4455         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4456         #  @return Quantity of sub-shapes of given type.
4457         #
4458         #  @ref swig_NumberOf "Example"
4459         def NumberOfSubShapes(self, theShape, theShapeType):
4460             """
4461             Gives quantity of sub-shapes of type theShapeType in the given shape.
4462
4463             Parameters:
4464                 theShape Shape to count sub-shapes of.
4465                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4466
4467             Returns:
4468                 Quantity of sub-shapes of given type.
4469             """
4470             # Example: see GEOM_TestOthers.py
4471             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4472             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4473             return nb_ss
4474
4475         ## Gives quantity of solids in the given shape.
4476         #  @param theShape Shape to count solids in.
4477         #  @return Quantity of solids.
4478         #
4479         #  @ref swig_NumberOf "Example"
4480         def NumberOfSolids(self, theShape):
4481             """
4482             Gives quantity of solids in the given shape.
4483
4484             Parameters:
4485                 theShape Shape to count solids in.
4486
4487             Returns:
4488                 Quantity of solids.
4489             """
4490             # Example: see GEOM_TestOthers.py
4491             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4492             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4493             return nb_solids
4494
4495         # end of l2_measure
4496         ## @}
4497
4498         ## @addtogroup l3_healing
4499         ## @{
4500
4501         ## Reverses an orientation the given shape.
4502         #  @param theShape Shape to be reversed.
4503         #  @param theName Object name; when specified, this parameter is used
4504         #         for result publication in the study. Otherwise, if automatic
4505         #         publication is switched on, default value is used for result name.
4506         #
4507         #  @return The reversed copy of theShape.
4508         #
4509         #  @ref swig_ChangeOrientation "Example"
4510         def ChangeOrientation(self, theShape, theName=None):
4511             """
4512             Reverses an orientation the given shape.
4513
4514             Parameters:
4515                 theShape Shape to be reversed.
4516                 theName Object name; when specified, this parameter is used
4517                         for result publication in the study. Otherwise, if automatic
4518                         publication is switched on, default value is used for result name.
4519
4520             Returns:   
4521                 The reversed copy of theShape.
4522             """
4523             # Example: see GEOM_TestAll.py
4524             anObj = self.ShapesOp.ChangeOrientation(theShape)
4525             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4526             self._autoPublish(anObj, theName, "reversed")
4527             return anObj
4528
4529         ## See ChangeOrientation() method for details.
4530         #
4531         #  @ref swig_OrientationChange "Example"
4532         def OrientationChange(self, theShape, theName=None):
4533             """
4534             See geompy.ChangeOrientation method for details.
4535             """
4536             # Example: see GEOM_TestOthers.py
4537             # note: auto-publishing is done in self.ChangeOrientation()
4538             anObj = self.ChangeOrientation(theShape, theName)
4539             return anObj
4540
4541         # end of l3_healing
4542         ## @}
4543
4544         ## @addtogroup l4_obtain
4545         ## @{
4546
4547         ## Retrieve all free faces from the given shape.
4548         #  Free face is a face, which is not shared between two shells of the shape.
4549         #  @param theShape Shape to find free faces in.
4550         #  @return List of IDs of all free faces, contained in theShape.
4551         #
4552         #  @ref tui_measurement_tools_page "Example"
4553         def GetFreeFacesIDs(self,theShape):
4554             """
4555             Retrieve all free faces from the given shape.
4556             Free face is a face, which is not shared between two shells of the shape.
4557
4558             Parameters:
4559                 theShape Shape to find free faces in.
4560
4561             Returns:
4562                 List of IDs of all free faces, contained in theShape.
4563             """
4564             # Example: see GEOM_TestOthers.py
4565             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4566             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4567             return anIDs
4568
4569         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4570         #  @param theShape1 Shape to find sub-shapes in.
4571         #  @param theShape2 Shape to find shared sub-shapes with.
4572         #  @param theShapeType Type of sub-shapes to be retrieved.
4573         #  @param theName Object name; when specified, this parameter is used
4574         #         for result publication in the study. Otherwise, if automatic
4575         #         publication is switched on, default value is used for result name.
4576         #
4577         #  @return List of sub-shapes of theShape1, shared with theShape2.
4578         #
4579         #  @ref swig_GetSharedShapes "Example"
4580         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4581             """
4582             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4583
4584             Parameters:
4585                 theShape1 Shape to find sub-shapes in.
4586                 theShape2 Shape to find shared sub-shapes with.
4587                 theShapeType Type of sub-shapes to be retrieved.
4588                 theName Object name; when specified, this parameter is used
4589                         for result publication in the study. Otherwise, if automatic
4590                         publication is switched on, default value is used for result name.
4591
4592             Returns:
4593                 List of sub-shapes of theShape1, shared with theShape2.
4594             """
4595             # Example: see GEOM_TestOthers.py
4596             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4597             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4598             self._autoPublish(aList, theName, "shared")
4599             return aList
4600
4601         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4602         #  @param theShapes Shapes to find common sub-shapes of.
4603         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4604         #  @param theName Object name; when specified, this parameter is used
4605         #         for result publication in the study. Otherwise, if automatic
4606         #         publication is switched on, default value is used for result name.
4607         #
4608         #  @return List of objects, that are sub-shapes of all given shapes.
4609         #
4610         #  @ref swig_GetSharedShapes "Example"
4611         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4612             """
4613             Get all sub-shapes, shared by all shapes in the list theShapes.
4614
4615             Parameters:
4616                 theShapes Shapes to find common sub-shapes of.
4617                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4618                 theName Object name; when specified, this parameter is used
4619                         for result publication in the study. Otherwise, if automatic
4620                         publication is switched on, default value is used for result name.
4621
4622             Returns:    
4623                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4624             """
4625             # Example: see GEOM_TestOthers.py
4626             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4627             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4628             self._autoPublish(aList, theName, "shared")
4629             return aList
4630
4631         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4632         #  situated relatively the specified plane by the certain way,
4633         #  defined through <VAR>theState</VAR> parameter.
4634         #  @param theShape Shape to find sub-shapes of.
4635         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4636         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4637         #                direction and location of the plane to find shapes on.
4638         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4639         #  @param theName Object name; when specified, this parameter is used
4640         #         for result publication in the study. Otherwise, if automatic
4641         #         publication is switched on, default value is used for result name.
4642         #
4643         #  @return List of all found sub-shapes.
4644         #
4645         #  @ref swig_GetShapesOnPlane "Example"
4646         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4647             """
4648             Find in theShape all sub-shapes of type theShapeType,
4649             situated relatively the specified plane by the certain way,
4650             defined through theState parameter.
4651
4652             Parameters:
4653                 theShape Shape to find sub-shapes of.
4654                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4655                 theAx1 Vector (or line, or linear edge), specifying normal
4656                        direction and location of the plane to find shapes on.
4657                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4658                 theName Object name; when specified, this parameter is used
4659                         for result publication in the study. Otherwise, if automatic
4660                         publication is switched on, default value is used for result name.
4661
4662             Returns:
4663                 List of all found sub-shapes.
4664             """
4665             # Example: see GEOM_TestOthers.py
4666             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4667             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4668             self._autoPublish(aList, theName, "shapeOnPlane")
4669             return aList
4670
4671         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4672         #  situated relatively the specified plane by the certain way,
4673         #  defined through <VAR>theState</VAR> parameter.
4674         #  @param theShape Shape to find sub-shapes of.
4675         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4676         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4677         #                direction and location of the plane to find shapes on.
4678         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4679         #
4680         #  @return List of all found sub-shapes indices.
4681         #
4682         #  @ref swig_GetShapesOnPlaneIDs "Example"
4683         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4684             """
4685             Find in theShape all sub-shapes of type theShapeType,
4686             situated relatively the specified plane by the certain way,
4687             defined through theState parameter.
4688
4689             Parameters:
4690                 theShape Shape to find sub-shapes of.
4691                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4692                 theAx1 Vector (or line, or linear edge), specifying normal
4693                        direction and location of the plane to find shapes on.
4694                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4695
4696             Returns:
4697                 List of all found sub-shapes indices.
4698             """
4699             # Example: see GEOM_TestOthers.py
4700             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4701             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4702             return aList
4703
4704         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4705         #  situated relatively the specified plane by the certain way,
4706         #  defined through <VAR>theState</VAR> parameter.
4707         #  @param theShape Shape to find sub-shapes of.
4708         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4709         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4710         #                direction of the plane to find shapes on.
4711         #  @param thePnt Point specifying location of the plane to find shapes on.
4712         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4713         #  @param theName Object name; when specified, this parameter is used
4714         #         for result publication in the study. Otherwise, if automatic
4715         #         publication is switched on, default value is used for result name.
4716         #
4717         #  @return List of all found sub-shapes.
4718         #
4719         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4720         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4721             """
4722             Find in theShape all sub-shapes of type theShapeType,
4723             situated relatively the specified plane by the certain way,
4724             defined through theState parameter.
4725
4726             Parameters:
4727                 theShape Shape to find sub-shapes of.
4728                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4729                 theAx1 Vector (or line, or linear edge), specifying normal
4730                        direction and location of the plane to find shapes on.
4731                 thePnt Point specifying location of the plane to find shapes on.
4732                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4733                 theName Object name; when specified, this parameter is used
4734                         for result publication in the study. Otherwise, if automatic
4735                         publication is switched on, default value is used for result name.
4736
4737             Returns:
4738                 List of all found sub-shapes.
4739             """
4740             # Example: see GEOM_TestOthers.py
4741             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4742                                                                theAx1, thePnt, theState)
4743             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4744             self._autoPublish(aList, theName, "shapeOnPlane")
4745             return aList
4746
4747         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4748         #  situated relatively the specified plane by the certain way,
4749         #  defined through <VAR>theState</VAR> parameter.
4750         #  @param theShape Shape to find sub-shapes of.
4751         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4752         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4753         #                direction of the plane to find shapes on.
4754         #  @param thePnt Point specifying location of the plane to find shapes on.
4755         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4756         #
4757         #  @return List of all found sub-shapes indices.
4758         #
4759         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4760         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4761             """
4762             Find in theShape all sub-shapes of type theShapeType,
4763             situated relatively the specified plane by the certain way,
4764             defined through theState parameter.
4765
4766             Parameters:
4767                 theShape Shape to find sub-shapes of.
4768                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4769                 theAx1 Vector (or line, or linear edge), specifying normal
4770                        direction and location of the plane to find shapes on.
4771                 thePnt Point specifying location of the plane to find shapes on.
4772                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4773
4774             Returns:
4775                 List of all found sub-shapes indices.
4776             """
4777             # Example: see GEOM_TestOthers.py
4778             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4779                                                                   theAx1, thePnt, theState)
4780             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4781             return aList
4782
4783         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4784         #  the specified cylinder by the certain way, defined through \a theState parameter.
4785         #  @param theShape Shape to find sub-shapes of.
4786         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4787         #  @param theAxis Vector (or line, or linear edge), specifying
4788         #                 axis of the cylinder to find shapes on.
4789         #  @param theRadius Radius of the cylinder to find shapes on.
4790         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4791         #  @param theName Object name; when specified, this parameter is used
4792         #         for result publication in the study. Otherwise, if automatic
4793         #         publication is switched on, default value is used for result name.
4794         #
4795         #  @return List of all found sub-shapes.
4796         #
4797         #  @ref swig_GetShapesOnCylinder "Example"
4798         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
4799             """
4800             Find in theShape all sub-shapes of type theShapeType, situated relatively
4801             the specified cylinder by the certain way, defined through theState parameter.
4802
4803             Parameters:
4804                 theShape Shape to find sub-shapes of.
4805                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4806                 theAxis Vector (or line, or linear edge), specifying
4807                         axis of the cylinder to find shapes on.
4808                 theRadius Radius of the cylinder to find shapes on.
4809                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4810                 theName Object name; when specified, this parameter is used
4811                         for result publication in the study. Otherwise, if automatic
4812                         publication is switched on, default value is used for result name.
4813
4814             Returns:
4815                 List of all found sub-shapes.
4816             """
4817             # Example: see GEOM_TestOthers.py
4818             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
4819             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
4820             self._autoPublish(aList, theName, "shapeOnCylinder")
4821             return aList
4822
4823         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4824         #  the specified cylinder by the certain way, defined through \a theState parameter.
4825         #  @param theShape Shape to find sub-shapes of.
4826         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4827         #  @param theAxis Vector (or line, or linear edge), specifying
4828         #                 axis of the cylinder to find shapes on.
4829         #  @param theRadius Radius of the cylinder to find shapes on.
4830         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4831         #
4832         #  @return List of all found sub-shapes indices.
4833         #
4834         #  @ref swig_GetShapesOnCylinderIDs "Example"
4835         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
4836             """
4837             Find in theShape all sub-shapes of type theShapeType, situated relatively
4838             the specified cylinder by the certain way, defined through theState parameter.
4839
4840             Parameters:
4841                 theShape Shape to find sub-shapes of.
4842                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4843                 theAxis Vector (or line, or linear edge), specifying
4844                         axis of the cylinder to find shapes on.
4845                 theRadius Radius of the cylinder to find shapes on.
4846                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4847
4848             Returns:
4849                 List of all found sub-shapes indices.
4850             """
4851             # Example: see GEOM_TestOthers.py
4852             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
4853             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
4854             return aList
4855
4856         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4857         #  the specified cylinder by the certain way, defined through \a theState parameter.
4858         #  @param theShape Shape to find sub-shapes of.
4859         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4860         #  @param theAxis Vector (or line, or linear edge), specifying
4861         #                 axis of the cylinder to find shapes on.
4862         #  @param thePnt Point specifying location of the bottom of the cylinder.
4863         #  @param theRadius Radius of the cylinder to find shapes on.
4864         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4865         #  @param theName Object name; when specified, this parameter is used
4866         #         for result publication in the study. Otherwise, if automatic
4867         #         publication is switched on, default value is used for result name.
4868         #
4869         #  @return List of all found sub-shapes.
4870         #
4871         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
4872         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
4873             """
4874             Find in theShape all sub-shapes of type theShapeType, situated relatively
4875             the specified cylinder by the certain way, defined through theState parameter.
4876
4877             Parameters:
4878                 theShape Shape to find sub-shapes of.
4879                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4880                 theAxis Vector (or line, or linear edge), specifying
4881                         axis of the cylinder to find shapes on.
4882                 theRadius Radius of the cylinder to find shapes on.
4883                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4884                 theName Object name; when specified, this parameter is used
4885                         for result publication in the study. Otherwise, if automatic
4886                         publication is switched on, default value is used for result name.
4887
4888             Returns:
4889                 List of all found sub-shapes.
4890             """
4891             # Example: see GEOM_TestOthers.py
4892             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4893             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
4894             self._autoPublish(aList, theName, "shapeOnCylinder")
4895             return aList
4896
4897         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4898         #  the specified cylinder by the certain way, defined through \a theState parameter.
4899         #  @param theShape Shape to find sub-shapes of.
4900         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4901         #  @param theAxis Vector (or line, or linear edge), specifying
4902         #                 axis of the cylinder to find shapes on.
4903         #  @param thePnt Point specifying location of the bottom of the cylinder.
4904         #  @param theRadius Radius of the cylinder to find shapes on.
4905         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4906         #
4907         #  @return List of all found sub-shapes indices
4908         #
4909         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
4910         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
4911             """
4912             Find in theShape all sub-shapes of type theShapeType, situated relatively
4913             the specified cylinder by the certain way, defined through theState parameter.
4914
4915             Parameters:
4916                 theShape Shape to find sub-shapes of.
4917                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4918                 theAxis Vector (or line, or linear edge), specifying
4919                         axis of the cylinder to find shapes on.
4920                 theRadius Radius of the cylinder to find shapes on.
4921                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4922
4923             Returns:
4924                 List of all found sub-shapes indices.            
4925             """
4926             # Example: see GEOM_TestOthers.py
4927             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4928             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
4929             return aList
4930
4931         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4932         #  the specified sphere by the certain way, defined through \a theState parameter.
4933         #  @param theShape Shape to find sub-shapes of.
4934         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4935         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4936         #  @param theRadius Radius of the sphere to find shapes on.
4937         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4938         #  @param theName Object name; when specified, this parameter is used
4939         #         for result publication in the study. Otherwise, if automatic
4940         #         publication is switched on, default value is used for result name.
4941         #
4942         #  @return List of all found sub-shapes.
4943         #
4944         #  @ref swig_GetShapesOnSphere "Example"
4945         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
4946             """
4947             Find in theShape all sub-shapes of type theShapeType, situated relatively
4948             the specified sphere by the certain way, defined through theState parameter.
4949
4950             Parameters:
4951                 theShape Shape to find sub-shapes of.
4952                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4953                 theCenter Point, specifying center of the sphere to find shapes on.
4954                 theRadius Radius of the sphere to find shapes on.
4955                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4956                 theName Object name; when specified, this parameter is used
4957                         for result publication in the study. Otherwise, if automatic
4958                         publication is switched on, default value is used for result name.
4959
4960             Returns:
4961                 List of all found sub-shapes.
4962             """
4963             # Example: see GEOM_TestOthers.py
4964             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
4965             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
4966             self._autoPublish(aList, theName, "shapeOnSphere")
4967             return aList
4968
4969         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4970         #  the specified sphere by the certain way, defined through \a theState parameter.
4971         #  @param theShape Shape to find sub-shapes of.
4972         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4973         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4974         #  @param theRadius Radius of the sphere to find shapes on.
4975         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4976         #
4977         #  @return List of all found sub-shapes indices.
4978         #
4979         #  @ref swig_GetShapesOnSphereIDs "Example"
4980         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
4981             """
4982             Find in theShape all sub-shapes of type theShapeType, situated relatively
4983             the specified sphere by the certain way, defined through theState parameter.
4984
4985             Parameters:
4986                 theShape Shape to find sub-shapes of.
4987                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4988                 theCenter Point, specifying center of the sphere to find shapes on.
4989                 theRadius Radius of the sphere to find shapes on.
4990                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4991
4992             Returns:
4993                 List of all found sub-shapes indices.
4994             """
4995             # Example: see GEOM_TestOthers.py
4996             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
4997             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
4998             return aList
4999
5000         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5001         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5002         #  @param theShape Shape to find sub-shapes of.
5003         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5004         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5005         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5006         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5007         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5008         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5009         #  @param theName Object name; when specified, this parameter is used
5010         #         for result publication in the study. Otherwise, if automatic
5011         #         publication is switched on, default value is used for result name.
5012         #
5013         #  @return List of all found sub-shapes.
5014         #
5015         #  @ref swig_GetShapesOnQuadrangle "Example"
5016         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5017                                   theTopLeftPoint, theTopRigthPoint,
5018                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
5019             """
5020             Find in theShape all sub-shapes of type theShapeType, situated relatively
5021             the specified quadrangle by the certain way, defined through theState parameter.
5022
5023             Parameters:
5024                 theShape Shape to find sub-shapes of.
5025                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5026                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5027                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5028                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5029                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5030                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5031                 theName Object name; when specified, this parameter is used
5032                         for result publication in the study. Otherwise, if automatic
5033                         publication is switched on, default value is used for result name.
5034
5035             Returns:
5036                 List of all found sub-shapes.
5037             """
5038             # Example: see GEOM_TestOthers.py
5039             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5040                                                         theTopLeftPoint, theTopRigthPoint,
5041                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
5042             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5043             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5044             return aList
5045
5046         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5047         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5048         #  @param theShape Shape to find sub-shapes of.
5049         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5050         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5051         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5052         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5053         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5054         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5055         #
5056         #  @return List of all found sub-shapes indices.
5057         #
5058         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5059         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5060                                      theTopLeftPoint, theTopRigthPoint,
5061                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5062             """
5063             Find in theShape all sub-shapes of type theShapeType, situated relatively
5064             the specified quadrangle by the certain way, defined through theState parameter.
5065
5066             Parameters:
5067                 theShape Shape to find sub-shapes of.
5068                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5069                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5070                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5071                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5072                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5073                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5074
5075             Returns:
5076                 List of all found sub-shapes indices.
5077             """
5078
5079             # Example: see GEOM_TestOthers.py
5080             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5081                                                            theTopLeftPoint, theTopRigthPoint,
5082                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5083             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5084             return aList
5085
5086         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5087         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5088         #  @param theBox Shape for relative comparing.
5089         #  @param theShape Shape to find sub-shapes of.
5090         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5091         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5092         #  @param theName Object name; when specified, this parameter is used
5093         #         for result publication in the study. Otherwise, if automatic
5094         #         publication is switched on, default value is used for result name.
5095         #
5096         #  @return List of all found sub-shapes.
5097         #
5098         #  @ref swig_GetShapesOnBox "Example"
5099         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5100             """
5101             Find in theShape all sub-shapes of type theShapeType, situated relatively
5102             the specified theBox by the certain way, defined through theState parameter.
5103
5104             Parameters:
5105                 theBox Shape for relative comparing.
5106                 theShape Shape to find sub-shapes of.
5107                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5108                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5109                 theName Object name; when specified, this parameter is used
5110                         for result publication in the study. Otherwise, if automatic
5111                         publication is switched on, default value is used for result name.
5112
5113             Returns:
5114                 List of all found sub-shapes.
5115             """
5116             # Example: see GEOM_TestOthers.py
5117             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5118             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5119             self._autoPublish(aList, theName, "shapeOnBox")
5120             return aList
5121
5122         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5123         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5124         #  @param theBox Shape for relative comparing.
5125         #  @param theShape Shape to find sub-shapes of.
5126         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5127         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5128         #
5129         #  @return List of all found sub-shapes indices.
5130         #
5131         #  @ref swig_GetShapesOnBoxIDs "Example"
5132         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5133             """
5134             Find in theShape all sub-shapes of type theShapeType, situated relatively
5135             the specified theBox by the certain way, defined through theState parameter.
5136
5137             Parameters:
5138                 theBox Shape for relative comparing.
5139                 theShape Shape to find sub-shapes of.
5140                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5141                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5142
5143             Returns:
5144                 List of all found sub-shapes indices.
5145             """
5146             # Example: see GEOM_TestOthers.py
5147             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5148             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5149             return aList
5150
5151         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5152         #  situated relatively the specified \a theCheckShape by the
5153         #  certain way, defined through \a theState parameter.
5154         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5155         #  @param theShape Shape to find sub-shapes of.
5156         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
5157         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5158         #  @param theName Object name; when specified, this parameter is used
5159         #         for result publication in the study. Otherwise, if automatic
5160         #         publication is switched on, default value is used for result name.
5161         #
5162         #  @return List of all found sub-shapes.
5163         #
5164         #  @ref swig_GetShapesOnShape "Example"
5165         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5166             """
5167             Find in theShape all sub-shapes of type theShapeType,
5168             situated relatively the specified theCheckShape by the
5169             certain way, defined through theState parameter.
5170
5171             Parameters:
5172                 theCheckShape Shape for relative comparing. It must be a solid.
5173                 theShape Shape to find sub-shapes of.
5174                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5175                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5176                 theName Object name; when specified, this parameter is used
5177                         for result publication in the study. Otherwise, if automatic
5178                         publication is switched on, default value is used for result name.
5179
5180             Returns:
5181                 List of all found sub-shapes.
5182             """
5183             # Example: see GEOM_TestOthers.py
5184             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5185                                                    theShapeType, theState)
5186             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5187             self._autoPublish(aList, theName, "shapeOnShape")
5188             return aList
5189
5190         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5191         #  situated relatively the specified \a theCheckShape by the
5192         #  certain way, defined through \a theState parameter.
5193         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5194         #  @param theShape Shape to find sub-shapes of.
5195         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5196         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5197         #  @param theName Object name; when specified, this parameter is used
5198         #         for result publication in the study. Otherwise, if automatic
5199         #         publication is switched on, default value is used for result name.
5200         #
5201         #  @return All found sub-shapes as compound.
5202         #
5203         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5204         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5205             """
5206             Find in theShape all sub-shapes of type theShapeType,
5207             situated relatively the specified theCheckShape by the
5208             certain way, defined through theState parameter.
5209
5210             Parameters:
5211                 theCheckShape Shape for relative comparing. It must be a solid.
5212                 theShape Shape to find sub-shapes of.
5213                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5214                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5215                 theName Object name; when specified, this parameter is used
5216                         for result publication in the study. Otherwise, if automatic
5217                         publication is switched on, default value is used for result name.
5218
5219             Returns:
5220                 All found sub-shapes as compound.
5221             """
5222             # Example: see GEOM_TestOthers.py
5223             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5224                                                              theShapeType, theState)
5225             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5226             self._autoPublish(anObj, theName, "shapeOnShape")
5227             return anObj
5228
5229         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5230         #  situated relatively the specified \a theCheckShape by the
5231         #  certain way, defined through \a theState parameter.
5232         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5233         #  @param theShape Shape to find sub-shapes of.
5234         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5235         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5236         #
5237         #  @return List of all found sub-shapes indices.
5238         #
5239         #  @ref swig_GetShapesOnShapeIDs "Example"
5240         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5241             """
5242             Find in theShape all sub-shapes of type theShapeType,
5243             situated relatively the specified theCheckShape by the
5244             certain way, defined through theState parameter.
5245
5246             Parameters:
5247                 theCheckShape Shape for relative comparing. It must be a solid.
5248                 theShape Shape to find sub-shapes of.
5249                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5250                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5251
5252             Returns:
5253                 List of all found sub-shapes indices.
5254             """
5255             # Example: see GEOM_TestOthers.py
5256             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5257                                                       theShapeType, theState)
5258             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5259             return aList
5260
5261         ## Get sub-shape(s) of theShapeWhere, which are
5262         #  coincident with \a theShapeWhat or could be a part of it.
5263         #  @param theShapeWhere Shape to find sub-shapes of.
5264         #  @param theShapeWhat Shape, specifying what to find.
5265         #  @param isNewImplementation implementation of GetInPlace functionality
5266         #             (default = False, old alghorithm based on shape properties)
5267         #  @param theName Object name; when specified, this parameter is used
5268         #         for result publication in the study. Otherwise, if automatic
5269         #         publication is switched on, default value is used for result name.
5270         #
5271         #  @return Group of all found sub-shapes or a single found sub-shape.
5272         #
5273         #  @note This function has a restriction on argument shapes.
5274         #        If \a theShapeWhere has curved parts with significantly
5275         #        outstanding centres (i.e. the mass centre of a part is closer to
5276         #        \a theShapeWhat than to the part), such parts will not be found.
5277         #        @image html get_in_place_lost_part.png
5278         #
5279         #  @ref swig_GetInPlace "Example"
5280         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5281             """
5282             Get sub-shape(s) of theShapeWhere, which are
5283             coincident with  theShapeWhat or could be a part of it.
5284
5285             Parameters:
5286                 theShapeWhere Shape to find sub-shapes of.
5287                 theShapeWhat Shape, specifying what to find.
5288                 isNewImplementation Implementation of GetInPlace functionality
5289                                     (default = False, old alghorithm based on shape properties)
5290                 theName Object name; when specified, this parameter is used
5291                         for result publication in the study. Otherwise, if automatic
5292                         publication is switched on, default value is used for result name.
5293
5294             Returns:
5295                 Group of all found sub-shapes or a single found sub-shape.
5296
5297                 
5298             Note:
5299                 This function has a restriction on argument shapes.
5300                 If theShapeWhere has curved parts with significantly
5301                 outstanding centres (i.e. the mass centre of a part is closer to
5302                 theShapeWhat than to the part), such parts will not be found.
5303             """
5304             # Example: see GEOM_TestOthers.py
5305             anObj = None
5306             if isNewImplementation:
5307                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5308             else:
5309                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5310                 pass
5311             RaiseIfFailed("GetInPlace", self.ShapesOp)
5312             self._autoPublish(anObj, theName, "inplace")
5313             return anObj
5314
5315         ## Get sub-shape(s) of \a theShapeWhere, which are
5316         #  coincident with \a theShapeWhat or could be a part of it.
5317         #
5318         #  Implementation of this method is based on a saved history of an operation,
5319         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5320         #  arguments (an argument shape or a sub-shape of an argument shape).
5321         #  The operation could be the Partition or one of boolean operations,
5322         #  performed on simple shapes (not on compounds).
5323         #
5324         #  @param theShapeWhere Shape to find sub-shapes of.
5325         #  @param theShapeWhat Shape, specifying what to find (must be in the
5326         #                      building history of the ShapeWhere).
5327         #  @param theName Object name; when specified, this parameter is used
5328         #         for result publication in the study. Otherwise, if automatic
5329         #         publication is switched on, default value is used for result name.
5330         #
5331         #  @return Group of all found sub-shapes or a single found sub-shape.
5332         #
5333         #  @ref swig_GetInPlace "Example"
5334         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5335             """
5336             Implementation of this method is based on a saved history of an operation,
5337             produced theShapeWhere. The theShapeWhat must be among this operation's
5338             arguments (an argument shape or a sub-shape of an argument shape).
5339             The operation could be the Partition or one of boolean operations,
5340             performed on simple shapes (not on compounds).
5341
5342             Parameters:
5343                 theShapeWhere Shape to find sub-shapes of.
5344                 theShapeWhat Shape, specifying what to find (must be in the
5345                                 building history of the ShapeWhere).
5346                 theName Object name; when specified, this parameter is used
5347                         for result publication in the study. Otherwise, if automatic
5348                         publication is switched on, default value is used for result name.
5349
5350             Returns:
5351                 Group of all found sub-shapes or a single found sub-shape.
5352             """
5353             # Example: see GEOM_TestOthers.py
5354             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5355             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5356             self._autoPublish(anObj, theName, "inplace")
5357             return anObj
5358
5359         ## Get sub-shape of theShapeWhere, which is
5360         #  equal to \a theShapeWhat.
5361         #  @param theShapeWhere Shape to find sub-shape of.
5362         #  @param theShapeWhat Shape, specifying what to find.
5363         #  @param theName Object name; when specified, this parameter is used
5364         #         for result publication in the study. Otherwise, if automatic
5365         #         publication is switched on, default value is used for result name.
5366         #
5367         #  @return New GEOM.GEOM_Object for found sub-shape.
5368         #
5369         #  @ref swig_GetSame "Example"
5370         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5371             """
5372             Get sub-shape of theShapeWhere, which is
5373             equal to theShapeWhat.
5374
5375             Parameters:
5376                 theShapeWhere Shape to find sub-shape of.
5377                 theShapeWhat Shape, specifying what to find.
5378                 theName Object name; when specified, this parameter is used
5379                         for result publication in the study. Otherwise, if automatic
5380                         publication is switched on, default value is used for result name.
5381
5382             Returns:
5383                 New GEOM.GEOM_Object for found sub-shape.
5384             """
5385             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5386             RaiseIfFailed("GetSame", self.ShapesOp)
5387             self._autoPublish(anObj, theName, "sameShape")
5388             return anObj
5389
5390
5391         ## Get sub-shape indices of theShapeWhere, which is
5392         #  equal to \a theShapeWhat.
5393         #  @param theShapeWhere Shape to find sub-shape of.
5394         #  @param theShapeWhat Shape, specifying what to find.
5395         #  @return List of all found sub-shapes indices. 
5396         #
5397         #  @ref swig_GetSame "Example"
5398         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5399             """
5400             Get sub-shape indices of theShapeWhere, which is
5401             equal to theShapeWhat.
5402
5403             Parameters:
5404                 theShapeWhere Shape to find sub-shape of.
5405                 theShapeWhat Shape, specifying what to find.
5406
5407             Returns:
5408                 List of all found sub-shapes indices.
5409             """
5410             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5411             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5412             return anObj
5413
5414
5415         # end of l4_obtain
5416         ## @}
5417
5418         ## @addtogroup l4_access
5419         ## @{
5420
5421         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5422         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5423         #  @param aShape Shape to get sub-shape of.
5424         #  @param ListOfID List of sub-shapes indices.
5425         #  @param theName Object name; when specified, this parameter is used
5426         #         for result publication in the study. Otherwise, if automatic
5427         #         publication is switched on, default value is used for result name.
5428         #
5429         #  @return Found sub-shape.
5430         #
5431         #  @ref swig_all_decompose "Example"
5432         def GetSubShape(self, aShape, ListOfID, theName=None):
5433             """
5434             Obtain a composite sub-shape of aShape, composed from sub-shapes
5435             of aShape, selected by their unique IDs inside aShape
5436
5437             Parameters:
5438                 aShape Shape to get sub-shape of.
5439                 ListOfID List of sub-shapes indices.
5440                 theName Object name; when specified, this parameter is used
5441                         for result publication in the study. Otherwise, if automatic
5442                         publication is switched on, default value is used for result name.
5443
5444             Returns:
5445                 Found sub-shape.
5446             """
5447             # Example: see GEOM_TestAll.py
5448             anObj = self.AddSubShape(aShape,ListOfID)
5449             self._autoPublish(anObj, theName, "subshape")
5450             return anObj
5451
5452         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5453         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5454         #  @param aShape Shape to get sub-shape of.
5455         #  @param aSubShape Sub-shapes of aShape.
5456         #  @return ID of found sub-shape.
5457         #
5458         #  @ref swig_all_decompose "Example"
5459         def GetSubShapeID(self, aShape, aSubShape):
5460             """
5461             Obtain unique ID of sub-shape aSubShape inside aShape
5462             of aShape, selected by their unique IDs inside aShape
5463
5464             Parameters:
5465                aShape Shape to get sub-shape of.
5466                aSubShape Sub-shapes of aShape.
5467
5468             Returns:
5469                ID of found sub-shape.
5470             """
5471             # Example: see GEOM_TestAll.py
5472             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5473             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5474             return anID
5475             
5476         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5477         #  This function is provided for performance purpose. The complexity is O(n) with n
5478         #  the number of subobjects of aShape
5479         #  @param aShape Shape to get sub-shape of.
5480         #  @param aSubShapes Sub-shapes of aShape.
5481         #  @return list of IDs of found sub-shapes.
5482         #
5483         #  @ref swig_all_decompose "Example"
5484         def GetSubShapesIDs(self, aShape, aSubShapes):
5485             """
5486             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5487             This function is provided for performance purpose. The complexity is O(n) with n
5488             the number of subobjects of aShape
5489
5490             Parameters:
5491                aShape Shape to get sub-shape of.
5492                aSubShapes Sub-shapes of aShape.
5493
5494             Returns:
5495                List of IDs of found sub-shape.
5496             """
5497             # Example: see GEOM_TestAll.py
5498             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5499             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5500             return anIDs
5501
5502         # end of l4_access
5503         ## @}
5504
5505         ## @addtogroup l4_decompose
5506         ## @{
5507
5508         ## Get all sub-shapes and groups of \a theShape,
5509         #  that were created already by any other methods.
5510         #  @param theShape Any shape.
5511         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5512         #                       returned, else all found sub-shapes and groups.
5513         #  @return List of existing sub-objects of \a theShape.
5514         #
5515         #  @ref swig_all_decompose "Example"
5516         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5517             """
5518             Get all sub-shapes and groups of theShape,
5519             that were created already by any other methods.
5520
5521             Parameters:
5522                 theShape Any shape.
5523                 theGroupsOnly If this parameter is TRUE, only groups will be
5524                                  returned, else all found sub-shapes and groups.
5525
5526             Returns:
5527                 List of existing sub-objects of theShape.
5528             """
5529             # Example: see GEOM_TestAll.py
5530             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5531             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5532             return ListObj
5533
5534         ## Get all groups of \a theShape,
5535         #  that were created already by any other methods.
5536         #  @param theShape Any shape.
5537         #  @return List of existing groups of \a theShape.
5538         #
5539         #  @ref swig_all_decompose "Example"
5540         def GetGroups(self, theShape):
5541             """
5542             Get all groups of theShape,
5543             that were created already by any other methods.
5544
5545             Parameters:
5546                 theShape Any shape.
5547
5548             Returns:
5549                 List of existing groups of theShape.
5550             """
5551             # Example: see GEOM_TestAll.py
5552             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5553             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5554             return ListObj
5555
5556         ## Explode a shape on sub-shapes of a given type.
5557         #  If the shape itself matches the type, it is also returned.
5558         #  @param aShape Shape to be exploded.
5559         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
5560         #  @param theName Object name; when specified, this parameter is used
5561         #         for result publication in the study. Otherwise, if automatic
5562         #         publication is switched on, default value is used for result name.
5563         #
5564         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5565         #
5566         #  @ref swig_all_decompose "Example"
5567         def SubShapeAll(self, aShape, aType, theName=None):
5568             """
5569             Explode a shape on sub-shapes of a given type.
5570             If the shape itself matches the type, it is also returned.
5571
5572             Parameters:
5573                 aShape Shape to be exploded.
5574                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
5575                 theName Object name; when specified, this parameter is used
5576                         for result publication in the study. Otherwise, if automatic
5577                         publication is switched on, default value is used for result name.
5578
5579             Returns:
5580                 List of sub-shapes of type theShapeType, contained in theShape.
5581             """
5582             # Example: see GEOM_TestAll.py
5583             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5584             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5585             self._autoPublish(ListObj, theName, "subshape")
5586             return ListObj
5587
5588         ## Explode a shape on sub-shapes of a given type.
5589         #  @param aShape Shape to be exploded.
5590         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5591         #  @return List of IDs of sub-shapes.
5592         #
5593         #  @ref swig_all_decompose "Example"
5594         def SubShapeAllIDs(self, aShape, aType):
5595             """
5596             Explode a shape on sub-shapes of a given type.
5597
5598             Parameters:
5599                 aShape Shape to be exploded (see geompy.ShapeType)
5600                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5601
5602             Returns:
5603                 List of IDs of sub-shapes.
5604             """
5605             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5606             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5607             return ListObj
5608
5609         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5610         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
5611         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5612         #  @param aShape Shape to get sub-shape of.
5613         #  @param ListOfInd List of sub-shapes indices.
5614         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5615         #  @param theName Object name; when specified, this parameter is used
5616         #         for result publication in the study. Otherwise, if automatic
5617         #         publication is switched on, default value is used for result name.
5618         #
5619         #  @return A compound of sub-shapes of aShape.
5620         #
5621         #  @ref swig_all_decompose "Example"
5622         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5623             """
5624             Obtain a compound of sub-shapes of aShape,
5625             selected by their indices in list of all sub-shapes of type aType.
5626             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5627             
5628             Parameters:
5629                 aShape Shape to get sub-shape of.
5630                 ListOfID List of sub-shapes indices.
5631                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5632                 theName Object name; when specified, this parameter is used
5633                         for result publication in the study. Otherwise, if automatic
5634                         publication is switched on, default value is used for result name.
5635
5636             Returns:
5637                 A compound of sub-shapes of aShape.
5638             """
5639             # Example: see GEOM_TestAll.py
5640             ListOfIDs = []
5641             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5642             for ind in ListOfInd:
5643                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5644             # note: auto-publishing is done in self.GetSubShape()
5645             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5646             return anObj
5647
5648         ## Explode a shape on sub-shapes of a given type.
5649         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5650         #  If the shape itself matches the type, it is also returned.
5651         #  @param aShape Shape to be exploded.
5652         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5653         #  @param theName Object name; when specified, this parameter is used
5654         #         for result publication in the study. Otherwise, if automatic
5655         #         publication is switched on, default value is used for result name.
5656         #
5657         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5658         #
5659         #  @ref swig_SubShapeAllSorted "Example"
5660         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5661             """
5662             Explode a shape on sub-shapes of a given type.
5663             Sub-shapes will be sorted by coordinates of their gravity centers.
5664             If the shape itself matches the type, it is also returned.
5665
5666             Parameters: 
5667                 aShape Shape to be exploded.
5668                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5669                 theName Object name; when specified, this parameter is used
5670                         for result publication in the study. Otherwise, if automatic
5671                         publication is switched on, default value is used for result name.
5672
5673             Returns: 
5674                 List of sub-shapes of type theShapeType, contained in theShape.
5675             """
5676             # Example: see GEOM_TestAll.py
5677             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5678             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5679             self._autoPublish(ListObj, theName, "subshape")
5680             return ListObj
5681
5682         ## Explode a shape on sub-shapes of a given type.
5683         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5684         #  @param aShape Shape to be exploded.
5685         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5686         #  @return List of IDs of sub-shapes.
5687         #
5688         #  @ref swig_all_decompose "Example"
5689         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5690             """
5691             Explode a shape on sub-shapes of a given type.
5692             Sub-shapes will be sorted by coordinates of their gravity centers.
5693
5694             Parameters: 
5695                 aShape Shape to be exploded.
5696                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5697
5698             Returns: 
5699                 List of IDs of sub-shapes.
5700             """
5701             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5702             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5703             return ListIDs
5704
5705         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5706         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5707         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5708         #  @param aShape Shape to get sub-shape of.
5709         #  @param ListOfInd List of sub-shapes indices.
5710         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5711         #  @param theName Object name; when specified, this parameter is used
5712         #         for result publication in the study. Otherwise, if automatic
5713         #         publication is switched on, default value is used for result name.
5714         #
5715         #  @return A compound of sub-shapes of aShape.
5716         #
5717         #  @ref swig_all_decompose "Example"
5718         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5719             """
5720             Obtain a compound of sub-shapes of aShape,
5721             selected by they indices in sorted list of all sub-shapes of type aType.
5722             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5723
5724             Parameters:
5725                 aShape Shape to get sub-shape of.
5726                 ListOfID List of sub-shapes indices.
5727                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5728                 theName Object name; when specified, this parameter is used
5729                         for result publication in the study. Otherwise, if automatic
5730                         publication is switched on, default value is used for result name.
5731
5732             Returns:
5733                 A compound of sub-shapes of aShape.
5734             """
5735             # Example: see GEOM_TestAll.py
5736             ListOfIDs = []
5737             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5738             for ind in ListOfInd:
5739                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5740             # note: auto-publishing is done in self.GetSubShape()
5741             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5742             return anObj
5743
5744         ## Extract shapes (excluding the main shape) of given type.
5745         #  @param aShape The shape.
5746         #  @param aType  The shape type (see ShapeType())
5747         #  @param isSorted Boolean flag to switch sorting on/off.
5748         #  @param theName Object name; when specified, this parameter is used
5749         #         for result publication in the study. Otherwise, if automatic
5750         #         publication is switched on, default value is used for result name.
5751         #
5752         #  @return List of sub-shapes of type aType, contained in aShape.
5753         #
5754         #  @ref swig_FilletChamfer "Example"
5755         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
5756             """
5757             Extract shapes (excluding the main shape) of given type.
5758
5759             Parameters:
5760                 aShape The shape.
5761                 aType  The shape type (see geompy.ShapeType)
5762                 isSorted Boolean flag to switch sorting on/off.
5763                 theName Object name; when specified, this parameter is used
5764                         for result publication in the study. Otherwise, if automatic
5765                         publication is switched on, default value is used for result name.
5766
5767             Returns:     
5768                 List of sub-shapes of type aType, contained in aShape.
5769             """
5770             # Example: see GEOM_TestAll.py
5771             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
5772             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
5773             self._autoPublish(ListObj, theName, "subshape")
5774             return ListObj
5775
5776         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
5777         #  @param aShape Main shape.
5778         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
5779         #  @param theName Object name; when specified, this parameter is used
5780         #         for result publication in the study. Otherwise, if automatic
5781         #         publication is switched on, default value is used for result name.
5782         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5783         #
5784         #  @ref swig_all_decompose "Example"
5785         def SubShapes(self, aShape, anIDs, theName=None):
5786             """
5787             Get a set of sub-shapes defined by their unique IDs inside theMainShape
5788
5789             Parameters:
5790                 aShape Main shape.
5791                 anIDs List of unique IDs of sub-shapes inside theMainShape.
5792                 theName Object name; when specified, this parameter is used
5793                         for result publication in the study. Otherwise, if automatic
5794                         publication is switched on, default value is used for result name.
5795
5796             Returns:      
5797                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5798             """
5799             # Example: see GEOM_TestAll.py
5800             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
5801             RaiseIfFailed("SubShapes", self.ShapesOp)
5802             self._autoPublish(ListObj, theName, "subshape")
5803             return ListObj
5804
5805         # end of l4_decompose
5806         ## @}
5807
5808         ## @addtogroup l4_decompose_d
5809         ## @{
5810
5811         ## Deprecated method
5812         #  It works like SubShapeAllSortedCentres(), but wrongly
5813         #  defines centres of faces, shells and solids.
5814         def SubShapeAllSorted(self, aShape, aType, theName=None):
5815             """
5816             Deprecated method
5817             It works like geompy.SubShapeAllSortedCentres, but wrongly
5818             defines centres of faces, shells and solids.
5819             """
5820             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
5821             RaiseIfFailed("MakeExplode", self.ShapesOp)
5822             self._autoPublish(ListObj, theName, "subshape")
5823             return ListObj
5824
5825         ## Deprecated method
5826         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
5827         #  defines centres of faces, shells and solids.
5828         def SubShapeAllSortedIDs(self, aShape, aType):
5829             """
5830             Deprecated method
5831             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
5832             defines centres of faces, shells and solids.
5833             """
5834             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
5835             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5836             return ListIDs
5837
5838         ## Deprecated method
5839         #  It works like SubShapeSortedCentres(), but has a bug
5840         #  (wrongly defines centres of faces, shells and solids).
5841         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
5842             """
5843             Deprecated method
5844             It works like geompy.SubShapeSortedCentres, but has a bug
5845             (wrongly defines centres of faces, shells and solids).
5846             """
5847             ListOfIDs = []
5848             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
5849             for ind in ListOfInd:
5850                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5851             # note: auto-publishing is done in self.GetSubShape()
5852             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5853             return anObj
5854
5855         # end of l4_decompose_d
5856         ## @}
5857
5858         ## @addtogroup l3_healing
5859         ## @{
5860
5861         ## Apply a sequence of Shape Healing operators to the given object.
5862         #  @param theShape Shape to be processed.
5863         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5864         #  @param theParameters List of names of parameters
5865         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5866         #  @param theValues List of values of parameters, in the same order
5867         #                    as parameters are listed in <VAR>theParameters</VAR> list.
5868         #  @param theName Object name; when specified, this parameter is used
5869         #         for result publication in the study. Otherwise, if automatic
5870         #         publication is switched on, default value is used for result name.
5871         #
5872         #  <b> Operators and Parameters: </b> \n
5873         #
5874         #  * \b FixShape - corrects invalid shapes. \n
5875         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
5876         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
5877         #
5878         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
5879         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
5880         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
5881         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
5882         #
5883         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
5884         #    surfaces in segments using a certain angle. \n
5885         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5886         #    if Angle=180, four if Angle=90, etc). \n
5887         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
5888         #
5889         #  * \b SplitClosedFaces - splits closed faces in segments.
5890         #    The number of segments depends on the number of splitting points.\n
5891         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
5892         #
5893         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
5894         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
5895         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
5896         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
5897         #   This and the previous parameters can take the following values:\n
5898         #   \b Parametric \b Continuity \n
5899         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
5900         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
5901         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
5902         #    ruling out sharp edges).\n
5903         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
5904         #       are of the same magnitude).\n
5905         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
5906         #    or surfaces (d/du C(u)) are the same at junction. \n
5907         #   \b Geometric \b Continuity \n
5908         #   \b G1: first derivatives are proportional at junction.\n
5909         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
5910         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
5911         #   \b G2: first and second derivatives are proportional at junction.
5912         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
5913         #    continuity requires that the underlying parameterization was continuous as well.
5914         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
5915         #
5916         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
5917         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
5918         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
5919         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
5920         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
5921         #       with the specified parameters.\n
5922         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
5923         #       with the specified parameters.\n
5924         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
5925         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
5926         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
5927         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
5928         #
5929         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
5930         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
5931         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
5932         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
5933         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
5934         #
5935         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
5936         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
5937         #
5938         #
5939         #  @return New GEOM.GEOM_Object, containing processed shape.
5940         #
5941         #  \n @ref tui_shape_processing "Example"
5942         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
5943             """
5944             Apply a sequence of Shape Healing operators to the given object.
5945
5946             Parameters:
5947                 theShape Shape to be processed.
5948                 theValues List of values of parameters, in the same order
5949                           as parameters are listed in theParameters list.
5950                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5951                 theParameters List of names of parameters
5952                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5953                 theName Object name; when specified, this parameter is used
5954                         for result publication in the study. Otherwise, if automatic
5955                         publication is switched on, default value is used for result name.
5956
5957                 Operators and Parameters:
5958
5959                  * FixShape - corrects invalid shapes.
5960                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
5961                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
5962                  * FixFaceSize - removes small faces, such as spots and strips.
5963                      * FixFaceSize.Tolerance - defines minimum possible face size.
5964                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
5965                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
5966                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
5967                                 in segments using a certain angle.
5968                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5969                                           if Angle=180, four if Angle=90, etc).
5970                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
5971                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
5972                                       splitting points.
5973                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
5974                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
5975                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
5976                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
5977                      * SplitContinuity.CurveContinuity - required continuity for curves.
5978                        This and the previous parameters can take the following values:
5979                        
5980                        Parametric Continuity:
5981                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
5982                                                    coincidental. The curves or surfaces may still meet at an angle,
5983                                                    giving rise to a sharp corner or edge).
5984                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
5985                                                    are parallel, ruling out sharp edges).
5986                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
5987                                                   or surfaces are of the same magnitude).
5988                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
5989                           curves or surfaces (d/du C(u)) are the same at junction.
5990                           
5991                        Geometric Continuity:
5992                        G1: first derivatives are proportional at junction.
5993                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
5994                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
5995                        G2: first and second derivatives are proportional at junction. As the names imply,
5996                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
5997                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
5998                            geometric continuity of order n, but not vice-versa.
5999                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
6000                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
6001                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
6002                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
6003                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
6004                                                         the specified parameters.
6005                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
6006                                                         the specified parameters.
6007                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
6008                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
6009                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
6010                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
6011                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
6012                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
6013                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
6014                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
6015                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
6016                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
6017                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
6018
6019             Returns:
6020                 New GEOM.GEOM_Object, containing processed shape.
6021
6022             Note: For more information look through SALOME Geometry User's Guide->
6023                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
6024             """
6025             # Example: see GEOM_TestHealing.py
6026             theValues,Parameters = ParseList(theValues)
6027             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
6028             # To avoid script failure in case of good argument shape
6029             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6030                 return theShape
6031             RaiseIfFailed("ProcessShape", self.HealOp)
6032             for string in (theOperators + theParameters):
6033                 Parameters = ":" + Parameters
6034                 pass
6035             anObj.SetParameters(Parameters)
6036             self._autoPublish(anObj, theName, "healed")
6037             return anObj
6038
6039         ## Remove faces from the given object (shape).
6040         #  @param theObject Shape to be processed.
6041         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
6042         #                  removes ALL faces of the given object.
6043         #  @param theName Object name; when specified, this parameter is used
6044         #         for result publication in the study. Otherwise, if automatic
6045         #         publication is switched on, default value is used for result name.
6046         #
6047         #  @return New GEOM.GEOM_Object, containing processed shape.
6048         #
6049         #  @ref tui_suppress_faces "Example"
6050         def SuppressFaces(self, theObject, theFaces, theName=None):
6051             """
6052             Remove faces from the given object (shape).
6053
6054             Parameters:
6055                 theObject Shape to be processed.
6056                 theFaces Indices of faces to be removed, if EMPTY then the method
6057                          removes ALL faces of the given object.
6058                 theName Object name; when specified, this parameter is used
6059                         for result publication in the study. Otherwise, if automatic
6060                         publication is switched on, default value is used for result name.
6061
6062             Returns:
6063                 New GEOM.GEOM_Object, containing processed shape.
6064             """
6065             # Example: see GEOM_TestHealing.py
6066             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
6067             RaiseIfFailed("SuppressFaces", self.HealOp)
6068             self._autoPublish(anObj, theName, "suppressFaces")
6069             return anObj
6070
6071         ## Sewing of some shapes into single shape.
6072         #  @param ListShape Shapes to be processed.
6073         #  @param theTolerance Required tolerance value.
6074         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6075         #  @param theName Object name; when specified, this parameter is used
6076         #         for result publication in the study. Otherwise, if automatic
6077         #         publication is switched on, default value is used for result name.
6078         #
6079         #  @return New GEOM.GEOM_Object, containing processed shape.
6080         #
6081         #  @ref tui_sewing "Example"
6082         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6083             """
6084             Sewing of some shapes into single shape.
6085
6086             Parameters:
6087                 ListShape Shapes to be processed.
6088                 theTolerance Required tolerance value.
6089                 AllowNonManifold Flag that allows non-manifold sewing.
6090                 theName Object name; when specified, this parameter is used
6091                         for result publication in the study. Otherwise, if automatic
6092                         publication is switched on, default value is used for result name.
6093
6094             Returns:
6095                 New GEOM.GEOM_Object, containing processed shape.
6096             """
6097             # Example: see GEOM_TestHealing.py
6098             comp = self.MakeCompound(ListShape)
6099             # note: auto-publishing is done in self.Sew()
6100             anObj = self.Sew(comp, theTolerance, AllowNonManifold, theName)
6101             return anObj
6102
6103         ## Sewing of the given object.
6104         #  @param theObject Shape to be processed.
6105         #  @param theTolerance Required tolerance value.
6106         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6107         #  @param theName Object name; when specified, this parameter is used
6108         #         for result publication in the study. Otherwise, if automatic
6109         #         publication is switched on, default value is used for result name.
6110         #
6111         #  @return New GEOM.GEOM_Object, containing processed shape.
6112         def Sew(self, theObject, theTolerance, AllowNonManifold=False, theName=None):
6113             """
6114             Sewing of the given object.
6115
6116             Parameters:
6117                 theObject Shape to be processed.
6118                 theTolerance Required tolerance value.
6119                 AllowNonManifold Flag that allows non-manifold sewing.
6120                 theName Object name; when specified, this parameter is used
6121                         for result publication in the study. Otherwise, if automatic
6122                         publication is switched on, default value is used for result name.
6123
6124             Returns:
6125                 New GEOM.GEOM_Object, containing processed shape.
6126             """
6127             # Example: see MakeSewing() above
6128             theTolerance,Parameters = ParseParameters(theTolerance)
6129             if AllowNonManifold:
6130                 anObj = self.HealOp.SewAllowNonManifold(theObject, theTolerance)
6131             else:
6132                 anObj = self.HealOp.Sew(theObject, theTolerance)
6133             # To avoid script failure in case of good argument shape
6134             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6135                 return theObject
6136             RaiseIfFailed("Sew", self.HealOp)
6137             anObj.SetParameters(Parameters)
6138             self._autoPublish(anObj, theName, "sewed")
6139             return anObj
6140
6141         ## Rebuild the topology of theCompound of solids by removing
6142         #  of the faces that are shared by several solids.
6143         #  @param theCompound Shape to be processed.
6144         #  @param theName Object name; when specified, this parameter is used
6145         #         for result publication in the study. Otherwise, if automatic
6146         #         publication is switched on, default value is used for result name.
6147         #
6148         #  @return New GEOM.GEOM_Object, containing processed shape.
6149         #
6150         #  @ref tui_remove_webs "Example"
6151         def RemoveInternalFaces (self, theCompound, theName=None):
6152             """
6153             Rebuild the topology of theCompound of solids by removing
6154             of the faces that are shared by several solids.
6155
6156             Parameters:
6157                 theCompound Shape to be processed.
6158                 theName Object name; when specified, this parameter is used
6159                         for result publication in the study. Otherwise, if automatic
6160                         publication is switched on, default value is used for result name.
6161
6162             Returns:
6163                 New GEOM.GEOM_Object, containing processed shape.
6164             """
6165             # Example: see GEOM_TestHealing.py
6166             anObj = self.HealOp.RemoveInternalFaces(theCompound)
6167             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6168             self._autoPublish(anObj, theName, "removeWebs")
6169             return anObj
6170
6171         ## Remove internal wires and edges from the given object (face).
6172         #  @param theObject Shape to be processed.
6173         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6174         #                  removes ALL internal wires of the given object.
6175         #  @param theName Object name; when specified, this parameter is used
6176         #         for result publication in the study. Otherwise, if automatic
6177         #         publication is switched on, default value is used for result name.
6178         #
6179         #  @return New GEOM.GEOM_Object, containing processed shape.
6180         #
6181         #  @ref tui_suppress_internal_wires "Example"
6182         def SuppressInternalWires(self, theObject, theWires, theName=None):
6183             """
6184             Remove internal wires and edges from the given object (face).
6185
6186             Parameters:
6187                 theObject Shape to be processed.
6188                 theWires Indices of wires to be removed, if EMPTY then the method
6189                          removes ALL internal wires of the given object.
6190                 theName Object name; when specified, this parameter is used
6191                         for result publication in the study. Otherwise, if automatic
6192                         publication is switched on, default value is used for result name.
6193
6194             Returns:                
6195                 New GEOM.GEOM_Object, containing processed shape.
6196             """
6197             # Example: see GEOM_TestHealing.py
6198             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6199             RaiseIfFailed("RemoveIntWires", self.HealOp)
6200             self._autoPublish(anObj, theName, "suppressWires")
6201             return anObj
6202
6203         ## Remove internal closed contours (holes) from the given object.
6204         #  @param theObject Shape to be processed.
6205         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6206         #                  removes ALL internal holes of the given object
6207         #  @param theName Object name; when specified, this parameter is used
6208         #         for result publication in the study. Otherwise, if automatic
6209         #         publication is switched on, default value is used for result name.
6210         #
6211         #  @return New GEOM.GEOM_Object, containing processed shape.
6212         #
6213         #  @ref tui_suppress_holes "Example"
6214         def SuppressHoles(self, theObject, theWires, theName=None):
6215             """
6216             Remove internal closed contours (holes) from the given object.
6217
6218             Parameters:
6219                 theObject Shape to be processed.
6220                 theWires Indices of wires to be removed, if EMPTY then the method
6221                          removes ALL internal holes of the given object
6222                 theName Object name; when specified, this parameter is used
6223                         for result publication in the study. Otherwise, if automatic
6224                         publication is switched on, default value is used for result name.
6225
6226             Returns:    
6227                 New GEOM.GEOM_Object, containing processed shape.
6228             """
6229             # Example: see GEOM_TestHealing.py
6230             anObj = self.HealOp.FillHoles(theObject, theWires)
6231             RaiseIfFailed("FillHoles", self.HealOp)
6232             self._autoPublish(anObj, theName, "suppressHoles")
6233             return anObj
6234
6235         ## Close an open wire.
6236         #  @param theObject Shape to be processed.
6237         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6238         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6239         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6240         #                        If False : closure by creation of an edge between ends.
6241         #  @param theName Object name; when specified, this parameter is used
6242         #         for result publication in the study. Otherwise, if automatic
6243         #         publication is switched on, default value is used for result name.
6244         #
6245         #  @return New GEOM.GEOM_Object, containing processed shape.
6246         #
6247         #  @ref tui_close_contour "Example"
6248         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6249             """
6250             Close an open wire.
6251
6252             Parameters: 
6253                 theObject Shape to be processed.
6254                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6255                          if [ ], then theObject itself is a wire.
6256                 isCommonVertex If True  : closure by creation of a common vertex,
6257                                If False : closure by creation of an edge between ends.
6258                 theName Object name; when specified, this parameter is used
6259                         for result publication in the study. Otherwise, if automatic
6260                         publication is switched on, default value is used for result name.
6261
6262             Returns:                      
6263                 New GEOM.GEOM_Object, containing processed shape. 
6264             """
6265             # Example: see GEOM_TestHealing.py
6266             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6267             RaiseIfFailed("CloseContour", self.HealOp)
6268             self._autoPublish(anObj, theName, "closeContour")
6269             return anObj
6270
6271         ## Addition of a point to a given edge object.
6272         #  @param theObject Shape to be processed.
6273         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6274         #                      if -1, then theObject itself is the edge.
6275         #  @param theValue Value of parameter on edge or length parameter,
6276         #                  depending on \a isByParameter.
6277         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6278         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6279         #  @param theName Object name; when specified, this parameter is used
6280         #         for result publication in the study. Otherwise, if automatic
6281         #         publication is switched on, default value is used for result name.
6282         #
6283         #  @return New GEOM.GEOM_Object, containing processed shape.
6284         #
6285         #  @ref tui_add_point_on_edge "Example"
6286         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6287             """
6288             Addition of a point to a given edge object.
6289
6290             Parameters: 
6291                 theObject Shape to be processed.
6292                 theEdgeIndex Index of edge to be divided within theObject's shape,
6293                              if -1, then theObject itself is the edge.
6294                 theValue Value of parameter on edge or length parameter,
6295                          depending on isByParameter.
6296                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6297                               if FALSE : theValue is treated as a length parameter [0..1]
6298                 theName Object name; when specified, this parameter is used
6299                         for result publication in the study. Otherwise, if automatic
6300                         publication is switched on, default value is used for result name.
6301
6302             Returns:  
6303                 New GEOM.GEOM_Object, containing processed shape.
6304             """
6305             # Example: see GEOM_TestHealing.py
6306             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6307             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6308             RaiseIfFailed("DivideEdge", self.HealOp)
6309             anObj.SetParameters(Parameters)
6310             self._autoPublish(anObj, theName, "divideEdge")
6311             return anObj
6312
6313         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6314         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6315         #  @param theVertices A list of vertices to suppress. If the list
6316         #                     is empty, all vertices in a wire will be assumed.
6317         #  @param theName Object name; when specified, this parameter is used
6318         #         for result publication in the study. Otherwise, if automatic
6319         #         publication is switched on, default value is used for result name.
6320         #
6321         #  @return New GEOM.GEOM_Object with modified wire.
6322         #
6323         #  @ref tui_fuse_collinear_edges "Example"
6324         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6325             """
6326             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6327
6328             Parameters: 
6329                 theWire Wire to minimize the number of C1 continuous edges in.
6330                 theVertices A list of vertices to suppress. If the list
6331                             is empty, all vertices in a wire will be assumed.
6332                 theName Object name; when specified, this parameter is used
6333                         for result publication in the study. Otherwise, if automatic
6334                         publication is switched on, default value is used for result name.
6335
6336             Returns:  
6337                 New GEOM.GEOM_Object with modified wire.
6338             """
6339             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6340             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6341             self._autoPublish(anObj, theName, "fuseEdges")
6342             return anObj
6343
6344         ## Change orientation of the given object. Updates given shape.
6345         #  @param theObject Shape to be processed.
6346         #  @return Updated <var>theObject</var>
6347         #
6348         #  @ref swig_todo "Example"
6349         def ChangeOrientationShell(self,theObject):
6350             """
6351             Change orientation of the given object. Updates given shape.
6352
6353             Parameters: 
6354                 theObject Shape to be processed.
6355
6356             Returns:  
6357                 Updated theObject
6358             """
6359             theObject = self.HealOp.ChangeOrientation(theObject)
6360             RaiseIfFailed("ChangeOrientation", self.HealOp)
6361             pass
6362
6363         ## Change orientation of the given object.
6364         #  @param theObject Shape to be processed.
6365         #  @param theName Object name; when specified, this parameter is used
6366         #         for result publication in the study. Otherwise, if automatic
6367         #         publication is switched on, default value is used for result name.
6368         #
6369         #  @return New GEOM.GEOM_Object, containing processed shape.
6370         #
6371         #  @ref swig_todo "Example"
6372         def ChangeOrientationShellCopy(self, theObject, theName=None):
6373             """
6374             Change orientation of the given object.
6375
6376             Parameters:
6377                 theObject Shape to be processed.
6378                 theName Object name; when specified, this parameter is used
6379                         for result publication in the study. Otherwise, if automatic
6380                         publication is switched on, default value is used for result name.
6381
6382             Returns:   
6383                 New GEOM.GEOM_Object, containing processed shape.
6384             """
6385             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6386             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6387             self._autoPublish(anObj, theName, "reversed")
6388             return anObj
6389
6390         ## Try to limit tolerance of the given object by value \a theTolerance.
6391         #  @param theObject Shape to be processed.
6392         #  @param theTolerance Required tolerance value.
6393         #  @param theName Object name; when specified, this parameter is used
6394         #         for result publication in the study. Otherwise, if automatic
6395         #         publication is switched on, default value is used for result name.
6396         #
6397         #  @return New GEOM.GEOM_Object, containing processed shape.
6398         #
6399         #  @ref tui_limit_tolerance "Example"
6400         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6401             """
6402             Try to limit tolerance of the given object by value theTolerance.
6403
6404             Parameters:
6405                 theObject Shape to be processed.
6406                 theTolerance Required tolerance value.
6407                 theName Object name; when specified, this parameter is used
6408                         for result publication in the study. Otherwise, if automatic
6409                         publication is switched on, default value is used for result name.
6410
6411             Returns:   
6412                 New GEOM.GEOM_Object, containing processed shape.
6413             """
6414             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6415             RaiseIfFailed("LimitTolerance", self.HealOp)
6416             self._autoPublish(anObj, theName, "limitTolerance")
6417             return anObj
6418
6419         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6420         #  that constitute a free boundary of the given shape.
6421         #  @param theObject Shape to get free boundary of.
6422         #  @param theName Object name; when specified, this parameter is used
6423         #         for result publication in the study. Otherwise, if automatic
6424         #         publication is switched on, default value is used for result name.
6425         #
6426         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6427         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6428         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6429         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6430         #
6431         #  @ref tui_measurement_tools_page "Example"
6432         def GetFreeBoundary(self, theObject, theName=None):
6433             """
6434             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6435             that constitute a free boundary of the given shape.
6436
6437             Parameters:
6438                 theObject Shape to get free boundary of.
6439                 theName Object name; when specified, this parameter is used
6440                         for result publication in the study. Otherwise, if automatic
6441                         publication is switched on, default value is used for result name.
6442
6443             Returns: 
6444                 [status, theClosedWires, theOpenWires]
6445                  status: FALSE, if an error(s) occured during the method execution.
6446                  theClosedWires: Closed wires on the free boundary of the given shape.
6447                  theOpenWires: Open wires on the free boundary of the given shape.
6448             """
6449             # Example: see GEOM_TestHealing.py
6450             anObj = self.HealOp.GetFreeBoundary(theObject)
6451             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6452             self._autoPublish(anObj[1], theName, "closedWire")
6453             self._autoPublish(anObj[2], theName, "openWire")
6454             return anObj
6455
6456         ## Replace coincident faces in theShape by one face.
6457         #  @param theShape Initial shape.
6458         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6459         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6460         #                         otherwise all initial shapes.
6461         #  @param theName Object name; when specified, this parameter is used
6462         #         for result publication in the study. Otherwise, if automatic
6463         #         publication is switched on, default value is used for result name.
6464         #
6465         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6466         #
6467         #  @ref tui_glue_faces "Example"
6468         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6469             """
6470             Replace coincident faces in theShape by one face.
6471
6472             Parameters:
6473                 theShape Initial shape.
6474                 theTolerance Maximum distance between faces, which can be considered as coincident.
6475                 doKeepNonSolids If FALSE, only solids will present in the result,
6476                                 otherwise all initial shapes.
6477                 theName Object name; when specified, this parameter is used
6478                         for result publication in the study. Otherwise, if automatic
6479                         publication is switched on, default value is used for result name.
6480
6481             Returns:
6482                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6483             """
6484             # Example: see GEOM_Spanner.py
6485             theTolerance,Parameters = ParseParameters(theTolerance)
6486             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6487             if anObj is None:
6488                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6489             anObj.SetParameters(Parameters)
6490             self._autoPublish(anObj, theName, "glueFaces")
6491             return anObj
6492
6493         ## Find coincident faces in theShape for possible gluing.
6494         #  @param theShape Initial shape.
6495         #  @param theTolerance Maximum distance between faces,
6496         #                      which can be considered as coincident.
6497         #  @param theName Object name; when specified, this parameter is used
6498         #         for result publication in the study. Otherwise, if automatic
6499         #         publication is switched on, default value is used for result name.
6500         #
6501         #  @return GEOM.ListOfGO
6502         #
6503         #  @ref tui_glue_faces "Example"
6504         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6505             """
6506             Find coincident faces in theShape for possible gluing.
6507
6508             Parameters:
6509                 theShape Initial shape.
6510                 theTolerance Maximum distance between faces,
6511                              which can be considered as coincident.
6512                 theName Object name; when specified, this parameter is used
6513                         for result publication in the study. Otherwise, if automatic
6514                         publication is switched on, default value is used for result name.
6515
6516             Returns:                    
6517                 GEOM.ListOfGO
6518             """
6519             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6520             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6521             self._autoPublish(anObj, theName, "facesToGlue")
6522             return anObj
6523
6524         ## Replace coincident faces in theShape by one face
6525         #  in compliance with given list of faces
6526         #  @param theShape Initial shape.
6527         #  @param theTolerance Maximum distance between faces,
6528         #                      which can be considered as coincident.
6529         #  @param theFaces List of faces for gluing.
6530         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6531         #                         otherwise all initial shapes.
6532         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6533         #                        will be glued, otherwise only the edges,
6534         #                        belonging to <VAR>theFaces</VAR>.
6535         #  @param theName Object name; when specified, this parameter is used
6536         #         for result publication in the study. Otherwise, if automatic
6537         #         publication is switched on, default value is used for result name.
6538         #
6539         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6540         #          without some faces.
6541         #
6542         #  @ref tui_glue_faces "Example"
6543         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6544                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6545             """
6546             Replace coincident faces in theShape by one face
6547             in compliance with given list of faces
6548
6549             Parameters:
6550                 theShape Initial shape.
6551                 theTolerance Maximum distance between faces,
6552                              which can be considered as coincident.
6553                 theFaces List of faces for gluing.
6554                 doKeepNonSolids If FALSE, only solids will present in the result,
6555                                 otherwise all initial shapes.
6556                 doGlueAllEdges If TRUE, all coincident edges of theShape
6557                                will be glued, otherwise only the edges,
6558                                belonging to theFaces.
6559                 theName Object name; when specified, this parameter is used
6560                         for result publication in the study. Otherwise, if automatic
6561                         publication is switched on, default value is used for result name.
6562
6563             Returns:
6564                 New GEOM.GEOM_Object, containing a copy of theShape
6565                     without some faces.
6566             """
6567             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6568                                                       doKeepNonSolids, doGlueAllEdges)
6569             if anObj is None:
6570                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6571             self._autoPublish(anObj, theName, "glueFaces")
6572             return anObj
6573
6574         ## Replace coincident edges in theShape by one edge.
6575         #  @param theShape Initial shape.
6576         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6577         #  @param theName Object name; when specified, this parameter is used
6578         #         for result publication in the study. Otherwise, if automatic
6579         #         publication is switched on, default value is used for result name.
6580         #
6581         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6582         #
6583         #  @ref tui_glue_edges "Example"
6584         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6585             """
6586             Replace coincident edges in theShape by one edge.
6587
6588             Parameters:
6589                 theShape Initial shape.
6590                 theTolerance Maximum distance between edges, which can be considered as coincident.
6591                 theName Object name; when specified, this parameter is used
6592                         for result publication in the study. Otherwise, if automatic
6593                         publication is switched on, default value is used for result name.
6594
6595             Returns:    
6596                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6597             """
6598             theTolerance,Parameters = ParseParameters(theTolerance)
6599             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6600             if anObj is None:
6601                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6602             anObj.SetParameters(Parameters)
6603             self._autoPublish(anObj, theName, "glueEdges")
6604             return anObj
6605
6606         ## Find coincident edges in theShape for possible gluing.
6607         #  @param theShape Initial shape.
6608         #  @param theTolerance Maximum distance between edges,
6609         #                      which can be considered as coincident.
6610         #  @param theName Object name; when specified, this parameter is used
6611         #         for result publication in the study. Otherwise, if automatic
6612         #         publication is switched on, default value is used for result name.
6613         #
6614         #  @return GEOM.ListOfGO
6615         #
6616         #  @ref tui_glue_edges "Example"
6617         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6618             """
6619             Find coincident edges in theShape for possible gluing.
6620
6621             Parameters:
6622                 theShape Initial shape.
6623                 theTolerance Maximum distance between edges,
6624                              which can be considered as coincident.
6625                 theName Object name; when specified, this parameter is used
6626                         for result publication in the study. Otherwise, if automatic
6627                         publication is switched on, default value is used for result name.
6628
6629             Returns:                         
6630                 GEOM.ListOfGO
6631             """
6632             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6633             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6634             self._autoPublish(anObj, theName, "edgesToGlue")
6635             return anObj
6636
6637         ## Replace coincident edges in theShape by one edge
6638         #  in compliance with given list of edges.
6639         #  @param theShape Initial shape.
6640         #  @param theTolerance Maximum distance between edges,
6641         #                      which can be considered as coincident.
6642         #  @param theEdges List of edges for gluing.
6643         #  @param theName Object name; when specified, this parameter is used
6644         #         for result publication in the study. Otherwise, if automatic
6645         #         publication is switched on, default value is used for result name.
6646         #
6647         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6648         #          without some edges.
6649         #
6650         #  @ref tui_glue_edges "Example"
6651         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6652             """
6653             Replace coincident edges in theShape by one edge
6654             in compliance with given list of edges.
6655
6656             Parameters:
6657                 theShape Initial shape.
6658                 theTolerance Maximum distance between edges,
6659                              which can be considered as coincident.
6660                 theEdges List of edges for gluing.
6661                 theName Object name; when specified, this parameter is used
6662                         for result publication in the study. Otherwise, if automatic
6663                         publication is switched on, default value is used for result name.
6664
6665             Returns:  
6666                 New GEOM.GEOM_Object, containing a copy of theShape
6667                 without some edges.
6668             """
6669             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6670             if anObj is None:
6671                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6672             self._autoPublish(anObj, theName, "glueEdges")
6673             return anObj
6674
6675         # end of l3_healing
6676         ## @}
6677
6678         ## @addtogroup l3_boolean Boolean Operations
6679         ## @{
6680
6681         # -----------------------------------------------------------------------------
6682         # Boolean (Common, Cut, Fuse, Section)
6683         # -----------------------------------------------------------------------------
6684
6685         ## Perform one of boolean operations on two given shapes.
6686         #  @param theShape1 First argument for boolean operation.
6687         #  @param theShape2 Second argument for boolean operation.
6688         #  @param theOperation Indicates the operation to be done:\n
6689         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6690         #  @param checkSelfInte The flag that tells if the arguments should
6691         #         be checked for self-intersection prior to the operation.
6692         #  @param theName Object name; when specified, this parameter is used
6693         #         for result publication in the study. Otherwise, if automatic
6694         #         publication is switched on, default value is used for result name.
6695         #
6696         #  @note This algorithm doesn't find all types of self-intersections.
6697         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6698         #        vertex/face and edge/face intersections. Face/face
6699         #        intersections detection is switched off as it is a
6700         #        time-consuming operation that gives an impact on performance.
6701         #        To find all self-intersections please use
6702         #        CheckSelfIntersections() method.
6703         #
6704         #  @return New GEOM.GEOM_Object, containing the result shape.
6705         #
6706         #  @ref tui_fuse "Example"
6707         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
6708             """
6709             Perform one of boolean operations on two given shapes.
6710
6711             Parameters: 
6712                 theShape1 First argument for boolean operation.
6713                 theShape2 Second argument for boolean operation.
6714                 theOperation Indicates the operation to be done:
6715                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6716                 checkSelfInte The flag that tells if the arguments should
6717                               be checked for self-intersection prior to
6718                               the operation.
6719                 theName Object name; when specified, this parameter is used
6720                         for result publication in the study. Otherwise, if automatic
6721                         publication is switched on, default value is used for result name.
6722
6723             Note:
6724                     This algorithm doesn't find all types of self-intersections.
6725                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6726                     vertex/face and edge/face intersections. Face/face
6727                     intersections detection is switched off as it is a
6728                     time-consuming operation that gives an impact on performance.
6729                     To find all self-intersections please use
6730                     CheckSelfIntersections() method.
6731
6732             Returns:   
6733                 New GEOM.GEOM_Object, containing the result shape.
6734             """
6735             # Example: see GEOM_TestAll.py
6736             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
6737             RaiseIfFailed("MakeBoolean", self.BoolOp)
6738             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
6739             self._autoPublish(anObj, theName, def_names[theOperation])
6740             return anObj
6741
6742         ## Perform Common boolean operation on two given shapes.
6743         #  @param theShape1 First argument for boolean operation.
6744         #  @param theShape2 Second argument for boolean operation.
6745         #  @param checkSelfInte The flag that tells if the arguments should
6746         #         be checked for self-intersection prior to the operation.
6747         #  @param theName Object name; when specified, this parameter is used
6748         #         for result publication in the study. Otherwise, if automatic
6749         #         publication is switched on, default value is used for result name.
6750         #
6751         #  @note This algorithm doesn't find all types of self-intersections.
6752         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6753         #        vertex/face and edge/face intersections. Face/face
6754         #        intersections detection is switched off as it is a
6755         #        time-consuming operation that gives an impact on performance.
6756         #        To find all self-intersections please use
6757         #        CheckSelfIntersections() method.
6758         #
6759         #  @return New GEOM.GEOM_Object, containing the result shape.
6760         #
6761         #  @ref tui_common "Example 1"
6762         #  \n @ref swig_MakeCommon "Example 2"
6763         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6764             """
6765             Perform Common boolean operation on two given shapes.
6766
6767             Parameters: 
6768                 theShape1 First argument for boolean operation.
6769                 theShape2 Second argument for boolean operation.
6770                 checkSelfInte The flag that tells if the arguments should
6771                               be checked for self-intersection prior to
6772                               the operation.
6773                 theName Object name; when specified, this parameter is used
6774                         for result publication in the study. Otherwise, if automatic
6775                         publication is switched on, default value is used for result name.
6776
6777             Note:
6778                     This algorithm doesn't find all types of self-intersections.
6779                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6780                     vertex/face and edge/face intersections. Face/face
6781                     intersections detection is switched off as it is a
6782                     time-consuming operation that gives an impact on performance.
6783                     To find all self-intersections please use
6784                     CheckSelfIntersections() method.
6785
6786             Returns:   
6787                 New GEOM.GEOM_Object, containing the result shape.
6788             """
6789             # Example: see GEOM_TestOthers.py
6790             # note: auto-publishing is done in self.MakeBoolean()
6791             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
6792
6793         ## Perform Cut boolean operation on two given shapes.
6794         #  @param theShape1 First argument for boolean operation.
6795         #  @param theShape2 Second argument for boolean operation.
6796         #  @param checkSelfInte The flag that tells if the arguments should
6797         #         be checked for self-intersection prior to the operation.
6798         #  @param theName Object name; when specified, this parameter is used
6799         #         for result publication in the study. Otherwise, if automatic
6800         #         publication is switched on, default value is used for result name.
6801         #
6802         #  @note This algorithm doesn't find all types of self-intersections.
6803         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6804         #        vertex/face and edge/face intersections. Face/face
6805         #        intersections detection is switched off as it is a
6806         #        time-consuming operation that gives an impact on performance.
6807         #        To find all self-intersections please use
6808         #        CheckSelfIntersections() method.
6809         #
6810         #  @return New GEOM.GEOM_Object, containing the result shape.
6811         #
6812         #  @ref tui_cut "Example 1"
6813         #  \n @ref swig_MakeCommon "Example 2"
6814         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6815             """
6816             Perform Cut boolean operation on two given shapes.
6817
6818             Parameters: 
6819                 theShape1 First argument for boolean operation.
6820                 theShape2 Second argument for boolean operation.
6821                 checkSelfInte The flag that tells if the arguments should
6822                               be checked for self-intersection prior to
6823                               the operation.
6824                 theName Object name; when specified, this parameter is used
6825                         for result publication in the study. Otherwise, if automatic
6826                         publication is switched on, default value is used for result name.
6827
6828             Note:
6829                     This algorithm doesn't find all types of self-intersections.
6830                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6831                     vertex/face and edge/face intersections. Face/face
6832                     intersections detection is switched off as it is a
6833                     time-consuming operation that gives an impact on performance.
6834                     To find all self-intersections please use
6835                     CheckSelfIntersections() method.
6836
6837             Returns:   
6838                 New GEOM.GEOM_Object, containing the result shape.
6839             
6840             """
6841             # Example: see GEOM_TestOthers.py
6842             # note: auto-publishing is done in self.MakeBoolean()
6843             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
6844
6845         ## Perform Fuse boolean operation on two given shapes.
6846         #  @param theShape1 First argument for boolean operation.
6847         #  @param theShape2 Second argument for boolean operation.
6848         #  @param checkSelfInte The flag that tells if the arguments should
6849         #         be checked for self-intersection prior to the operation.
6850         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
6851         #         operation should be performed during the operation.
6852         #  @param theName Object name; when specified, this parameter is used
6853         #         for result publication in the study. Otherwise, if automatic
6854         #         publication is switched on, default value is used for result name.
6855         #
6856         #  @note This algorithm doesn't find all types of self-intersections.
6857         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6858         #        vertex/face and edge/face intersections. Face/face
6859         #        intersections detection is switched off as it is a
6860         #        time-consuming operation that gives an impact on performance.
6861         #        To find all self-intersections please use
6862         #        CheckSelfIntersections() method.
6863         #
6864         #  @return New GEOM.GEOM_Object, containing the result shape.
6865         #
6866         #  @ref tui_fuse "Example 1"
6867         #  \n @ref swig_MakeCommon "Example 2"
6868         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
6869                      rmExtraEdges=False, theName=None):
6870             """
6871             Perform Fuse boolean operation on two given shapes.
6872
6873             Parameters: 
6874                 theShape1 First argument for boolean operation.
6875                 theShape2 Second argument for boolean operation.
6876                 checkSelfInte The flag that tells if the arguments should
6877                               be checked for self-intersection prior to
6878                               the operation.
6879                 rmExtraEdges The flag that tells if Remove Extra Edges
6880                              operation should be performed during the operation.
6881                 theName Object name; when specified, this parameter is used
6882                         for result publication in the study. Otherwise, if automatic
6883                         publication is switched on, default value is used for result name.
6884
6885             Note:
6886                     This algorithm doesn't find all types of self-intersections.
6887                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6888                     vertex/face and edge/face intersections. Face/face
6889                     intersections detection is switched off as it is a
6890                     time-consuming operation that gives an impact on performance.
6891                     To find all self-intersections please use
6892                     CheckSelfIntersections() method.
6893
6894             Returns:   
6895                 New GEOM.GEOM_Object, containing the result shape.
6896             
6897             """
6898             # Example: see GEOM_TestOthers.py
6899             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
6900                                          checkSelfInte, rmExtraEdges)
6901             RaiseIfFailed("MakeFuse", self.BoolOp)
6902             self._autoPublish(anObj, theName, "fuse")
6903             return anObj
6904
6905         ## Perform Section boolean operation on two given shapes.
6906         #  @param theShape1 First argument for boolean operation.
6907         #  @param theShape2 Second argument for boolean operation.
6908         #  @param checkSelfInte The flag that tells if the arguments should
6909         #         be checked for self-intersection prior to the operation.
6910         #  @param theName Object name; when specified, this parameter is used
6911         #         for result publication in the study. Otherwise, if automatic
6912         #         publication is switched on, default value is used for result name.
6913         #
6914         #  @note This algorithm doesn't find all types of self-intersections.
6915         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6916         #        vertex/face and edge/face intersections. Face/face
6917         #        intersections detection is switched off as it is a
6918         #        time-consuming operation that gives an impact on performance.
6919         #        To find all self-intersections please use
6920         #        CheckSelfIntersections() method.
6921         #
6922         #  @return New GEOM.GEOM_Object, containing the result shape.
6923         #
6924         #  @ref tui_section "Example 1"
6925         #  \n @ref swig_MakeCommon "Example 2"
6926         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6927             """
6928             Perform Section boolean operation on two given shapes.
6929
6930             Parameters: 
6931                 theShape1 First argument for boolean operation.
6932                 theShape2 Second argument for boolean operation.
6933                 checkSelfInte The flag that tells if the arguments should
6934                               be checked for self-intersection prior to
6935                               the operation.
6936                 theName Object name; when specified, this parameter is used
6937                         for result publication in the study. Otherwise, if automatic
6938                         publication is switched on, default value is used for result name.
6939
6940             Note:
6941                     This algorithm doesn't find all types of self-intersections.
6942                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6943                     vertex/face and edge/face intersections. Face/face
6944                     intersections detection is switched off as it is a
6945                     time-consuming operation that gives an impact on performance.
6946                     To find all self-intersections please use
6947                     CheckSelfIntersections() method.
6948
6949             Returns:   
6950                 New GEOM.GEOM_Object, containing the result shape.
6951             
6952             """
6953             # Example: see GEOM_TestOthers.py
6954             # note: auto-publishing is done in self.MakeBoolean()
6955             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
6956
6957         ## Perform Fuse boolean operation on the list of shapes.
6958         #  @param theShapesList Shapes to be fused.
6959         #  @param checkSelfInte The flag that tells if the arguments should
6960         #         be checked for self-intersection prior to the operation.
6961         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
6962         #         operation should be performed during the operation.
6963         #  @param theName Object name; when specified, this parameter is used
6964         #         for result publication in the study. Otherwise, if automatic
6965         #         publication is switched on, default value is used for result name.
6966         #
6967         #  @note This algorithm doesn't find all types of self-intersections.
6968         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6969         #        vertex/face and edge/face intersections. Face/face
6970         #        intersections detection is switched off as it is a
6971         #        time-consuming operation that gives an impact on performance.
6972         #        To find all self-intersections please use
6973         #        CheckSelfIntersections() method.
6974         #
6975         #  @return New GEOM.GEOM_Object, containing the result shape.
6976         #
6977         #  @ref tui_fuse "Example 1"
6978         #  \n @ref swig_MakeCommon "Example 2"
6979         def MakeFuseList(self, theShapesList, checkSelfInte=False,
6980                          rmExtraEdges=False, theName=None):
6981             """
6982             Perform Fuse boolean operation on the list of shapes.
6983
6984             Parameters: 
6985                 theShapesList Shapes to be fused.
6986                 checkSelfInte The flag that tells if the arguments should
6987                               be checked for self-intersection prior to
6988                               the operation.
6989                 rmExtraEdges The flag that tells if Remove Extra Edges
6990                              operation should be performed during the operation.
6991                 theName Object name; when specified, this parameter is used
6992                         for result publication in the study. Otherwise, if automatic
6993                         publication is switched on, default value is used for result name.
6994
6995             Note:
6996                     This algorithm doesn't find all types of self-intersections.
6997                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6998                     vertex/face and edge/face intersections. Face/face
6999                     intersections detection is switched off as it is a
7000                     time-consuming operation that gives an impact on performance.
7001                     To find all self-intersections please use
7002                     CheckSelfIntersections() method.
7003
7004             Returns:   
7005                 New GEOM.GEOM_Object, containing the result shape.
7006             
7007             """
7008             # Example: see GEOM_TestOthers.py
7009             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
7010                                              rmExtraEdges)
7011             RaiseIfFailed("MakeFuseList", self.BoolOp)
7012             self._autoPublish(anObj, theName, "fuse")
7013             return anObj
7014
7015         ## Perform Common boolean operation on the list of shapes.
7016         #  @param theShapesList Shapes for Common operation.
7017         #  @param checkSelfInte The flag that tells if the arguments should
7018         #         be checked for self-intersection prior to the operation.
7019         #  @param theName Object name; when specified, this parameter is used
7020         #         for result publication in the study. Otherwise, if automatic
7021         #         publication is switched on, default value is used for result name.
7022         #
7023         #  @note This algorithm doesn't find all types of self-intersections.
7024         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7025         #        vertex/face and edge/face intersections. Face/face
7026         #        intersections detection is switched off as it is a
7027         #        time-consuming operation that gives an impact on performance.
7028         #        To find all self-intersections please use
7029         #        CheckSelfIntersections() method.
7030         #
7031         #  @return New GEOM.GEOM_Object, containing the result shape.
7032         #
7033         #  @ref tui_common "Example 1"
7034         #  \n @ref swig_MakeCommon "Example 2"
7035         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
7036             """
7037             Perform Common boolean operation on the list of shapes.
7038
7039             Parameters: 
7040                 theShapesList Shapes for Common operation.
7041                 checkSelfInte The flag that tells if the arguments should
7042                               be checked for self-intersection prior to
7043                               the operation.
7044                 theName Object name; when specified, this parameter is used
7045                         for result publication in the study. Otherwise, if automatic
7046                         publication is switched on, default value is used for result name.
7047
7048             Note:
7049                     This algorithm doesn't find all types of self-intersections.
7050                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7051                     vertex/face and edge/face intersections. Face/face
7052                     intersections detection is switched off as it is a
7053                     time-consuming operation that gives an impact on performance.
7054                     To find all self-intersections please use
7055                     CheckSelfIntersections() method.
7056
7057             Returns:   
7058                 New GEOM.GEOM_Object, containing the result shape.
7059             
7060             """
7061             # Example: see GEOM_TestOthers.py
7062             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
7063             RaiseIfFailed("MakeCommonList", self.BoolOp)
7064             self._autoPublish(anObj, theName, "common")
7065             return anObj
7066
7067         ## Perform Cut boolean operation on one object and the list of tools.
7068         #  @param theMainShape The object of the operation.
7069         #  @param theShapesList The list of tools of the operation.
7070         #  @param checkSelfInte The flag that tells if the arguments should
7071         #         be checked for self-intersection prior to the operation.
7072         #  @param theName Object name; when specified, this parameter is used
7073         #         for result publication in the study. Otherwise, if automatic
7074         #         publication is switched on, default value is used for result name.
7075         #
7076         #  @note This algorithm doesn't find all types of self-intersections.
7077         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7078         #        vertex/face and edge/face intersections. Face/face
7079         #        intersections detection is switched off as it is a
7080         #        time-consuming operation that gives an impact on performance.
7081         #        To find all self-intersections please use
7082         #        CheckSelfIntersections() method.
7083         #
7084         #  @return New GEOM.GEOM_Object, containing the result shape.
7085         #
7086         #  @ref tui_cut "Example 1"
7087         #  \n @ref swig_MakeCommon "Example 2"
7088         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
7089             """
7090             Perform Cut boolean operation on one object and the list of tools.
7091
7092             Parameters: 
7093                 theMainShape The object of the operation.
7094                 theShapesList The list of tools of the operation.
7095                 checkSelfInte The flag that tells if the arguments should
7096                               be checked for self-intersection prior to
7097                               the operation.
7098                 theName Object name; when specified, this parameter is used
7099                         for result publication in the study. Otherwise, if automatic
7100                         publication is switched on, default value is used for result name.
7101
7102             Note:
7103                     This algorithm doesn't find all types of self-intersections.
7104                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7105                     vertex/face and edge/face intersections. Face/face
7106                     intersections detection is switched off as it is a
7107                     time-consuming operation that gives an impact on performance.
7108                     To find all self-intersections please use
7109                     CheckSelfIntersections() method.
7110
7111             Returns:   
7112                 New GEOM.GEOM_Object, containing the result shape.
7113             
7114             """
7115             # Example: see GEOM_TestOthers.py
7116             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
7117             RaiseIfFailed("MakeCutList", self.BoolOp)
7118             self._autoPublish(anObj, theName, "cut")
7119             return anObj
7120
7121         # end of l3_boolean
7122         ## @}
7123
7124         ## @addtogroup l3_basic_op
7125         ## @{
7126
7127         ## Perform partition operation.
7128         #  @param ListShapes Shapes to be intersected.
7129         #  @param ListTools Shapes to intersect theShapes.
7130         #  @param Limit Type of resulting shapes (see ShapeType()).\n
7131         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
7132         #         type will be detected automatically.
7133         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
7134         #                             target type (equal to Limit) are kept in the result,
7135         #                             else standalone shapes of lower dimension
7136         #                             are kept also (if they exist).
7137         #
7138         #  @param theName Object name; when specified, this parameter is used
7139         #         for result publication in the study. Otherwise, if automatic
7140         #         publication is switched on, default value is used for result name.
7141         #
7142         #  @note Each compound from ListShapes and ListTools will be exploded
7143         #        in order to avoid possible intersection between shapes from this compound.
7144         #
7145         #  After implementation new version of PartitionAlgo (October 2006)
7146         #  other parameters are ignored by current functionality. They are kept
7147         #  in this function only for support old versions.
7148         #      @param ListKeepInside Shapes, outside which the results will be deleted.
7149         #         Each shape from theKeepInside must belong to theShapes also.
7150         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
7151         #         Each shape from theRemoveInside must belong to theShapes also.
7152         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
7153         #      @param ListMaterials Material indices for each shape. Make sence,
7154         #         only if theRemoveWebs is TRUE.
7155         #
7156         #  @return New GEOM.GEOM_Object, containing the result shapes.
7157         #
7158         #  @ref tui_partition "Example"
7159         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7160                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7161                           KeepNonlimitShapes=0, theName=None):
7162             """
7163             Perform partition operation.
7164
7165             Parameters: 
7166                 ListShapes Shapes to be intersected.
7167                 ListTools Shapes to intersect theShapes.
7168                 Limit Type of resulting shapes (see geompy.ShapeType)
7169                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
7170                       type will be detected automatically.
7171                 KeepNonlimitShapes if this parameter == 0, then only shapes of
7172                                     target type (equal to Limit) are kept in the result,
7173                                     else standalone shapes of lower dimension
7174                                     are kept also (if they exist).
7175
7176                 theName Object name; when specified, this parameter is used
7177                         for result publication in the study. Otherwise, if automatic
7178                         publication is switched on, default value is used for result name.
7179             Note:
7180                     Each compound from ListShapes and ListTools will be exploded
7181                     in order to avoid possible intersection between shapes from
7182                     this compound.
7183                     
7184             After implementation new version of PartitionAlgo (October 2006) other
7185             parameters are ignored by current functionality. They are kept in this
7186             function only for support old versions.
7187             
7188             Ignored parameters:
7189                 ListKeepInside Shapes, outside which the results will be deleted.
7190                                Each shape from theKeepInside must belong to theShapes also.
7191                 ListRemoveInside Shapes, inside which the results will be deleted.
7192                                  Each shape from theRemoveInside must belong to theShapes also.
7193                 RemoveWebs If TRUE, perform Glue 3D algorithm.
7194                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
7195
7196             Returns:   
7197                 New GEOM.GEOM_Object, containing the result shapes.
7198             """
7199             # Example: see GEOM_TestAll.py
7200             if Limit == self.ShapeType["AUTO"]:
7201                 # automatic detection of the most appropriate shape limit type
7202                 lim = GEOM.SHAPE
7203                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7204                 Limit = EnumToLong(lim)
7205                 pass
7206             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
7207                                               ListKeepInside, ListRemoveInside,
7208                                               Limit, RemoveWebs, ListMaterials,
7209                                               KeepNonlimitShapes);
7210             RaiseIfFailed("MakePartition", self.BoolOp)
7211             self._autoPublish(anObj, theName, "partition")
7212             return anObj
7213
7214         ## Perform partition operation.
7215         #  This method may be useful if it is needed to make a partition for
7216         #  compound contains nonintersected shapes. Performance will be better
7217         #  since intersection between shapes from compound is not performed.
7218         #
7219         #  Description of all parameters as in previous method MakePartition().
7220         #  One additional parameter is provided:
7221         #  @param checkSelfInte The flag that tells if the arguments should
7222         #         be checked for self-intersection prior to the operation.
7223         #
7224         #  @note This algorithm doesn't find all types of self-intersections.
7225         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7226         #        vertex/face and edge/face intersections. Face/face
7227         #        intersections detection is switched off as it is a
7228         #        time-consuming operation that gives an impact on performance.
7229         #        To find all self-intersections please use
7230         #        CheckSelfIntersections() method.
7231         #
7232         #  @note Passed compounds (via ListShapes or via ListTools)
7233         #           have to consist of nonintersecting shapes.
7234         #
7235         #  @return New GEOM.GEOM_Object, containing the result shapes.
7236         #
7237         #  @ref swig_todo "Example"
7238         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
7239                                                  ListKeepInside=[], ListRemoveInside=[],
7240                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
7241                                                  ListMaterials=[], KeepNonlimitShapes=0,
7242                                                  checkSelfInte=False, theName=None):
7243             """
7244             Perform partition operation.
7245             This method may be useful if it is needed to make a partition for
7246             compound contains nonintersected shapes. Performance will be better
7247             since intersection between shapes from compound is not performed.
7248
7249             Parameters: 
7250                 Description of all parameters as in method geompy.MakePartition.
7251                 One additional parameter is provided:
7252                 checkSelfInte The flag that tells if the arguments should
7253                               be checked for self-intersection prior to
7254                               the operation.
7255
7256             Note:
7257                     This algorithm doesn't find all types of self-intersections.
7258                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7259                     vertex/face and edge/face intersections. Face/face
7260                     intersections detection is switched off as it is a
7261                     time-consuming operation that gives an impact on performance.
7262                     To find all self-intersections please use
7263                     CheckSelfIntersections() method.
7264         
7265             NOTE:
7266                 Passed compounds (via ListShapes or via ListTools)
7267                 have to consist of nonintersecting shapes.
7268
7269             Returns:   
7270                 New GEOM.GEOM_Object, containing the result shapes.
7271             """
7272             if Limit == self.ShapeType["AUTO"]:
7273                 # automatic detection of the most appropriate shape limit type
7274                 lim = GEOM.SHAPE
7275                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7276                 Limit = EnumToLong(lim)
7277                 pass
7278             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
7279                                                                      ListKeepInside, ListRemoveInside,
7280                                                                      Limit, RemoveWebs, ListMaterials,
7281                                                                      KeepNonlimitShapes, checkSelfInte);
7282             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
7283             self._autoPublish(anObj, theName, "partition")
7284             return anObj
7285
7286         ## See method MakePartition() for more information.
7287         #
7288         #  @ref tui_partition "Example 1"
7289         #  \n @ref swig_Partition "Example 2"
7290         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7291                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7292                       KeepNonlimitShapes=0, theName=None):
7293             """
7294             See method geompy.MakePartition for more information.
7295             """
7296             # Example: see GEOM_TestOthers.py
7297             # note: auto-publishing is done in self.MakePartition()
7298             anObj = self.MakePartition(ListShapes, ListTools,
7299                                        ListKeepInside, ListRemoveInside,
7300                                        Limit, RemoveWebs, ListMaterials,
7301                                        KeepNonlimitShapes, theName);
7302             return anObj
7303
7304         ## Perform partition of the Shape with the Plane
7305         #  @param theShape Shape to be intersected.
7306         #  @param thePlane Tool shape, to intersect theShape.
7307         #  @param theName Object name; when specified, this parameter is used
7308         #         for result publication in the study. Otherwise, if automatic
7309         #         publication is switched on, default value is used for result name.
7310         #
7311         #  @return New GEOM.GEOM_Object, containing the result shape.
7312         #
7313         #  @ref tui_partition "Example"
7314         def MakeHalfPartition(self, theShape, thePlane, theName=None):
7315             """
7316             Perform partition of the Shape with the Plane
7317
7318             Parameters: 
7319                 theShape Shape to be intersected.
7320                 thePlane Tool shape, to intersect theShape.
7321                 theName Object name; when specified, this parameter is used
7322                         for result publication in the study. Otherwise, if automatic
7323                         publication is switched on, default value is used for result name.
7324
7325             Returns:  
7326                 New GEOM.GEOM_Object, containing the result shape.
7327             """
7328             # Example: see GEOM_TestAll.py
7329             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
7330             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7331             self._autoPublish(anObj, theName, "partition")
7332             return anObj
7333
7334         # end of l3_basic_op
7335         ## @}
7336
7337         ## @addtogroup l3_transform
7338         ## @{
7339
7340         ## Translate the given object along the vector, specified
7341         #  by its end points.
7342         #  @param theObject The object to be translated.
7343         #  @param thePoint1 Start point of translation vector.
7344         #  @param thePoint2 End point of translation vector.
7345         #  @param theCopy Flag used to translate object itself or create a copy.
7346         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7347         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7348         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7349             """
7350             Translate the given object along the vector, specified by its end points.
7351
7352             Parameters: 
7353                 theObject The object to be translated.
7354                 thePoint1 Start point of translation vector.
7355                 thePoint2 End point of translation vector.
7356                 theCopy Flag used to translate object itself or create a copy.
7357
7358             Returns: 
7359                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7360                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7361             """
7362             if theCopy:
7363                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7364             else:
7365                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7366             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7367             return anObj
7368
7369         ## Translate the given object along the vector, specified
7370         #  by its end points, creating its copy before the translation.
7371         #  @param theObject The object to be translated.
7372         #  @param thePoint1 Start point of translation vector.
7373         #  @param thePoint2 End point of translation vector.
7374         #  @param theName Object name; when specified, this parameter is used
7375         #         for result publication in the study. Otherwise, if automatic
7376         #         publication is switched on, default value is used for result name.
7377         #
7378         #  @return New GEOM.GEOM_Object, containing the translated object.
7379         #
7380         #  @ref tui_translation "Example 1"
7381         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7382         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7383             """
7384             Translate the given object along the vector, specified
7385             by its end points, creating its copy before the translation.
7386
7387             Parameters: 
7388                 theObject The object to be translated.
7389                 thePoint1 Start point of translation vector.
7390                 thePoint2 End point of translation vector.
7391                 theName Object name; when specified, this parameter is used
7392                         for result publication in the study. Otherwise, if automatic
7393                         publication is switched on, default value is used for result name.
7394
7395             Returns:  
7396                 New GEOM.GEOM_Object, containing the translated object.
7397             """
7398             # Example: see GEOM_TestAll.py
7399             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7400             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7401             self._autoPublish(anObj, theName, "translated")
7402             return anObj
7403
7404         ## Translate the given object along the vector, specified by its components.
7405         #  @param theObject The object to be translated.
7406         #  @param theDX,theDY,theDZ Components of translation vector.
7407         #  @param theCopy Flag used to translate object itself or create a copy.
7408         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7409         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7410         #
7411         #  @ref tui_translation "Example"
7412         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7413             """
7414             Translate the given object along the vector, specified by its components.
7415
7416             Parameters: 
7417                 theObject The object to be translated.
7418                 theDX,theDY,theDZ Components of translation vector.
7419                 theCopy Flag used to translate object itself or create a copy.
7420
7421             Returns: 
7422                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7423                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7424             """
7425             # Example: see GEOM_TestAll.py
7426             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7427             if theCopy:
7428                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7429             else:
7430                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7431             anObj.SetParameters(Parameters)
7432             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7433             return anObj
7434
7435         ## Translate the given object along the vector, specified
7436         #  by its components, creating its copy before the translation.
7437         #  @param theObject The object to be translated.
7438         #  @param theDX,theDY,theDZ Components of translation vector.
7439         #  @param theName Object name; when specified, this parameter is used
7440         #         for result publication in the study. Otherwise, if automatic
7441         #         publication is switched on, default value is used for result name.
7442         #
7443         #  @return New GEOM.GEOM_Object, containing the translated object.
7444         #
7445         #  @ref tui_translation "Example"
7446         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7447             """
7448             Translate the given object along the vector, specified
7449             by its components, creating its copy before the translation.
7450
7451             Parameters: 
7452                 theObject The object to be translated.
7453                 theDX,theDY,theDZ Components of translation vector.
7454                 theName Object name; when specified, this parameter is used
7455                         for result publication in the study. Otherwise, if automatic
7456                         publication is switched on, default value is used for result name.
7457
7458             Returns: 
7459                 New GEOM.GEOM_Object, containing the translated object.
7460             """
7461             # Example: see GEOM_TestAll.py
7462             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7463             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7464             anObj.SetParameters(Parameters)
7465             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7466             self._autoPublish(anObj, theName, "translated")
7467             return anObj
7468
7469         ## Translate the given object along the given vector.
7470         #  @param theObject The object to be translated.
7471         #  @param theVector The translation vector.
7472         #  @param theCopy Flag used to translate object itself or create a copy.
7473         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7474         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7475         def TranslateVector(self, theObject, theVector, theCopy=False):
7476             """
7477             Translate the given object along the given vector.
7478
7479             Parameters: 
7480                 theObject The object to be translated.
7481                 theVector The translation vector.
7482                 theCopy Flag used to translate object itself or create a copy.
7483
7484             Returns: 
7485                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7486                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7487             """
7488             if theCopy:
7489                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7490             else:
7491                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7492             RaiseIfFailed("TranslateVector", self.TrsfOp)
7493             return anObj
7494
7495         ## Translate the given object along the given vector,
7496         #  creating its copy before the translation.
7497         #  @param theObject The object to be translated.
7498         #  @param theVector The translation vector.
7499         #  @param theName Object name; when specified, this parameter is used
7500         #         for result publication in the study. Otherwise, if automatic
7501         #         publication is switched on, default value is used for result name.
7502         #
7503         #  @return New GEOM.GEOM_Object, containing the translated object.
7504         #
7505         #  @ref tui_translation "Example"
7506         def MakeTranslationVector(self, theObject, theVector, theName=None):
7507             """
7508             Translate the given object along the given vector,
7509             creating its copy before the translation.
7510
7511             Parameters: 
7512                 theObject The object to be translated.
7513                 theVector The translation vector.
7514                 theName Object name; when specified, this parameter is used
7515                         for result publication in the study. Otherwise, if automatic
7516                         publication is switched on, default value is used for result name.
7517
7518             Returns: 
7519                 New GEOM.GEOM_Object, containing the translated object.
7520             """
7521             # Example: see GEOM_TestAll.py
7522             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7523             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7524             self._autoPublish(anObj, theName, "translated")
7525             return anObj
7526
7527         ## Translate the given object along the given vector on given distance.
7528         #  @param theObject The object to be translated.
7529         #  @param theVector The translation vector.
7530         #  @param theDistance The translation distance.
7531         #  @param theCopy Flag used to translate object itself or create a copy.
7532         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7533         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7534         #
7535         #  @ref tui_translation "Example"
7536         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7537             """
7538             Translate the given object along the given vector on given distance.
7539
7540             Parameters: 
7541                 theObject The object to be translated.
7542                 theVector The translation vector.
7543                 theDistance The translation distance.
7544                 theCopy Flag used to translate object itself or create a copy.
7545
7546             Returns: 
7547                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7548                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7549             """
7550             # Example: see GEOM_TestAll.py
7551             theDistance,Parameters = ParseParameters(theDistance)
7552             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7553             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7554             anObj.SetParameters(Parameters)
7555             return anObj
7556
7557         ## Translate the given object along the given vector on given distance,
7558         #  creating its copy before the translation.
7559         #  @param theObject The object to be translated.
7560         #  @param theVector The translation vector.
7561         #  @param theDistance The translation distance.
7562         #  @param theName Object name; when specified, this parameter is used
7563         #         for result publication in the study. Otherwise, if automatic
7564         #         publication is switched on, default value is used for result name.
7565         #
7566         #  @return New GEOM.GEOM_Object, containing the translated object.
7567         #
7568         #  @ref tui_translation "Example"
7569         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7570             """
7571             Translate the given object along the given vector on given distance,
7572             creating its copy before the translation.
7573
7574             Parameters:
7575                 theObject The object to be translated.
7576                 theVector The translation vector.
7577                 theDistance The translation distance.
7578                 theName Object name; when specified, this parameter is used
7579                         for result publication in the study. Otherwise, if automatic
7580                         publication is switched on, default value is used for result name.
7581
7582             Returns: 
7583                 New GEOM.GEOM_Object, containing the translated object.
7584             """
7585             # Example: see GEOM_TestAll.py
7586             theDistance,Parameters = ParseParameters(theDistance)
7587             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7588             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7589             anObj.SetParameters(Parameters)
7590             self._autoPublish(anObj, theName, "translated")
7591             return anObj
7592
7593         ## Rotate the given object around the given axis on the given angle.
7594         #  @param theObject The object to be rotated.
7595         #  @param theAxis Rotation axis.
7596         #  @param theAngle Rotation angle in radians.
7597         #  @param theCopy Flag used to rotate object itself or create a copy.
7598         #
7599         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7600         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7601         #
7602         #  @ref tui_rotation "Example"
7603         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7604             """
7605             Rotate the given object around the given axis on the given angle.
7606
7607             Parameters:
7608                 theObject The object to be rotated.
7609                 theAxis Rotation axis.
7610                 theAngle Rotation angle in radians.
7611                 theCopy Flag used to rotate object itself or create a copy.
7612
7613             Returns:
7614                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7615                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7616             """
7617             # Example: see GEOM_TestAll.py
7618             flag = False
7619             if isinstance(theAngle,str):
7620                 flag = True
7621             theAngle, Parameters = ParseParameters(theAngle)
7622             if flag:
7623                 theAngle = theAngle*math.pi/180.0
7624             if theCopy:
7625                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7626             else:
7627                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7628             RaiseIfFailed("Rotate", self.TrsfOp)
7629             anObj.SetParameters(Parameters)
7630             return anObj
7631
7632         ## Rotate the given object around the given axis
7633         #  on the given angle, creating its copy before the rotatation.
7634         #  @param theObject The object to be rotated.
7635         #  @param theAxis Rotation axis.
7636         #  @param theAngle Rotation angle in radians.
7637         #  @param theName Object name; when specified, this parameter is used
7638         #         for result publication in the study. Otherwise, if automatic
7639         #         publication is switched on, default value is used for result name.
7640         #
7641         #  @return New GEOM.GEOM_Object, containing the rotated object.
7642         #
7643         #  @ref tui_rotation "Example"
7644         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7645             """
7646             Rotate the given object around the given axis
7647             on the given angle, creating its copy before the rotatation.
7648
7649             Parameters:
7650                 theObject The object to be rotated.
7651                 theAxis Rotation axis.
7652                 theAngle Rotation angle in radians.
7653                 theName Object name; when specified, this parameter is used
7654                         for result publication in the study. Otherwise, if automatic
7655                         publication is switched on, default value is used for result name.
7656
7657             Returns:
7658                 New GEOM.GEOM_Object, containing the rotated object.
7659             """
7660             # Example: see GEOM_TestAll.py
7661             flag = False
7662             if isinstance(theAngle,str):
7663                 flag = True
7664             theAngle, Parameters = ParseParameters(theAngle)
7665             if flag:
7666                 theAngle = theAngle*math.pi/180.0
7667             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7668             RaiseIfFailed("RotateCopy", self.TrsfOp)
7669             anObj.SetParameters(Parameters)
7670             self._autoPublish(anObj, theName, "rotated")
7671             return anObj
7672
7673         ## Rotate given object around vector perpendicular to plane
7674         #  containing three points.
7675         #  @param theObject The object to be rotated.
7676         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7677         #  containing the three points.
7678         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7679         #  @param theCopy Flag used to rotate object itself or create a copy.
7680         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7681         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7682         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7683             """
7684             Rotate given object around vector perpendicular to plane
7685             containing three points.
7686
7687             Parameters:
7688                 theObject The object to be rotated.
7689                 theCentPoint central point  the axis is the vector perpendicular to the plane
7690                              containing the three points.
7691                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7692                 theCopy Flag used to rotate object itself or create a copy.
7693
7694             Returns:
7695                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7696                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7697             """
7698             if theCopy:
7699                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7700             else:
7701                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7702             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7703             return anObj
7704
7705         ## Rotate given object around vector perpendicular to plane
7706         #  containing three points, creating its copy before the rotatation.
7707         #  @param theObject The object to be rotated.
7708         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7709         #  containing the three points.
7710         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7711         #  @param theName Object name; when specified, this parameter is used
7712         #         for result publication in the study. Otherwise, if automatic
7713         #         publication is switched on, default value is used for result name.
7714         #
7715         #  @return New GEOM.GEOM_Object, containing the rotated object.
7716         #
7717         #  @ref tui_rotation "Example"
7718         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
7719             """
7720             Rotate given object around vector perpendicular to plane
7721             containing three points, creating its copy before the rotatation.
7722
7723             Parameters:
7724                 theObject The object to be rotated.
7725                 theCentPoint central point  the axis is the vector perpendicular to the plane
7726                              containing the three points.
7727                 thePoint1,thePoint2  in a perpendicular plane of the axis.
7728                 theName Object name; when specified, this parameter is used
7729                         for result publication in the study. Otherwise, if automatic
7730                         publication is switched on, default value is used for result name.
7731
7732             Returns:
7733                 New GEOM.GEOM_Object, containing the rotated object.
7734             """
7735             # Example: see GEOM_TestAll.py
7736             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7737             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
7738             self._autoPublish(anObj, theName, "rotated")
7739             return anObj
7740
7741         ## Scale the given object by the specified factor.
7742         #  @param theObject The object to be scaled.
7743         #  @param thePoint Center point for scaling.
7744         #                  Passing None for it means scaling relatively the origin of global CS.
7745         #  @param theFactor Scaling factor value.
7746         #  @param theCopy Flag used to scale object itself or create a copy.
7747         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7748         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7749         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
7750             """
7751             Scale the given object by the specified factor.
7752
7753             Parameters:
7754                 theObject The object to be scaled.
7755                 thePoint Center point for scaling.
7756                          Passing None for it means scaling relatively the origin of global CS.
7757                 theFactor Scaling factor value.
7758                 theCopy Flag used to scale object itself or create a copy.
7759
7760             Returns:    
7761                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7762                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7763             """
7764             # Example: see GEOM_TestAll.py
7765             theFactor, Parameters = ParseParameters(theFactor)
7766             if theCopy:
7767                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7768             else:
7769                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
7770             RaiseIfFailed("Scale", self.TrsfOp)
7771             anObj.SetParameters(Parameters)
7772             return anObj
7773
7774         ## Scale the given object by the factor, creating its copy before the scaling.
7775         #  @param theObject The object to be scaled.
7776         #  @param thePoint Center point for scaling.
7777         #                  Passing None for it means scaling relatively the origin of global CS.
7778         #  @param theFactor Scaling factor value.
7779         #  @param theName Object name; when specified, this parameter is used
7780         #         for result publication in the study. Otherwise, if automatic
7781         #         publication is switched on, default value is used for result name.
7782         #
7783         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7784         #
7785         #  @ref tui_scale "Example"
7786         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
7787             """
7788             Scale the given object by the factor, creating its copy before the scaling.
7789
7790             Parameters:
7791                 theObject The object to be scaled.
7792                 thePoint Center point for scaling.
7793                          Passing None for it means scaling relatively the origin of global CS.
7794                 theFactor Scaling factor value.
7795                 theName Object name; when specified, this parameter is used
7796                         for result publication in the study. Otherwise, if automatic
7797                         publication is switched on, default value is used for result name.
7798
7799             Returns:    
7800                 New GEOM.GEOM_Object, containing the scaled shape.
7801             """
7802             # Example: see GEOM_TestAll.py
7803             theFactor, Parameters = ParseParameters(theFactor)
7804             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7805             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
7806             anObj.SetParameters(Parameters)
7807             self._autoPublish(anObj, theName, "scaled")
7808             return anObj
7809
7810         ## Scale the given object by different factors along coordinate axes.
7811         #  @param theObject The object to be scaled.
7812         #  @param thePoint Center point for scaling.
7813         #                  Passing None for it means scaling relatively the origin of global CS.
7814         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7815         #  @param theCopy Flag used to scale object itself or create a copy.
7816         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7817         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7818         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
7819             """
7820             Scale the given object by different factors along coordinate axes.
7821
7822             Parameters:
7823                 theObject The object to be scaled.
7824                 thePoint Center point for scaling.
7825                             Passing None for it means scaling relatively the origin of global CS.
7826                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7827                 theCopy Flag used to scale object itself or create a copy.
7828
7829             Returns:    
7830                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7831                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7832             """
7833             # Example: see GEOM_TestAll.py
7834             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7835             if theCopy:
7836                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7837                                                             theFactorX, theFactorY, theFactorZ)
7838             else:
7839                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
7840                                                         theFactorX, theFactorY, theFactorZ)
7841             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
7842             anObj.SetParameters(Parameters)
7843             return anObj
7844
7845         ## Scale the given object by different factors along coordinate axes,
7846         #  creating its copy before the scaling.
7847         #  @param theObject The object to be scaled.
7848         #  @param thePoint Center point for scaling.
7849         #                  Passing None for it means scaling relatively the origin of global CS.
7850         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7851         #  @param theName Object name; when specified, this parameter is used
7852         #         for result publication in the study. Otherwise, if automatic
7853         #         publication is switched on, default value is used for result name.
7854         #
7855         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7856         #
7857         #  @ref swig_scale "Example"
7858         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
7859             """
7860             Scale the given object by different factors along coordinate axes,
7861             creating its copy before the scaling.
7862
7863             Parameters:
7864                 theObject The object to be scaled.
7865                 thePoint Center point for scaling.
7866                             Passing None for it means scaling relatively the origin of global CS.
7867                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7868                 theName Object name; when specified, this parameter is used
7869                         for result publication in the study. Otherwise, if automatic
7870                         publication is switched on, default value is used for result name.
7871
7872             Returns:
7873                 New GEOM.GEOM_Object, containing the scaled shape.
7874             """
7875             # Example: see GEOM_TestAll.py
7876             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7877             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7878                                                         theFactorX, theFactorY, theFactorZ)
7879             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
7880             anObj.SetParameters(Parameters)
7881             self._autoPublish(anObj, theName, "scaled")
7882             return anObj
7883
7884         ## Mirror an object relatively the given plane.
7885         #  @param theObject The object to be mirrored.
7886         #  @param thePlane Plane of symmetry.
7887         #  @param theCopy Flag used to mirror object itself or create a copy.
7888         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7889         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7890         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
7891             """
7892             Mirror an object relatively the given plane.
7893
7894             Parameters:
7895                 theObject The object to be mirrored.
7896                 thePlane Plane of symmetry.
7897                 theCopy Flag used to mirror object itself or create a copy.
7898
7899             Returns:
7900                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7901                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7902             """
7903             if theCopy:
7904                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7905             else:
7906                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
7907             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
7908             return anObj
7909
7910         ## Create an object, symmetrical
7911         #  to the given one relatively the given plane.
7912         #  @param theObject The object to be mirrored.
7913         #  @param thePlane Plane of symmetry.
7914         #  @param theName Object name; when specified, this parameter is used
7915         #         for result publication in the study. Otherwise, if automatic
7916         #         publication is switched on, default value is used for result name.
7917         #
7918         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7919         #
7920         #  @ref tui_mirror "Example"
7921         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
7922             """
7923             Create an object, symmetrical to the given one relatively the given plane.
7924
7925             Parameters:
7926                 theObject The object to be mirrored.
7927                 thePlane Plane of symmetry.
7928                 theName Object name; when specified, this parameter is used
7929                         for result publication in the study. Otherwise, if automatic
7930                         publication is switched on, default value is used for result name.
7931
7932             Returns:
7933                 New GEOM.GEOM_Object, containing the mirrored shape.
7934             """
7935             # Example: see GEOM_TestAll.py
7936             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7937             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
7938             self._autoPublish(anObj, theName, "mirrored")
7939             return anObj
7940
7941         ## Mirror an object relatively the given axis.
7942         #  @param theObject The object to be mirrored.
7943         #  @param theAxis Axis of symmetry.
7944         #  @param theCopy Flag used to mirror object itself or create a copy.
7945         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7946         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7947         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
7948             """
7949             Mirror an object relatively the given axis.
7950
7951             Parameters:
7952                 theObject The object to be mirrored.
7953                 theAxis Axis of symmetry.
7954                 theCopy Flag used to mirror object itself or create a copy.
7955
7956             Returns:
7957                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7958                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7959             """
7960             if theCopy:
7961                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7962             else:
7963                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
7964             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
7965             return anObj
7966
7967         ## Create an object, symmetrical
7968         #  to the given one relatively the given axis.
7969         #  @param theObject The object to be mirrored.
7970         #  @param theAxis Axis of symmetry.
7971         #  @param theName Object name; when specified, this parameter is used
7972         #         for result publication in the study. Otherwise, if automatic
7973         #         publication is switched on, default value is used for result name.
7974         #
7975         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7976         #
7977         #  @ref tui_mirror "Example"
7978         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
7979             """
7980             Create an object, symmetrical to the given one relatively the given axis.
7981
7982             Parameters:
7983                 theObject The object to be mirrored.
7984                 theAxis Axis of symmetry.
7985                 theName Object name; when specified, this parameter is used
7986                         for result publication in the study. Otherwise, if automatic
7987                         publication is switched on, default value is used for result name.
7988
7989             Returns: 
7990                 New GEOM.GEOM_Object, containing the mirrored shape.
7991             """
7992             # Example: see GEOM_TestAll.py
7993             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7994             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
7995             self._autoPublish(anObj, theName, "mirrored")
7996             return anObj
7997
7998         ## Mirror an object relatively the given point.
7999         #  @param theObject The object to be mirrored.
8000         #  @param thePoint Point of symmetry.
8001         #  @param theCopy Flag used to mirror object itself or create a copy.
8002         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8003         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8004         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
8005             """
8006             Mirror an object relatively the given point.
8007
8008             Parameters:
8009                 theObject The object to be mirrored.
8010                 thePoint Point of symmetry.
8011                 theCopy Flag used to mirror object itself or create a copy.
8012
8013             Returns:
8014                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8015                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8016             """
8017             # Example: see GEOM_TestAll.py
8018             if theCopy:
8019                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8020             else:
8021                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
8022             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
8023             return anObj
8024
8025         ## Create an object, symmetrical
8026         #  to the given one relatively the given point.
8027         #  @param theObject The object to be mirrored.
8028         #  @param thePoint Point of symmetry.
8029         #  @param theName Object name; when specified, this parameter is used
8030         #         for result publication in the study. Otherwise, if automatic
8031         #         publication is switched on, default value is used for result name.
8032         #
8033         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8034         #
8035         #  @ref tui_mirror "Example"
8036         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
8037             """
8038             Create an object, symmetrical
8039             to the given one relatively the given point.
8040
8041             Parameters:
8042                 theObject The object to be mirrored.
8043                 thePoint Point of symmetry.
8044                 theName Object name; when specified, this parameter is used
8045                         for result publication in the study. Otherwise, if automatic
8046                         publication is switched on, default value is used for result name.
8047
8048             Returns:  
8049                 New GEOM.GEOM_Object, containing the mirrored shape.
8050             """
8051             # Example: see GEOM_TestAll.py
8052             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8053             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
8054             self._autoPublish(anObj, theName, "mirrored")
8055             return anObj
8056
8057         ## Modify the location of the given object.
8058         #  @param theObject The object to be displaced.
8059         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8060         #                     If \a theStartLCS is NULL, displacement
8061         #                     will be performed from global CS.\n
8062         #                     If \a theObject itself is used as \a theStartLCS,
8063         #                     its location will be changed to \a theEndLCS.
8064         #  @param theEndLCS Coordinate system to perform displacement to it.
8065         #  @param theCopy Flag used to displace object itself or create a copy.
8066         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8067         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
8068         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
8069             """
8070             Modify the Location of the given object by LCS, creating its copy before the setting.
8071
8072             Parameters:
8073                 theObject The object to be displaced.
8074                 theStartLCS Coordinate system to perform displacement from it.
8075                             If theStartLCS is NULL, displacement
8076                             will be performed from global CS.
8077                             If theObject itself is used as theStartLCS,
8078                             its location will be changed to theEndLCS.
8079                 theEndLCS Coordinate system to perform displacement to it.
8080                 theCopy Flag used to displace object itself or create a copy.
8081
8082             Returns:
8083                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8084                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
8085             """
8086             # Example: see GEOM_TestAll.py
8087             if theCopy:
8088                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8089             else:
8090                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
8091             RaiseIfFailed("Displace", self.TrsfOp)
8092             return anObj
8093
8094         ## Modify the Location of the given object by LCS,
8095         #  creating its copy before the setting.
8096         #  @param theObject The object to be displaced.
8097         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8098         #                     If \a theStartLCS is NULL, displacement
8099         #                     will be performed from global CS.\n
8100         #                     If \a theObject itself is used as \a theStartLCS,
8101         #                     its location will be changed to \a theEndLCS.
8102         #  @param theEndLCS Coordinate system to perform displacement to it.
8103         #  @param theName Object name; when specified, this parameter is used
8104         #         for result publication in the study. Otherwise, if automatic
8105         #         publication is switched on, default value is used for result name.
8106         #
8107         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8108         #
8109         #  @ref tui_modify_location "Example"
8110         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
8111             """
8112             Modify the Location of the given object by LCS, creating its copy before the setting.
8113
8114             Parameters:
8115                 theObject The object to be displaced.
8116                 theStartLCS Coordinate system to perform displacement from it.
8117                             If theStartLCS is NULL, displacement
8118                             will be performed from global CS.
8119                             If theObject itself is used as theStartLCS,
8120                             its location will be changed to theEndLCS.
8121                 theEndLCS Coordinate system to perform displacement to it.
8122                 theName Object name; when specified, this parameter is used
8123                         for result publication in the study. Otherwise, if automatic
8124                         publication is switched on, default value is used for result name.
8125
8126             Returns:  
8127                 New GEOM.GEOM_Object, containing the displaced shape.
8128
8129             Example of usage:
8130                 # create local coordinate systems
8131                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
8132                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
8133                 # modify the location of the given object
8134                 position = geompy.MakePosition(cylinder, cs1, cs2)
8135             """
8136             # Example: see GEOM_TestAll.py
8137             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8138             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
8139             self._autoPublish(anObj, theName, "displaced")
8140             return anObj
8141
8142         ## Modify the Location of the given object by Path.
8143         #  @param  theObject The object to be displaced.
8144         #  @param  thePath Wire or Edge along that the object will be translated.
8145         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
8146         #  @param  theCopy is to create a copy objects if true.
8147         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
8148         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
8149         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
8150         #
8151         #  @ref tui_modify_location "Example"
8152         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
8153             """
8154             Modify the Location of the given object by Path.
8155
8156             Parameters:
8157                  theObject The object to be displaced.
8158                  thePath Wire or Edge along that the object will be translated.
8159                  theDistance progress of Path (0 = start location, 1 = end of path location).
8160                  theCopy is to create a copy objects if true.
8161                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8162
8163             Returns:  
8164                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
8165                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
8166
8167             Example of usage:
8168                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
8169             """
8170             # Example: see GEOM_TestAll.py
8171             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
8172             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8173             return anObj
8174
8175         ## Modify the Location of the given object by Path, creating its copy before the operation.
8176         #  @param theObject The object to be displaced.
8177         #  @param thePath Wire or Edge along that the object will be translated.
8178         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
8179         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
8180         #  @param theName Object name; when specified, this parameter is used
8181         #         for result publication in the study. Otherwise, if automatic
8182         #         publication is switched on, default value is used for result name.
8183         #
8184         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8185         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
8186             """
8187             Modify the Location of the given object by Path, creating its copy before the operation.
8188
8189             Parameters:
8190                  theObject The object to be displaced.
8191                  thePath Wire or Edge along that the object will be translated.
8192                  theDistance progress of Path (0 = start location, 1 = end of path location).
8193                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8194                  theName Object name; when specified, this parameter is used
8195                          for result publication in the study. Otherwise, if automatic
8196                          publication is switched on, default value is used for result name.
8197
8198             Returns:  
8199                 New GEOM.GEOM_Object, containing the displaced shape.
8200             """
8201             # Example: see GEOM_TestAll.py
8202             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
8203             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8204             self._autoPublish(anObj, theName, "displaced")
8205             return anObj
8206
8207         ## Offset given shape.
8208         #  @param theObject The base object for the offset.
8209         #  @param theOffset Offset value.
8210         #  @param theCopy Flag used to offset object itself or create a copy.
8211         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8212         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
8213         def Offset(self, theObject, theOffset, theCopy=False):
8214             """
8215             Offset given shape.
8216
8217             Parameters:
8218                 theObject The base object for the offset.
8219                 theOffset Offset value.
8220                 theCopy Flag used to offset object itself or create a copy.
8221
8222             Returns: 
8223                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8224                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
8225             """
8226             theOffset, Parameters = ParseParameters(theOffset)
8227             if theCopy:
8228                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8229             else:
8230                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
8231             RaiseIfFailed("Offset", self.TrsfOp)
8232             anObj.SetParameters(Parameters)
8233             return anObj
8234
8235         ## Create new object as offset of the given one.
8236         #  @param theObject The base object for the offset.
8237         #  @param theOffset Offset value.
8238         #  @param theName Object name; when specified, this parameter is used
8239         #         for result publication in the study. Otherwise, if automatic
8240         #         publication is switched on, default value is used for result name.
8241         #
8242         #  @return New GEOM.GEOM_Object, containing the offset object.
8243         #
8244         #  @ref tui_offset "Example"
8245         def MakeOffset(self, theObject, theOffset, theName=None):
8246             """
8247             Create new object as offset of the given one.
8248
8249             Parameters:
8250                 theObject The base object for the offset.
8251                 theOffset Offset value.
8252                 theName Object name; when specified, this parameter is used
8253                         for result publication in the study. Otherwise, if automatic
8254                         publication is switched on, default value is used for result name.
8255
8256             Returns:  
8257                 New GEOM.GEOM_Object, containing the offset object.
8258
8259             Example of usage:
8260                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
8261                  # create a new object as offset of the given object
8262                  offset = geompy.MakeOffset(box, 70.)
8263             """
8264             # Example: see GEOM_TestAll.py
8265             theOffset, Parameters = ParseParameters(theOffset)
8266             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8267             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
8268             anObj.SetParameters(Parameters)
8269             self._autoPublish(anObj, theName, "offset")
8270             return anObj
8271
8272         ## Create new object as projection of the given one on a 2D surface.
8273         #  @param theSource The source object for the projection. It can be a point, edge or wire.
8274         #  @param theTarget The target object. It can be planar or cylindrical face.
8275         #  @param theName Object name; when specified, this parameter is used
8276         #         for result publication in the study. Otherwise, if automatic
8277         #         publication is switched on, default value is used for result name.
8278         #
8279         #  @return New GEOM.GEOM_Object, containing the projection.
8280         #
8281         #  @ref tui_projection "Example"
8282         def MakeProjection(self, theSource, theTarget, theName=None):
8283             """
8284             Create new object as projection of the given one on a 2D surface.
8285
8286             Parameters:
8287                 theSource The source object for the projection. It can be a point, edge or wire.
8288                 theTarget The target object. It can be planar or cylindrical face.
8289                 theName Object name; when specified, this parameter is used
8290                         for result publication in the study. Otherwise, if automatic
8291                         publication is switched on, default value is used for result name.
8292
8293             Returns:  
8294                 New GEOM.GEOM_Object, containing the projection.
8295             """
8296             # Example: see GEOM_TestAll.py
8297             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
8298             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
8299             self._autoPublish(anObj, theName, "projection")
8300             return anObj
8301             
8302         ## Create a projection projection of the given point on a wire or an edge.
8303         #  If there are no solutions or there are 2 or more solutions It throws an
8304         #  exception.
8305         #  @param thePoint the point to be projected.
8306         #  @param theWire the wire. The edge is accepted as well.
8307         #  @param theName Object name; when specified, this parameter is used
8308         #         for result publication in the study. Otherwise, if automatic
8309         #         publication is switched on, default value is used for result name.
8310         #
8311         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
8312         #  \n \a u: The parameter of projection point on edge.
8313         #  \n \a PointOnEdge: The projection point.
8314         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
8315         #
8316         #  @ref tui_projection "Example"
8317         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
8318             """
8319             Create a projection projection of the given point on a wire or an edge.
8320             If there are no solutions or there are 2 or more solutions It throws an
8321             exception.
8322             
8323             Parameters:
8324                 thePoint the point to be projected.
8325                 theWire the wire. The edge is accepted as well.
8326                 theName Object name; when specified, this parameter is used
8327                         for result publication in the study. Otherwise, if automatic
8328                         publication is switched on, default value is used for result name.
8329           
8330             Returns:
8331                 [u, PointOnEdge, EdgeInWireIndex]
8332                  u: The parameter of projection point on edge.
8333                  PointOnEdge: The projection point.
8334                  EdgeInWireIndex: The index of an edge in a wire.
8335             """
8336             # Example: see GEOM_TestAll.py
8337             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
8338             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
8339             self._autoPublish(anObj[1], theName, "projection")
8340             return anObj
8341
8342         # -----------------------------------------------------------------------------
8343         # Patterns
8344         # -----------------------------------------------------------------------------
8345
8346         ## Translate the given object along the given vector a given number times
8347         #  @param theObject The object to be translated.
8348         #  @param theVector Direction of the translation. DX if None.
8349         #  @param theStep Distance to translate on.
8350         #  @param theNbTimes Quantity of translations to be done.
8351         #  @param theName Object name; when specified, this parameter is used
8352         #         for result publication in the study. Otherwise, if automatic
8353         #         publication is switched on, default value is used for result name.
8354         #
8355         #  @return New GEOM.GEOM_Object, containing compound of all
8356         #          the shapes, obtained after each translation.
8357         #
8358         #  @ref tui_multi_translation "Example"
8359         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
8360             """
8361             Translate the given object along the given vector a given number times
8362
8363             Parameters:
8364                 theObject The object to be translated.
8365                 theVector Direction of the translation. DX if None.
8366                 theStep Distance to translate on.
8367                 theNbTimes Quantity of translations to be done.
8368                 theName Object name; when specified, this parameter is used
8369                         for result publication in the study. Otherwise, if automatic
8370                         publication is switched on, default value is used for result name.
8371
8372             Returns:     
8373                 New GEOM.GEOM_Object, containing compound of all
8374                 the shapes, obtained after each translation.
8375
8376             Example of usage:
8377                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
8378             """
8379             # Example: see GEOM_TestAll.py
8380             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
8381             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
8382             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
8383             anObj.SetParameters(Parameters)
8384             self._autoPublish(anObj, theName, "multitranslation")
8385             return anObj
8386
8387         ## Conseqently apply two specified translations to theObject specified number of times.
8388         #  @param theObject The object to be translated.
8389         #  @param theVector1 Direction of the first translation. DX if None.
8390         #  @param theStep1 Step of the first translation.
8391         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
8392         #  @param theVector2 Direction of the second translation. DY if None.
8393         #  @param theStep2 Step of the second translation.
8394         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
8395         #  @param theName Object name; when specified, this parameter is used
8396         #         for result publication in the study. Otherwise, if automatic
8397         #         publication is switched on, default value is used for result name.
8398         #
8399         #  @return New GEOM.GEOM_Object, containing compound of all
8400         #          the shapes, obtained after each translation.
8401         #
8402         #  @ref tui_multi_translation "Example"
8403         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8404                                    theVector2, theStep2, theNbTimes2, theName=None):
8405             """
8406             Conseqently apply two specified translations to theObject specified number of times.
8407
8408             Parameters:
8409                 theObject The object to be translated.
8410                 theVector1 Direction of the first translation. DX if None.
8411                 theStep1 Step of the first translation.
8412                 theNbTimes1 Quantity of translations to be done along theVector1.
8413                 theVector2 Direction of the second translation. DY if None.
8414                 theStep2 Step of the second translation.
8415                 theNbTimes2 Quantity of translations to be done along theVector2.
8416                 theName Object name; when specified, this parameter is used
8417                         for result publication in the study. Otherwise, if automatic
8418                         publication is switched on, default value is used for result name.
8419
8420             Returns:
8421                 New GEOM.GEOM_Object, containing compound of all
8422                 the shapes, obtained after each translation.
8423
8424             Example of usage:
8425                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8426             """
8427             # Example: see GEOM_TestAll.py
8428             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8429             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8430                                                  theVector2, theStep2, theNbTimes2)
8431             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8432             anObj.SetParameters(Parameters)
8433             self._autoPublish(anObj, theName, "multitranslation")
8434             return anObj
8435
8436         ## Rotate the given object around the given axis a given number times.
8437         #  Rotation angle will be 2*PI/theNbTimes.
8438         #  @param theObject The object to be rotated.
8439         #  @param theAxis The rotation axis. DZ if None.
8440         #  @param theNbTimes Quantity of rotations to be done.
8441         #  @param theName Object name; when specified, this parameter is used
8442         #         for result publication in the study. Otherwise, if automatic
8443         #         publication is switched on, default value is used for result name.
8444         #
8445         #  @return New GEOM.GEOM_Object, containing compound of all the
8446         #          shapes, obtained after each rotation.
8447         #
8448         #  @ref tui_multi_rotation "Example"
8449         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8450             """
8451             Rotate the given object around the given axis a given number times.
8452             Rotation angle will be 2*PI/theNbTimes.
8453
8454             Parameters:
8455                 theObject The object to be rotated.
8456                 theAxis The rotation axis. DZ if None.
8457                 theNbTimes Quantity of rotations to be done.
8458                 theName Object name; when specified, this parameter is used
8459                         for result publication in the study. Otherwise, if automatic
8460                         publication is switched on, default value is used for result name.
8461
8462             Returns:     
8463                 New GEOM.GEOM_Object, containing compound of all the
8464                 shapes, obtained after each rotation.
8465
8466             Example of usage:
8467                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8468             """
8469             # Example: see GEOM_TestAll.py
8470             theNbTimes, Parameters = ParseParameters(theNbTimes)
8471             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8472             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8473             anObj.SetParameters(Parameters)
8474             self._autoPublish(anObj, theName, "multirotation")
8475             return anObj
8476
8477         ## Rotate the given object around the given axis
8478         #  a given number times on the given angle.
8479         #  @param theObject The object to be rotated.
8480         #  @param theAxis The rotation axis. DZ if None.
8481         #  @param theAngleStep Rotation angle in radians.
8482         #  @param theNbTimes Quantity of rotations to be done.
8483         #  @param theName Object name; when specified, this parameter is used
8484         #         for result publication in the study. Otherwise, if automatic
8485         #         publication is switched on, default value is used for result name.
8486         #
8487         #  @return New GEOM.GEOM_Object, containing compound of all the
8488         #          shapes, obtained after each rotation.
8489         #
8490         #  @ref tui_multi_rotation "Example"
8491         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8492             """
8493             Rotate the given object around the given axis
8494             a given number times on the given angle.
8495
8496             Parameters:
8497                 theObject The object to be rotated.
8498                 theAxis The rotation axis. DZ if None.
8499                 theAngleStep Rotation angle in radians.
8500                 theNbTimes Quantity of rotations to be done.
8501                 theName Object name; when specified, this parameter is used
8502                         for result publication in the study. Otherwise, if automatic
8503                         publication is switched on, default value is used for result name.
8504
8505             Returns:     
8506                 New GEOM.GEOM_Object, containing compound of all the
8507                 shapes, obtained after each rotation.
8508
8509             Example of usage:
8510                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8511             """
8512             # Example: see GEOM_TestAll.py
8513             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8514             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8515             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8516             anObj.SetParameters(Parameters)
8517             self._autoPublish(anObj, theName, "multirotation")
8518             return anObj
8519
8520         ## Rotate the given object around the given axis a given
8521         #  number times and multi-translate each rotation result.
8522         #  Rotation angle will be 2*PI/theNbTimes1.
8523         #  Translation direction passes through center of gravity
8524         #  of rotated shape and its projection on the rotation axis.
8525         #  @param theObject The object to be rotated.
8526         #  @param theAxis Rotation axis. DZ if None.
8527         #  @param theNbTimes1 Quantity of rotations to be done.
8528         #  @param theRadialStep Translation distance.
8529         #  @param theNbTimes2 Quantity of translations to be done.
8530         #  @param theName Object name; when specified, this parameter is used
8531         #         for result publication in the study. Otherwise, if automatic
8532         #         publication is switched on, default value is used for result name.
8533         #
8534         #  @return New GEOM.GEOM_Object, containing compound of all the
8535         #          shapes, obtained after each transformation.
8536         #
8537         #  @ref tui_multi_rotation "Example"
8538         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8539             """
8540             Rotate the given object around the
8541             given axis on the given angle a given number
8542             times and multi-translate each rotation result.
8543             Translation direction passes through center of gravity
8544             of rotated shape and its projection on the rotation axis.
8545
8546             Parameters:
8547                 theObject The object to be rotated.
8548                 theAxis Rotation axis. DZ if None.
8549                 theNbTimes1 Quantity of rotations to be done.
8550                 theRadialStep Translation distance.
8551                 theNbTimes2 Quantity of translations to be done.
8552                 theName Object name; when specified, this parameter is used
8553                         for result publication in the study. Otherwise, if automatic
8554                         publication is switched on, default value is used for result name.
8555
8556             Returns:    
8557                 New GEOM.GEOM_Object, containing compound of all the
8558                 shapes, obtained after each transformation.
8559
8560             Example of usage:
8561                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8562             """
8563             # Example: see GEOM_TestAll.py
8564             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8565             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8566             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8567             anObj.SetParameters(Parameters)
8568             self._autoPublish(anObj, theName, "multirotation")
8569             return anObj
8570
8571         ## Rotate the given object around the
8572         #  given axis on the given angle a given number
8573         #  times and multi-translate each rotation result.
8574         #  Translation direction passes through center of gravity
8575         #  of rotated shape and its projection on the rotation axis.
8576         #  @param theObject The object to be rotated.
8577         #  @param theAxis Rotation axis. DZ if None.
8578         #  @param theAngleStep Rotation angle in radians.
8579         #  @param theNbTimes1 Quantity of rotations to be done.
8580         #  @param theRadialStep Translation distance.
8581         #  @param theNbTimes2 Quantity of translations to be done.
8582         #  @param theName Object name; when specified, this parameter is used
8583         #         for result publication in the study. Otherwise, if automatic
8584         #         publication is switched on, default value is used for result name.
8585         #
8586         #  @return New GEOM.GEOM_Object, containing compound of all the
8587         #          shapes, obtained after each transformation.
8588         #
8589         #  @ref tui_multi_rotation "Example"
8590         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8591             """
8592             Rotate the given object around the
8593             given axis on the given angle a given number
8594             times and multi-translate each rotation result.
8595             Translation direction passes through center of gravity
8596             of rotated shape and its projection on the rotation axis.
8597
8598             Parameters:
8599                 theObject The object to be rotated.
8600                 theAxis Rotation axis. DZ if None.
8601                 theAngleStep Rotation angle in radians.
8602                 theNbTimes1 Quantity of rotations to be done.
8603                 theRadialStep Translation distance.
8604                 theNbTimes2 Quantity of translations to be done.
8605                 theName Object name; when specified, this parameter is used
8606                         for result publication in the study. Otherwise, if automatic
8607                         publication is switched on, default value is used for result name.
8608
8609             Returns:    
8610                 New GEOM.GEOM_Object, containing compound of all the
8611                 shapes, obtained after each transformation.
8612
8613             Example of usage:
8614                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8615             """
8616             # Example: see GEOM_TestAll.py
8617             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8618             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8619             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8620             anObj.SetParameters(Parameters)
8621             self._autoPublish(anObj, theName, "multirotation")
8622             return anObj
8623
8624         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8625         #
8626         #  @ref swig_MakeMultiRotation "Example"
8627         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8628             """
8629             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8630
8631             Example of usage:
8632                 pz = geompy.MakeVertex(0, 0, 100)
8633                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8634                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8635             """
8636             # Example: see GEOM_TestOthers.py
8637             aVec = self.MakeLine(aPoint,aDir)
8638             # note: auto-publishing is done in self.MultiRotate1D()
8639             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8640             return anObj
8641
8642         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8643         #
8644         #  @ref swig_MakeMultiRotation "Example"
8645         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8646             """
8647             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8648
8649             Example of usage:
8650                 pz = geompy.MakeVertex(0, 0, 100)
8651                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8652                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8653             """
8654             # Example: see GEOM_TestOthers.py
8655             aVec = self.MakeLine(aPoint,aDir)
8656             # note: auto-publishing is done in self.MultiRotate1D()
8657             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8658             return anObj
8659
8660         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8661         #
8662         #  @ref swig_MakeMultiRotation "Example"
8663         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8664             """
8665             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8666             
8667             Example of usage:
8668                 pz = geompy.MakeVertex(0, 0, 100)
8669                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8670                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8671             """
8672             # Example: see GEOM_TestOthers.py
8673             aVec = self.MakeLine(aPoint,aDir)
8674             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8675             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8676             return anObj
8677
8678         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8679         #
8680         #  @ref swig_MakeMultiRotation "Example"
8681         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8682             """
8683             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8684             
8685             Example of usage:
8686                 pz = geompy.MakeVertex(0, 0, 100)
8687                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8688                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8689             """
8690             # Example: see GEOM_TestOthers.py
8691             aVec = self.MakeLine(aPoint,aDir)
8692             # note: auto-publishing is done in self.MultiRotate2D()
8693             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8694             return anObj
8695
8696         # end of l3_transform
8697         ## @}
8698
8699         ## @addtogroup l3_transform_d
8700         ## @{
8701
8702         ## Deprecated method. Use MultiRotate1DNbTimes instead.
8703         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
8704             """
8705             Deprecated method. Use MultiRotate1DNbTimes instead.
8706             """
8707             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
8708             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
8709
8710         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8711         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8712         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
8713             """
8714             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8715             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8716
8717             Example of usage:
8718                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8719             """
8720             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
8721             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
8722             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
8723             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
8724             anObj.SetParameters(Parameters)
8725             self._autoPublish(anObj, theName, "multirotation")
8726             return anObj
8727
8728         ## The same, as MultiRotate1D(), but axis is given by direction and point
8729         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8730         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8731             """
8732             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
8733             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8734
8735             Example of usage:
8736                 pz = geompy.MakeVertex(0, 0, 100)
8737                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8738                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
8739             """
8740             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
8741             aVec = self.MakeLine(aPoint,aDir)
8742             # note: auto-publishing is done in self.MultiRotate1D()
8743             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
8744             return anObj
8745
8746         ## The same, as MultiRotate2D(), but axis is given by direction and point
8747         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8748         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8749             """
8750             The same, as MultiRotate2D(), but axis is given by direction and point
8751             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8752             
8753             Example of usage:
8754                 pz = geompy.MakeVertex(0, 0, 100)
8755                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8756                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
8757             """
8758             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
8759             aVec = self.MakeLine(aPoint,aDir)
8760             # note: auto-publishing is done in self.MultiRotate2D()
8761             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8762             return anObj
8763
8764         # end of l3_transform_d
8765         ## @}
8766
8767         ## @addtogroup l3_local
8768         ## @{
8769
8770         ## Perform a fillet on all edges of the given shape.
8771         #  @param theShape Shape, to perform fillet on.
8772         #  @param theR Fillet radius.
8773         #  @param theName Object name; when specified, this parameter is used
8774         #         for result publication in the study. Otherwise, if automatic
8775         #         publication is switched on, default value is used for result name.
8776         #
8777         #  @return New GEOM.GEOM_Object, containing the result shape.
8778         #
8779         #  @ref tui_fillet "Example 1"
8780         #  \n @ref swig_MakeFilletAll "Example 2"
8781         def MakeFilletAll(self, theShape, theR, theName=None):
8782             """
8783             Perform a fillet on all edges of the given shape.
8784
8785             Parameters:
8786                 theShape Shape, to perform fillet on.
8787                 theR Fillet radius.
8788                 theName Object name; when specified, this parameter is used
8789                         for result publication in the study. Otherwise, if automatic
8790                         publication is switched on, default value is used for result name.
8791
8792             Returns: 
8793                 New GEOM.GEOM_Object, containing the result shape.
8794
8795             Example of usage: 
8796                filletall = geompy.MakeFilletAll(prism, 10.)
8797             """
8798             # Example: see GEOM_TestOthers.py
8799             theR,Parameters = ParseParameters(theR)
8800             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
8801             RaiseIfFailed("MakeFilletAll", self.LocalOp)
8802             anObj.SetParameters(Parameters)
8803             self._autoPublish(anObj, theName, "fillet")
8804             return anObj
8805
8806         ## Perform a fillet on the specified edges/faces of the given shape
8807         #  @param theShape Shape, to perform fillet on.
8808         #  @param theR Fillet radius.
8809         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
8810         #  @param theListShapes Global indices of edges/faces to perform fillet on.
8811         #  @param theName Object name; when specified, this parameter is used
8812         #         for result publication in the study. Otherwise, if automatic
8813         #         publication is switched on, default value is used for result name.
8814         #
8815         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8816         #
8817         #  @return New GEOM.GEOM_Object, containing the result shape.
8818         #
8819         #  @ref tui_fillet "Example"
8820         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
8821             """
8822             Perform a fillet on the specified edges/faces of the given shape
8823
8824             Parameters:
8825                 theShape Shape, to perform fillet on.
8826                 theR Fillet radius.
8827                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
8828                 theListShapes Global indices of edges/faces to perform fillet on.
8829                 theName Object name; when specified, this parameter is used
8830                         for result publication in the study. Otherwise, if automatic
8831                         publication is switched on, default value is used for result name.
8832
8833             Note:
8834                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8835
8836             Returns: 
8837                 New GEOM.GEOM_Object, containing the result shape.
8838
8839             Example of usage:
8840                 # get the list of IDs (IDList) for the fillet
8841                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8842                 IDlist_e = []
8843                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8844                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8845                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8846                 # make a fillet on the specified edges of the given shape
8847                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
8848             """
8849             # Example: see GEOM_TestAll.py
8850             theR,Parameters = ParseParameters(theR)
8851             anObj = None
8852             if theShapeType == self.ShapeType["EDGE"]:
8853                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
8854                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
8855             else:
8856                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
8857                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
8858             anObj.SetParameters(Parameters)
8859             self._autoPublish(anObj, theName, "fillet")
8860             return anObj
8861
8862         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
8863         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
8864             """
8865             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
8866
8867             Example of usage:
8868                 # get the list of IDs (IDList) for the fillet
8869                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8870                 IDlist_e = []
8871                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8872                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8873                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8874                 # make a fillet on the specified edges of the given shape
8875                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
8876             """
8877             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
8878             anObj = None
8879             if theShapeType == self.ShapeType["EDGE"]:
8880                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
8881                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
8882             else:
8883                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
8884                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
8885             anObj.SetParameters(Parameters)
8886             self._autoPublish(anObj, theName, "fillet")
8887             return anObj
8888
8889         ## Perform a fillet on the specified edges of the given shape
8890         #  @param theShape  Wire Shape to perform fillet on.
8891         #  @param theR  Fillet radius.
8892         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8893         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
8894         #    \note The list of vertices could be empty,
8895         #          in this case fillet will done done at all vertices in wire
8896         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
8897         #         by the length of the edges, nearest to the fillet vertex.
8898         #         But sometimes the next edge is C1 continuous with the one, nearest to
8899         #         the fillet point, and such two (or more) edges can be united to allow
8900         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
8901         #         thus ignoring the secant vertex (vertices).
8902         #  @param theName Object name; when specified, this parameter is used
8903         #         for result publication in the study. Otherwise, if automatic
8904         #         publication is switched on, default value is used for result name.
8905         #
8906         #  @return New GEOM.GEOM_Object, containing the result shape.
8907         #
8908         #  @ref tui_fillet2d "Example"
8909         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
8910             """
8911             Perform a fillet on the specified edges of the given shape
8912
8913             Parameters:
8914                 theShape  Wire Shape to perform fillet on.
8915                 theR  Fillet radius.
8916                 theListOfVertexes Global indices of vertexes to perform fillet on.
8917                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
8918                     by the length of the edges, nearest to the fillet vertex.
8919                     But sometimes the next edge is C1 continuous with the one, nearest to
8920                     the fillet point, and such two (or more) edges can be united to allow
8921                     bigger radius. Set this flag to TRUE to allow collinear edges union,
8922                     thus ignoring the secant vertex (vertices).
8923                 theName Object name; when specified, this parameter is used
8924                         for result publication in the study. Otherwise, if automatic
8925                         publication is switched on, default value is used for result name.
8926             Note:
8927                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8928
8929                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
8930
8931             Returns: 
8932                 New GEOM.GEOM_Object, containing the result shape.
8933
8934             Example of usage:  
8935                 # create wire
8936                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
8937                 # make fillet at given wire vertices with giver radius
8938                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
8939             """
8940             # Example: see GEOM_TestAll.py
8941             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
8942             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
8943             RaiseIfFailed("MakeFillet1D", self.LocalOp)
8944             anObj.SetParameters(Parameters)
8945             self._autoPublish(anObj, theName, "fillet")
8946             return anObj
8947
8948         ## Perform a fillet at the specified vertices of the given face/shell.
8949         #  @param theShape Face or Shell shape to perform fillet on.
8950         #  @param theR Fillet radius.
8951         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8952         #  @param theName Object name; when specified, this parameter is used
8953         #         for result publication in the study. Otherwise, if automatic
8954         #         publication is switched on, default value is used for result name.
8955         #
8956         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8957         #
8958         #  @return New GEOM.GEOM_Object, containing the result shape.
8959         #
8960         #  @ref tui_fillet2d "Example"
8961         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
8962             """
8963             Perform a fillet at the specified vertices of the given face/shell.
8964
8965             Parameters:
8966                 theShape  Face or Shell shape to perform fillet on.
8967                 theR  Fillet radius.
8968                 theListOfVertexes Global indices of vertexes to perform fillet on.
8969                 theName Object name; when specified, this parameter is used
8970                         for result publication in the study. Otherwise, if automatic
8971                         publication is switched on, default value is used for result name.
8972             Note:
8973                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8974
8975             Returns: 
8976                 New GEOM.GEOM_Object, containing the result shape.
8977
8978             Example of usage:
8979                 face = geompy.MakeFaceHW(100, 100, 1)
8980                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
8981             """
8982             # Example: see GEOM_TestAll.py
8983             theR,Parameters = ParseParameters(theR)
8984             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
8985             RaiseIfFailed("MakeFillet2D", self.LocalOp)
8986             anObj.SetParameters(Parameters)
8987             self._autoPublish(anObj, theName, "fillet")
8988             return anObj
8989
8990         ## Perform a symmetric chamfer on all edges of the given shape.
8991         #  @param theShape Shape, to perform chamfer on.
8992         #  @param theD Chamfer size along each face.
8993         #  @param theName Object name; when specified, this parameter is used
8994         #         for result publication in the study. Otherwise, if automatic
8995         #         publication is switched on, default value is used for result name.
8996         #
8997         #  @return New GEOM.GEOM_Object, containing the result shape.
8998         #
8999         #  @ref tui_chamfer "Example 1"
9000         #  \n @ref swig_MakeChamferAll "Example 2"
9001         def MakeChamferAll(self, theShape, theD, theName=None):
9002             """
9003             Perform a symmetric chamfer on all edges of the given shape.
9004
9005             Parameters:
9006                 theShape Shape, to perform chamfer on.
9007                 theD Chamfer size along each face.
9008                 theName Object name; when specified, this parameter is used
9009                         for result publication in the study. Otherwise, if automatic
9010                         publication is switched on, default value is used for result name.
9011
9012             Returns:     
9013                 New GEOM.GEOM_Object, containing the result shape.
9014
9015             Example of usage:
9016                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
9017             """
9018             # Example: see GEOM_TestOthers.py
9019             theD,Parameters = ParseParameters(theD)
9020             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
9021             RaiseIfFailed("MakeChamferAll", self.LocalOp)
9022             anObj.SetParameters(Parameters)
9023             self._autoPublish(anObj, theName, "chamfer")
9024             return anObj
9025
9026         ## Perform a chamfer on edges, common to the specified faces,
9027         #  with distance D1 on the Face1
9028         #  @param theShape Shape, to perform chamfer on.
9029         #  @param theD1 Chamfer size along \a theFace1.
9030         #  @param theD2 Chamfer size along \a theFace2.
9031         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9032         #  @param theName Object name; when specified, this parameter is used
9033         #         for result publication in the study. Otherwise, if automatic
9034         #         publication is switched on, default value is used for result name.
9035         #
9036         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9037         #
9038         #  @return New GEOM.GEOM_Object, containing the result shape.
9039         #
9040         #  @ref tui_chamfer "Example"
9041         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
9042             """
9043             Perform a chamfer on edges, common to the specified faces,
9044             with distance D1 on the Face1
9045
9046             Parameters:
9047                 theShape Shape, to perform chamfer on.
9048                 theD1 Chamfer size along theFace1.
9049                 theD2 Chamfer size along theFace2.
9050                 theFace1,theFace2 Global indices of two faces of theShape.
9051                 theName Object name; when specified, this parameter is used
9052                         for result publication in the study. Otherwise, if automatic
9053                         publication is switched on, default value is used for result name.
9054
9055             Note:
9056                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9057
9058             Returns:      
9059                 New GEOM.GEOM_Object, containing the result shape.
9060
9061             Example of usage:
9062                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9063                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9064                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9065                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
9066             """
9067             # Example: see GEOM_TestAll.py
9068             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9069             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
9070             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
9071             anObj.SetParameters(Parameters)
9072             self._autoPublish(anObj, theName, "chamfer")
9073             return anObj
9074
9075         ## Perform a chamfer on edges
9076         #  @param theShape Shape, to perform chamfer on.
9077         #  @param theD Chamfer length
9078         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9079         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9080         #  @param theName Object name; when specified, this parameter is used
9081         #         for result publication in the study. Otherwise, if automatic
9082         #         publication is switched on, default value is used for result name.
9083         #
9084         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9085         #
9086         #  @return New GEOM.GEOM_Object, containing the result shape.
9087         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
9088             """
9089             Perform a chamfer on edges
9090
9091             Parameters:
9092                 theShape Shape, to perform chamfer on.
9093                 theD1 Chamfer size along theFace1.
9094                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
9095                 theFace1,theFace2 Global indices of two faces of theShape.
9096                 theName Object name; when specified, this parameter is used
9097                         for result publication in the study. Otherwise, if automatic
9098                         publication is switched on, default value is used for result name.
9099
9100             Note:
9101                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9102
9103             Returns:      
9104                 New GEOM.GEOM_Object, containing the result shape.
9105
9106             Example of usage:
9107                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9108                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9109                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9110                 ang = 30
9111                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
9112             """
9113             flag = False
9114             if isinstance(theAngle,str):
9115                 flag = True
9116             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9117             if flag:
9118                 theAngle = theAngle*math.pi/180.0
9119             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
9120             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
9121             anObj.SetParameters(Parameters)
9122             self._autoPublish(anObj, theName, "chamfer")
9123             return anObj
9124
9125         ## Perform a chamfer on all edges of the specified faces,
9126         #  with distance D1 on the first specified face (if several for one edge)
9127         #  @param theShape Shape, to perform chamfer on.
9128         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
9129         #               connected to the edge, are in \a theFaces, \a theD1
9130         #               will be get along face, which is nearer to \a theFaces beginning.
9131         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
9132         #  @param theFaces Sequence of global indices of faces of \a theShape.
9133         #  @param theName Object name; when specified, this parameter is used
9134         #         for result publication in the study. Otherwise, if automatic
9135         #         publication is switched on, default value is used for result name.
9136         #
9137         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9138         #
9139         #  @return New GEOM.GEOM_Object, containing the result shape.
9140         #
9141         #  @ref tui_chamfer "Example"
9142         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
9143             """
9144             Perform a chamfer on all edges of the specified faces,
9145             with distance D1 on the first specified face (if several for one edge)
9146
9147             Parameters:
9148                 theShape Shape, to perform chamfer on.
9149                 theD1 Chamfer size along face from  theFaces. If both faces,
9150                       connected to the edge, are in theFaces, theD1
9151                       will be get along face, which is nearer to theFaces beginning.
9152                 theD2 Chamfer size along another of two faces, connected to the edge.
9153                 theFaces Sequence of global indices of faces of theShape.
9154                 theName Object name; when specified, this parameter is used
9155                         for result publication in the study. Otherwise, if automatic
9156                         publication is switched on, default value is used for result name.
9157                 
9158             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
9159
9160             Returns:  
9161                 New GEOM.GEOM_Object, containing the result shape.
9162             """
9163             # Example: see GEOM_TestAll.py
9164             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9165             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
9166             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
9167             anObj.SetParameters(Parameters)
9168             self._autoPublish(anObj, theName, "chamfer")
9169             return anObj
9170
9171         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
9172         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9173         #
9174         #  @ref swig_FilletChamfer "Example"
9175         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
9176             """
9177             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
9178             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9179             """
9180             flag = False
9181             if isinstance(theAngle,str):
9182                 flag = True
9183             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9184             if flag:
9185                 theAngle = theAngle*math.pi/180.0
9186             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
9187             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
9188             anObj.SetParameters(Parameters)
9189             self._autoPublish(anObj, theName, "chamfer")
9190             return anObj
9191
9192         ## Perform a chamfer on edges,
9193         #  with distance D1 on the first specified face (if several for one edge)
9194         #  @param theShape Shape, to perform chamfer on.
9195         #  @param theD1,theD2 Chamfer size
9196         #  @param theEdges Sequence of edges of \a theShape.
9197         #  @param theName Object name; when specified, this parameter is used
9198         #         for result publication in the study. Otherwise, if automatic
9199         #         publication is switched on, default value is used for result name.
9200         #
9201         #  @return New GEOM.GEOM_Object, containing the result shape.
9202         #
9203         #  @ref swig_FilletChamfer "Example"
9204         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
9205             """
9206             Perform a chamfer on edges,
9207             with distance D1 on the first specified face (if several for one edge)
9208             
9209             Parameters:
9210                 theShape Shape, to perform chamfer on.
9211                 theD1,theD2 Chamfer size
9212                 theEdges Sequence of edges of theShape.
9213                 theName Object name; when specified, this parameter is used
9214                         for result publication in the study. Otherwise, if automatic
9215                         publication is switched on, default value is used for result name.
9216
9217             Returns:
9218                 New GEOM.GEOM_Object, containing the result shape.
9219             """
9220             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9221             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
9222             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
9223             anObj.SetParameters(Parameters)
9224             self._autoPublish(anObj, theName, "chamfer")
9225             return anObj
9226
9227         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
9228         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9229         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
9230             """
9231             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
9232             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9233             """
9234             flag = False
9235             if isinstance(theAngle,str):
9236                 flag = True
9237             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9238             if flag:
9239                 theAngle = theAngle*math.pi/180.0
9240             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
9241             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
9242             anObj.SetParameters(Parameters)
9243             self._autoPublish(anObj, theName, "chamfer")
9244             return anObj
9245
9246         ## @sa MakeChamferEdge(), MakeChamferFaces()
9247         #
9248         #  @ref swig_MakeChamfer "Example"
9249         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
9250             """
9251             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
9252             """
9253             # Example: see GEOM_TestOthers.py
9254             anObj = None
9255             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
9256             if aShapeType == self.ShapeType["EDGE"]:
9257                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
9258             else:
9259                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
9260             return anObj
9261             
9262         ## Remove material from a solid by extrusion of the base shape on the given distance.
9263         #  @param theInit Shape to remove material from. It must be a solid or 
9264         #  a compound made of a single solid.
9265         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9266         #  @param theH Prism dimension along the normal to theBase
9267         #  @param theAngle Draft angle in degrees.
9268         #  @param theName Object name; when specified, this parameter is used
9269         #         for result publication in the study. Otherwise, if automatic
9270         #         publication is switched on, default value is used for result name.
9271         #
9272         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
9273         #
9274         #  @ref tui_creation_prism "Example"
9275         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
9276             """
9277             Add material to a solid by extrusion of the base shape on the given distance.
9278
9279             Parameters:
9280                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
9281                 theBase Closed edge or wire defining the base shape to be extruded.
9282                 theH Prism dimension along the normal  to theBase
9283                 theAngle Draft angle in degrees.
9284                 theName Object name; when specified, this parameter is used
9285                         for result publication in the study. Otherwise, if automatic
9286                         publication is switched on, default value is used for result name.
9287
9288             Returns:
9289                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
9290             """
9291             # Example: see GEOM_TestAll.py
9292             #theH,Parameters = ParseParameters(theH)
9293             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
9294             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9295             #anObj.SetParameters(Parameters)
9296             self._autoPublish(anObj, theName, "extrudedCut")
9297             return anObj   
9298             
9299         ## Add material to a solid by extrusion of the base shape on the given distance.
9300         #  @param theInit Shape to add material to. It must be a solid or 
9301         #  a compound made of a single solid.
9302         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9303         #  @param theH Prism dimension along the normal to theBase
9304         #  @param theAngle Draft angle in degrees.
9305         #  @param theName Object name; when specified, this parameter is used
9306         #         for result publication in the study. Otherwise, if automatic
9307         #         publication is switched on, default value is used for result name.
9308         #
9309         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
9310         #
9311         #  @ref tui_creation_prism "Example"
9312         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
9313             """
9314             Add material to a solid by extrusion of the base shape on the given distance.
9315
9316             Parameters:
9317                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
9318                 theBase Closed edge or wire defining the base shape to be extruded.
9319                 theH Prism dimension along the normal  to theBase
9320                 theAngle Draft angle in degrees.
9321                 theName Object name; when specified, this parameter is used
9322                         for result publication in the study. Otherwise, if automatic
9323                         publication is switched on, default value is used for result name.
9324
9325             Returns:
9326                 New GEOM.GEOM_Object,  containing the initial shape with added material.
9327             """
9328             # Example: see GEOM_TestAll.py
9329             #theH,Parameters = ParseParameters(theH)
9330             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
9331             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9332             #anObj.SetParameters(Parameters)
9333             self._autoPublish(anObj, theName, "extrudedBoss")
9334             return anObj   
9335
9336         # end of l3_local
9337         ## @}
9338
9339         ## @addtogroup l3_basic_op
9340         ## @{
9341
9342         ## Perform an Archimde operation on the given shape with given parameters.
9343         #  The object presenting the resulting face is returned.
9344         #  @param theShape Shape to be put in water.
9345         #  @param theWeight Weight og the shape.
9346         #  @param theWaterDensity Density of the water.
9347         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
9348         #  @param theName Object name; when specified, this parameter is used
9349         #         for result publication in the study. Otherwise, if automatic
9350         #         publication is switched on, default value is used for result name.
9351         #
9352         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
9353         #          by a plane, corresponding to water level.
9354         #
9355         #  @ref tui_archimede "Example"
9356         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
9357             """
9358             Perform an Archimde operation on the given shape with given parameters.
9359             The object presenting the resulting face is returned.
9360
9361             Parameters: 
9362                 theShape Shape to be put in water.
9363                 theWeight Weight og the shape.
9364                 theWaterDensity Density of the water.
9365                 theMeshDeflection Deflection of the mesh, using to compute the section.
9366                 theName Object name; when specified, this parameter is used
9367                         for result publication in the study. Otherwise, if automatic
9368                         publication is switched on, default value is used for result name.
9369
9370             Returns: 
9371                 New GEOM.GEOM_Object, containing a section of theShape
9372                 by a plane, corresponding to water level.
9373             """
9374             # Example: see GEOM_TestAll.py
9375             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
9376               theWeight,theWaterDensity,theMeshDeflection)
9377             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
9378             RaiseIfFailed("MakeArchimede", self.LocalOp)
9379             anObj.SetParameters(Parameters)
9380             self._autoPublish(anObj, theName, "archimede")
9381             return anObj
9382
9383         # end of l3_basic_op
9384         ## @}
9385
9386         ## @addtogroup l2_measure
9387         ## @{
9388
9389         ## Get point coordinates
9390         #  @return [x, y, z]
9391         #
9392         #  @ref tui_measurement_tools_page "Example"
9393         def PointCoordinates(self,Point):
9394             """
9395             Get point coordinates
9396
9397             Returns:
9398                 [x, y, z]
9399             """
9400             # Example: see GEOM_TestMeasures.py
9401             aTuple = self.MeasuOp.PointCoordinates(Point)
9402             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9403             return aTuple 
9404         
9405         ## Get vector coordinates
9406         #  @return [x, y, z]
9407         #
9408         #  @ref tui_measurement_tools_page "Example"
9409         def VectorCoordinates(self,Vector):
9410             """
9411             Get vector coordinates
9412
9413             Returns:
9414                 [x, y, z]
9415             """
9416
9417             p1=self.GetFirstVertex(Vector)
9418             p2=self.GetLastVertex(Vector)
9419             
9420             X1=self.PointCoordinates(p1)
9421             X2=self.PointCoordinates(p2)
9422
9423             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9424
9425
9426         ## Compute cross product
9427         #  @return vector w=u^v
9428         #
9429         #  @ref tui_measurement_tools_page "Example"
9430         def CrossProduct(self, Vector1, Vector2):
9431             """ 
9432             Compute cross product
9433             
9434             Returns: vector w=u^v
9435             """
9436             u=self.VectorCoordinates(Vector1)
9437             v=self.VectorCoordinates(Vector2)
9438             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])
9439             
9440             return w
9441         
9442         ## Compute cross product
9443         #  @return dot product  p=u.v
9444         #
9445         #  @ref tui_measurement_tools_page "Example"
9446         def DotProduct(self, Vector1, Vector2):
9447             """ 
9448             Compute cross product
9449             
9450             Returns: dot product  p=u.v
9451             """
9452             u=self.VectorCoordinates(Vector1)
9453             v=self.VectorCoordinates(Vector2)
9454             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9455             
9456             return p
9457
9458
9459         ## Get summarized length of all wires,
9460         #  area of surface and volume of the given shape.
9461         #  @param theShape Shape to define properties of.
9462         #  @return [theLength, theSurfArea, theVolume]\n
9463         #  theLength:   Summarized length of all wires of the given shape.\n
9464         #  theSurfArea: Area of surface of the given shape.\n
9465         #  theVolume:   Volume of the given shape.
9466         #
9467         #  @ref tui_measurement_tools_page "Example"
9468         def BasicProperties(self,theShape):
9469             """
9470             Get summarized length of all wires,
9471             area of surface and volume of the given shape.
9472
9473             Parameters: 
9474                 theShape Shape to define properties of.
9475
9476             Returns:
9477                 [theLength, theSurfArea, theVolume]
9478                  theLength:   Summarized length of all wires of the given shape.
9479                  theSurfArea: Area of surface of the given shape.
9480                  theVolume:   Volume of the given shape.
9481             """
9482             # Example: see GEOM_TestMeasures.py
9483             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9484             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9485             return aTuple
9486
9487         ## Get parameters of bounding box of the given shape
9488         #  @param theShape Shape to obtain bounding box of.
9489         #  @param precise TRUE for precise computation; FALSE for fast one.
9490         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9491         #  Xmin,Xmax: Limits of shape along OX axis.
9492         #  Ymin,Ymax: Limits of shape along OY axis.
9493         #  Zmin,Zmax: Limits of shape along OZ axis.
9494         #
9495         #  @ref tui_measurement_tools_page "Example"
9496         def BoundingBox (self, theShape, precise=False):
9497             """
9498             Get parameters of bounding box of the given shape
9499
9500             Parameters: 
9501                 theShape Shape to obtain bounding box of.
9502                 precise TRUE for precise computation; FALSE for fast one.
9503
9504             Returns:
9505                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9506                  Xmin,Xmax: Limits of shape along OX axis.
9507                  Ymin,Ymax: Limits of shape along OY axis.
9508                  Zmin,Zmax: Limits of shape along OZ axis.
9509             """
9510             # Example: see GEOM_TestMeasures.py
9511             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9512             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9513             return aTuple
9514
9515         ## Get bounding box of the given shape
9516         #  @param theShape Shape to obtain bounding box of.
9517         #  @param precise TRUE for precise computation; FALSE for fast one.
9518         #  @param theName Object name; when specified, this parameter is used
9519         #         for result publication in the study. Otherwise, if automatic
9520         #         publication is switched on, default value is used for result name.
9521         #
9522         #  @return New GEOM.GEOM_Object, containing the created box.
9523         #
9524         #  @ref tui_measurement_tools_page "Example"
9525         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9526             """
9527             Get bounding box of the given shape
9528
9529             Parameters: 
9530                 theShape Shape to obtain bounding box of.
9531                 precise TRUE for precise computation; FALSE for fast one.
9532                 theName Object name; when specified, this parameter is used
9533                         for result publication in the study. Otherwise, if automatic
9534                         publication is switched on, default value is used for result name.
9535
9536             Returns:
9537                 New GEOM.GEOM_Object, containing the created box.
9538             """
9539             # Example: see GEOM_TestMeasures.py
9540             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9541             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9542             self._autoPublish(anObj, theName, "bndbox")
9543             return anObj
9544
9545         ## Get inertia matrix and moments of inertia of theShape.
9546         #  @param theShape Shape to calculate inertia of.
9547         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9548         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9549         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9550         #
9551         #  @ref tui_measurement_tools_page "Example"
9552         def Inertia(self,theShape):
9553             """
9554             Get inertia matrix and moments of inertia of theShape.
9555
9556             Parameters: 
9557                 theShape Shape to calculate inertia of.
9558
9559             Returns:
9560                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9561                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9562                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9563             """
9564             # Example: see GEOM_TestMeasures.py
9565             aTuple = self.MeasuOp.GetInertia(theShape)
9566             RaiseIfFailed("GetInertia", self.MeasuOp)
9567             return aTuple
9568
9569         ## Get if coords are included in the shape (ST_IN or ST_ON)
9570         #  @param theShape Shape
9571         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9572         #  @param tolerance to be used (default is 1.0e-7)
9573         #  @return list_of_boolean = [res1, res2, ...]
9574         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9575             """
9576             Get if coords are included in the shape (ST_IN or ST_ON)
9577             
9578             Parameters: 
9579                 theShape Shape
9580                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9581                 tolerance to be used (default is 1.0e-7)
9582
9583             Returns:
9584                 list_of_boolean = [res1, res2, ...]
9585             """
9586             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9587
9588         ## Get minimal distance between the given shapes.
9589         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9590         #  @return Value of the minimal distance between the given shapes.
9591         #
9592         #  @ref tui_measurement_tools_page "Example"
9593         def MinDistance(self, theShape1, theShape2):
9594             """
9595             Get minimal distance between the given shapes.
9596             
9597             Parameters: 
9598                 theShape1,theShape2 Shapes to find minimal distance between.
9599
9600             Returns:    
9601                 Value of the minimal distance between the given shapes.
9602             """
9603             # Example: see GEOM_TestMeasures.py
9604             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9605             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9606             return aTuple[0]
9607
9608         ## Get minimal distance between the given shapes.
9609         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9610         #  @return Value of the minimal distance between the given shapes, in form of list
9611         #          [Distance, DX, DY, DZ].
9612         #
9613         #  @ref swig_all_measure "Example"
9614         def MinDistanceComponents(self, theShape1, theShape2):
9615             """
9616             Get minimal distance between the given shapes.
9617
9618             Parameters: 
9619                 theShape1,theShape2 Shapes to find minimal distance between.
9620
9621             Returns:  
9622                 Value of the minimal distance between the given shapes, in form of list
9623                 [Distance, DX, DY, DZ]
9624             """
9625             # Example: see GEOM_TestMeasures.py
9626             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9627             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9628             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9629             return aRes
9630
9631         ## Get closest points of the given shapes.
9632         #  @param theShape1,theShape2 Shapes to find closest points of.
9633         #  @return The number of found solutions (-1 in case of infinite number of
9634         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9635         #
9636         #  @ref tui_measurement_tools_page "Example"
9637         def ClosestPoints (self, theShape1, theShape2):
9638             """
9639             Get closest points of the given shapes.
9640
9641             Parameters: 
9642                 theShape1,theShape2 Shapes to find closest points of.
9643
9644             Returns:    
9645                 The number of found solutions (-1 in case of infinite number of
9646                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9647             """
9648             # Example: see GEOM_TestMeasures.py
9649             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9650             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9651             return aTuple
9652
9653         ## Get angle between the given shapes in degrees.
9654         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9655         #  @note If both arguments are vectors, the angle is computed in accordance
9656         #        with their orientations, otherwise the minimum angle is computed.
9657         #  @return Value of the angle between the given shapes in degrees.
9658         #
9659         #  @ref tui_measurement_tools_page "Example"
9660         def GetAngle(self, theShape1, theShape2):
9661             """
9662             Get angle between the given shapes in degrees.
9663
9664             Parameters: 
9665                 theShape1,theShape2 Lines or linear edges to find angle between.
9666
9667             Note:
9668                 If both arguments are vectors, the angle is computed in accordance
9669                 with their orientations, otherwise the minimum angle is computed.
9670
9671             Returns:  
9672                 Value of the angle between the given shapes in degrees.
9673             """
9674             # Example: see GEOM_TestMeasures.py
9675             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
9676             RaiseIfFailed("GetAngle", self.MeasuOp)
9677             return anAngle
9678
9679         ## Get angle between the given shapes in radians.
9680         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9681         #  @note If both arguments are vectors, the angle is computed in accordance
9682         #        with their orientations, otherwise the minimum angle is computed.
9683         #  @return Value of the angle between the given shapes in radians.
9684         #
9685         #  @ref tui_measurement_tools_page "Example"
9686         def GetAngleRadians(self, theShape1, theShape2):
9687             """
9688             Get angle between the given shapes in radians.
9689
9690             Parameters: 
9691                 theShape1,theShape2 Lines or linear edges to find angle between.
9692
9693                 
9694             Note:
9695                 If both arguments are vectors, the angle is computed in accordance
9696                 with their orientations, otherwise the minimum angle is computed.
9697
9698             Returns:  
9699                 Value of the angle between the given shapes in radians.
9700             """
9701             # Example: see GEOM_TestMeasures.py
9702             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
9703             RaiseIfFailed("GetAngle", self.MeasuOp)
9704             return anAngle
9705
9706         ## Get angle between the given vectors in degrees.
9707         #  @param theShape1,theShape2 Vectors to find angle between.
9708         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
9709         #                 if False, the opposite vector to the normal vector is used.
9710         #  @return Value of the angle between the given vectors in degrees.
9711         #
9712         #  @ref tui_measurement_tools_page "Example"
9713         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
9714             """
9715             Get angle between the given vectors in degrees.
9716
9717             Parameters: 
9718                 theShape1,theShape2 Vectors to find angle between.
9719                 theFlag If True, the normal vector is defined by the two vectors cross,
9720                         if False, the opposite vector to the normal vector is used.
9721
9722             Returns:  
9723                 Value of the angle between the given vectors in degrees.
9724             """
9725             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
9726             if not theFlag:
9727                 anAngle = 360. - anAngle
9728             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
9729             return anAngle
9730
9731         ## The same as GetAngleVectors, but the result is in radians.
9732         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
9733             """
9734             Get angle between the given vectors in radians.
9735
9736             Parameters: 
9737                 theShape1,theShape2 Vectors to find angle between.
9738                 theFlag If True, the normal vector is defined by the two vectors cross,
9739                         if False, the opposite vector to the normal vector is used.
9740
9741             Returns:  
9742                 Value of the angle between the given vectors in radians.
9743             """
9744             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
9745             return anAngle
9746
9747         ## @name Curve Curvature Measurement
9748         #  Methods for receiving radius of curvature of curves
9749         #  in the given point
9750         ## @{
9751
9752         ## Measure curvature of a curve at a point, set by parameter.
9753         #  @param theCurve a curve.
9754         #  @param theParam parameter.
9755         #  @return radius of curvature of \a theCurve.
9756         #
9757         #  @ref swig_todo "Example"
9758         def CurveCurvatureByParam(self, theCurve, theParam):
9759             """
9760             Measure curvature of a curve at a point, set by parameter.
9761
9762             Parameters: 
9763                 theCurve a curve.
9764                 theParam parameter.
9765
9766             Returns: 
9767                 radius of curvature of theCurve.
9768             """
9769             # Example: see GEOM_TestMeasures.py
9770             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
9771             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
9772             return aCurv
9773
9774         ## Measure curvature of a curve at a point.
9775         #  @param theCurve a curve.
9776         #  @param thePoint given point.
9777         #  @return radius of curvature of \a theCurve.
9778         #
9779         #  @ref swig_todo "Example"
9780         def CurveCurvatureByPoint(self, theCurve, thePoint):
9781             """
9782             Measure curvature of a curve at a point.
9783
9784             Parameters: 
9785                 theCurve a curve.
9786                 thePoint given point.
9787
9788             Returns: 
9789                 radius of curvature of theCurve.           
9790             """
9791             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
9792             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
9793             return aCurv
9794         ## @}
9795
9796         ## @name Surface Curvature Measurement
9797         #  Methods for receiving max and min radius of curvature of surfaces
9798         #  in the given point
9799         ## @{
9800
9801         ## Measure max radius of curvature of surface.
9802         #  @param theSurf the given surface.
9803         #  @param theUParam Value of U-parameter on the referenced surface.
9804         #  @param theVParam Value of V-parameter on the referenced surface.
9805         #  @return max radius of curvature of theSurf.
9806         #
9807         ## @ref swig_todo "Example"
9808         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9809             """
9810             Measure max radius of curvature of surface.
9811
9812             Parameters: 
9813                 theSurf the given surface.
9814                 theUParam Value of U-parameter on the referenced surface.
9815                 theVParam Value of V-parameter on the referenced surface.
9816                 
9817             Returns:     
9818                 max radius of curvature of theSurf.
9819             """
9820             # Example: see GEOM_TestMeasures.py
9821             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9822             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
9823             return aSurf
9824
9825         ## Measure max radius of curvature of surface in the given point
9826         #  @param theSurf the given surface.
9827         #  @param thePoint given point.
9828         #  @return max radius of curvature of theSurf.
9829         #
9830         ## @ref swig_todo "Example"
9831         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
9832             """
9833             Measure max radius of curvature of surface in the given point.
9834
9835             Parameters: 
9836                 theSurf the given surface.
9837                 thePoint given point.
9838                 
9839             Returns:     
9840                 max radius of curvature of theSurf.          
9841             """
9842             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
9843             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
9844             return aSurf
9845
9846         ## Measure min radius of curvature of surface.
9847         #  @param theSurf the given surface.
9848         #  @param theUParam Value of U-parameter on the referenced surface.
9849         #  @param theVParam Value of V-parameter on the referenced surface.
9850         #  @return min radius of curvature of theSurf.
9851         #   
9852         ## @ref swig_todo "Example"
9853         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9854             """
9855             Measure min radius of curvature of surface.
9856
9857             Parameters: 
9858                 theSurf the given surface.
9859                 theUParam Value of U-parameter on the referenced surface.
9860                 theVParam Value of V-parameter on the referenced surface.
9861                 
9862             Returns:     
9863                 Min radius of curvature of theSurf.
9864             """
9865             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9866             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
9867             return aSurf
9868
9869         ## Measure min radius of curvature of surface in the given point
9870         #  @param theSurf the given surface.
9871         #  @param thePoint given point.
9872         #  @return min radius of curvature of theSurf.
9873         #
9874         ## @ref swig_todo "Example"
9875         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
9876             """
9877             Measure min radius of curvature of surface in the given point.
9878
9879             Parameters: 
9880                 theSurf the given surface.
9881                 thePoint given point.
9882                 
9883             Returns:     
9884                 Min radius of curvature of theSurf.          
9885             """
9886             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
9887             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
9888             return aSurf
9889         ## @}
9890
9891         ## Get min and max tolerances of sub-shapes of theShape
9892         #  @param theShape Shape, to get tolerances of.
9893         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
9894         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
9895         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
9896         #  VertMin,VertMax: Min and max tolerances of the vertices.
9897         #
9898         #  @ref tui_measurement_tools_page "Example"
9899         def Tolerance(self,theShape):
9900             """
9901             Get min and max tolerances of sub-shapes of theShape
9902
9903             Parameters: 
9904                 theShape Shape, to get tolerances of.
9905
9906             Returns:    
9907                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
9908                  FaceMin,FaceMax: Min and max tolerances of the faces.
9909                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
9910                  VertMin,VertMax: Min and max tolerances of the vertices.
9911             """
9912             # Example: see GEOM_TestMeasures.py
9913             aTuple = self.MeasuOp.GetTolerance(theShape)
9914             RaiseIfFailed("GetTolerance", self.MeasuOp)
9915             return aTuple
9916
9917         ## Obtain description of the given shape (number of sub-shapes of each type)
9918         #  @param theShape Shape to be described.
9919         #  @return Description of the given shape.
9920         #
9921         #  @ref tui_measurement_tools_page "Example"
9922         def WhatIs(self,theShape):
9923             """
9924             Obtain description of the given shape (number of sub-shapes of each type)
9925
9926             Parameters:
9927                 theShape Shape to be described.
9928
9929             Returns:
9930                 Description of the given shape.
9931             """
9932             # Example: see GEOM_TestMeasures.py
9933             aDescr = self.MeasuOp.WhatIs(theShape)
9934             RaiseIfFailed("WhatIs", self.MeasuOp)
9935             return aDescr
9936
9937         ## Obtain quantity of shapes of the given type in \a theShape.
9938         #  If \a theShape is of type \a theType, it is also counted.
9939         #  @param theShape Shape to be described.
9940         #  @param theType the given ShapeType().
9941         #  @return Quantity of shapes of type \a theType in \a theShape.
9942         #
9943         #  @ref tui_measurement_tools_page "Example"
9944         def NbShapes (self, theShape, theType):
9945             """
9946             Obtain quantity of shapes of the given type in theShape.
9947             If theShape is of type theType, it is also counted.
9948
9949             Parameters:
9950                 theShape Shape to be described.
9951                 theType the given geompy.ShapeType
9952
9953             Returns:
9954                 Quantity of shapes of type theType in theShape.
9955             """
9956             # Example: see GEOM_TestMeasures.py
9957             listSh = self.SubShapeAllIDs(theShape, theType)
9958             Nb = len(listSh)
9959             return Nb
9960
9961         ## Obtain quantity of shapes of each type in \a theShape.
9962         #  The \a theShape is also counted.
9963         #  @param theShape Shape to be described.
9964         #  @return Dictionary of ShapeType() with bound quantities of shapes.
9965         #
9966         #  @ref tui_measurement_tools_page "Example"
9967         def ShapeInfo (self, theShape):
9968             """
9969             Obtain quantity of shapes of each type in theShape.
9970             The theShape is also counted.
9971
9972             Parameters:
9973                 theShape Shape to be described.
9974
9975             Returns:
9976                 Dictionary of geompy.ShapeType with bound quantities of shapes.
9977             """
9978             # Example: see GEOM_TestMeasures.py
9979             aDict = {}
9980             for typeSh in self.ShapeType:
9981                 if typeSh in ( "AUTO", "SHAPE" ): continue
9982                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
9983                 Nb = len(listSh)
9984                 aDict[typeSh] = Nb
9985                 pass
9986             return aDict
9987
9988         def GetCreationInformation(self, theShape):
9989             info = theShape.GetCreationInformation()
9990             # operationName
9991             opName = info.operationName
9992             if not opName: opName = "no info available"
9993             res = "Operation: " + opName
9994             # parameters
9995             for parVal in info.params:
9996                 res += " \n %s = %s" % ( parVal.name, parVal.value )
9997             return res
9998
9999         ## Get a point, situated at the centre of mass of theShape.
10000         #  @param theShape Shape to define centre of mass of.
10001         #  @param theName Object name; when specified, this parameter is used
10002         #         for result publication in the study. Otherwise, if automatic
10003         #         publication is switched on, default value is used for result name.
10004         #
10005         #  @return New GEOM.GEOM_Object, containing the created point.
10006         #
10007         #  @ref tui_measurement_tools_page "Example"
10008         def MakeCDG(self, theShape, theName=None):
10009             """
10010             Get a point, situated at the centre of mass of theShape.
10011
10012             Parameters:
10013                 theShape Shape to define centre of mass of.
10014                 theName Object name; when specified, this parameter is used
10015                         for result publication in the study. Otherwise, if automatic
10016                         publication is switched on, default value is used for result name.
10017
10018             Returns:
10019                 New GEOM.GEOM_Object, containing the created point.
10020             """
10021             # Example: see GEOM_TestMeasures.py
10022             anObj = self.MeasuOp.GetCentreOfMass(theShape)
10023             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
10024             self._autoPublish(anObj, theName, "centerOfMass")
10025             return anObj
10026
10027         ## Get a vertex sub-shape by index depended with orientation.
10028         #  @param theShape Shape to find sub-shape.
10029         #  @param theIndex Index to find vertex by this index (starting from zero)
10030         #  @param theName Object name; when specified, this parameter is used
10031         #         for result publication in the study. Otherwise, if automatic
10032         #         publication is switched on, default value is used for result name.
10033         #
10034         #  @return New GEOM.GEOM_Object, containing the created vertex.
10035         #
10036         #  @ref tui_measurement_tools_page "Example"
10037         def GetVertexByIndex(self, theShape, theIndex, theName=None):
10038             """
10039             Get a vertex sub-shape by index depended with orientation.
10040
10041             Parameters:
10042                 theShape Shape to find sub-shape.
10043                 theIndex Index to find vertex by this index (starting from zero)
10044                 theName Object name; when specified, this parameter is used
10045                         for result publication in the study. Otherwise, if automatic
10046                         publication is switched on, default value is used for result name.
10047
10048             Returns:
10049                 New GEOM.GEOM_Object, containing the created vertex.
10050             """
10051             # Example: see GEOM_TestMeasures.py
10052             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
10053             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
10054             self._autoPublish(anObj, theName, "vertex")
10055             return anObj
10056
10057         ## Get the first vertex of wire/edge depended orientation.
10058         #  @param theShape Shape to find first vertex.
10059         #  @param theName Object name; when specified, this parameter is used
10060         #         for result publication in the study. Otherwise, if automatic
10061         #         publication is switched on, default value is used for result name.
10062         #
10063         #  @return New GEOM.GEOM_Object, containing the created vertex.
10064         #
10065         #  @ref tui_measurement_tools_page "Example"
10066         def GetFirstVertex(self, theShape, theName=None):
10067             """
10068             Get the first vertex of wire/edge depended orientation.
10069
10070             Parameters:
10071                 theShape Shape to find first vertex.
10072                 theName Object name; when specified, this parameter is used
10073                         for result publication in the study. Otherwise, if automatic
10074                         publication is switched on, default value is used for result name.
10075
10076             Returns:    
10077                 New GEOM.GEOM_Object, containing the created vertex.
10078             """
10079             # Example: see GEOM_TestMeasures.py
10080             # note: auto-publishing is done in self.GetVertexByIndex()
10081             anObj = self.GetVertexByIndex(theShape, 0, theName)
10082             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
10083             return anObj
10084
10085         ## Get the last vertex of wire/edge depended orientation.
10086         #  @param theShape Shape to find last vertex.
10087         #  @param theName Object name; when specified, this parameter is used
10088         #         for result publication in the study. Otherwise, if automatic
10089         #         publication is switched on, default value is used for result name.
10090         #
10091         #  @return New GEOM.GEOM_Object, containing the created vertex.
10092         #
10093         #  @ref tui_measurement_tools_page "Example"
10094         def GetLastVertex(self, theShape, theName=None):
10095             """
10096             Get the last vertex of wire/edge depended orientation.
10097
10098             Parameters: 
10099                 theShape Shape to find last vertex.
10100                 theName Object name; when specified, this parameter is used
10101                         for result publication in the study. Otherwise, if automatic
10102                         publication is switched on, default value is used for result name.
10103
10104             Returns:   
10105                 New GEOM.GEOM_Object, containing the created vertex.
10106             """
10107             # Example: see GEOM_TestMeasures.py
10108             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
10109             # note: auto-publishing is done in self.GetVertexByIndex()
10110             anObj = self.GetVertexByIndex(theShape, (nb_vert-1), theName)
10111             RaiseIfFailed("GetLastVertex", self.MeasuOp)
10112             return anObj
10113
10114         ## Get a normale to the given face. If the point is not given,
10115         #  the normale is calculated at the center of mass.
10116         #  @param theFace Face to define normale of.
10117         #  @param theOptionalPoint Point to compute the normale at.
10118         #  @param theName Object name; when specified, this parameter is used
10119         #         for result publication in the study. Otherwise, if automatic
10120         #         publication is switched on, default value is used for result name.
10121         #
10122         #  @return New GEOM.GEOM_Object, containing the created vector.
10123         #
10124         #  @ref swig_todo "Example"
10125         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
10126             """
10127             Get a normale to the given face. If the point is not given,
10128             the normale is calculated at the center of mass.
10129             
10130             Parameters: 
10131                 theFace Face to define normale of.
10132                 theOptionalPoint Point to compute the normale at.
10133                 theName Object name; when specified, this parameter is used
10134                         for result publication in the study. Otherwise, if automatic
10135                         publication is switched on, default value is used for result name.
10136
10137             Returns:   
10138                 New GEOM.GEOM_Object, containing the created vector.
10139             """
10140             # Example: see GEOM_TestMeasures.py
10141             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
10142             RaiseIfFailed("GetNormal", self.MeasuOp)
10143             self._autoPublish(anObj, theName, "normal")
10144             return anObj
10145
10146         ## Print shape errors obtained from CheckShape.
10147         #  @param theShape Shape that was checked.
10148         #  @param theShapeErrors the shape errors obtained by CheckShape.
10149         #  @param theReturnStatus If 0 the description of problem is printed.
10150         #                         If 1 the description of problem is returned.
10151         #  @return If theReturnStatus is equal to 1 the description is returned.
10152         #          Otherwise doesn't return anything.
10153         #
10154         #  @ref tui_measurement_tools_page "Example"
10155         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
10156             """
10157             Print shape errors obtained from CheckShape.
10158
10159             Parameters:
10160                 theShape Shape that was checked.
10161                 theShapeErrors the shape errors obtained by CheckShape.
10162                 theReturnStatus If 0 the description of problem is printed.
10163                                 If 1 the description of problem is returned.
10164
10165             Returns:
10166                 If theReturnStatus is equal to 1 the description is returned.
10167                   Otherwise doesn't return anything.
10168             """
10169             # Example: see GEOM_TestMeasures.py
10170             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
10171             if theReturnStatus == 1:
10172                 return Descr
10173             print Descr
10174             pass
10175
10176         ## Check a topology of the given shape.
10177         #  @param theShape Shape to check validity of.
10178         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
10179         #                        if TRUE, the shape's geometry will be checked also.
10180         #  @param theReturnStatus If 0 and if theShape is invalid, a description
10181         #                         of problem is printed.
10182         #                         If 1 isValid flag and the description of
10183         #                         problem is returned.
10184         #                         If 2 isValid flag and the list of error data
10185         #                         is returned.
10186         #  @return TRUE, if the shape "seems to be valid".
10187         #          If theShape is invalid, prints a description of problem.
10188         #          If theReturnStatus is equal to 1 the description is returned
10189         #          along with IsValid flag.
10190         #          If theReturnStatus is equal to 2 the list of error data is
10191         #          returned along with IsValid flag.
10192         #
10193         #  @ref tui_measurement_tools_page "Example"
10194         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
10195             """
10196             Check a topology of the given shape.
10197
10198             Parameters: 
10199                 theShape Shape to check validity of.
10200                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
10201                                if TRUE, the shape's geometry will be checked also.
10202                 theReturnStatus If 0 and if theShape is invalid, a description
10203                                 of problem is printed.
10204                                 If 1 IsValid flag and the description of
10205                                 problem is returned.
10206                                 If 2 IsValid flag and the list of error data
10207                                 is returned.
10208
10209             Returns:   
10210                 TRUE, if the shape "seems to be valid".
10211                 If theShape is invalid, prints a description of problem.
10212                 If theReturnStatus is equal to 1 the description is returned
10213                 along with IsValid flag.
10214                 If theReturnStatus is equal to 2 the list of error data is
10215                 returned along with IsValid flag.
10216             """
10217             # Example: see GEOM_TestMeasures.py
10218             if theIsCheckGeom:
10219                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
10220                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
10221             else:
10222                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
10223                 RaiseIfFailed("CheckShape", self.MeasuOp)
10224             if IsValid == 0:
10225                 if theReturnStatus == 0:
10226                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10227                     print Descr
10228             if theReturnStatus == 1:
10229               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10230               return (IsValid, Descr)
10231             elif theReturnStatus == 2:
10232               return (IsValid, ShapeErrors)
10233             return IsValid
10234
10235         ## Detect self-intersections in the given shape.
10236         #  @param theShape Shape to check.
10237         #  @return TRUE, if the shape contains no self-intersections.
10238         #
10239         #  @ref tui_measurement_tools_page "Example"
10240         def CheckSelfIntersections(self, theShape):
10241             """
10242             Detect self-intersections in the given shape.
10243
10244             Parameters: 
10245                 theShape Shape to check.
10246
10247             Returns:   
10248                 TRUE, if the shape contains no self-intersections.
10249             """
10250             # Example: see GEOM_TestMeasures.py
10251             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
10252             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
10253             return IsValid
10254
10255         ## Get position (LCS) of theShape.
10256         #
10257         #  Origin of the LCS is situated at the shape's center of mass.
10258         #  Axes of the LCS are obtained from shape's location or,
10259         #  if the shape is a planar face, from position of its plane.
10260         #
10261         #  @param theShape Shape to calculate position of.
10262         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10263         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
10264         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10265         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10266         #
10267         #  @ref swig_todo "Example"
10268         def GetPosition(self,theShape):
10269             """
10270             Get position (LCS) of theShape.
10271             Origin of the LCS is situated at the shape's center of mass.
10272             Axes of the LCS are obtained from shape's location or,
10273             if the shape is a planar face, from position of its plane.
10274
10275             Parameters: 
10276                 theShape Shape to calculate position of.
10277
10278             Returns:  
10279                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10280                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
10281                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10282                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10283             """
10284             # Example: see GEOM_TestMeasures.py
10285             aTuple = self.MeasuOp.GetPosition(theShape)
10286             RaiseIfFailed("GetPosition", self.MeasuOp)
10287             return aTuple
10288
10289         ## Get kind of theShape.
10290         #
10291         #  @param theShape Shape to get a kind of.
10292         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
10293         #          and a list of parameters, describing the shape.
10294         #  @note  Concrete meaning of each value, returned via \a theIntegers
10295         #         or \a theDoubles list depends on the kind() of the shape.
10296         #
10297         #  @ref swig_todo "Example"
10298         def KindOfShape(self,theShape):
10299             """
10300             Get kind of theShape.
10301          
10302             Parameters: 
10303                 theShape Shape to get a kind of.
10304
10305             Returns:
10306                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
10307                     and a list of parameters, describing the shape.
10308             Note:
10309                 Concrete meaning of each value, returned via theIntegers
10310                 or theDoubles list depends on the geompy.kind of the shape
10311             """
10312             # Example: see GEOM_TestMeasures.py
10313             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
10314             RaiseIfFailed("KindOfShape", self.MeasuOp)
10315
10316             aKind  = aRoughTuple[0]
10317             anInts = aRoughTuple[1]
10318             aDbls  = aRoughTuple[2]
10319
10320             # Now there is no exception from this rule:
10321             aKindTuple = [aKind] + aDbls + anInts
10322
10323             # If they are we will regroup parameters for such kind of shape.
10324             # For example:
10325             #if aKind == kind.SOME_KIND:
10326             #    #  SOME_KIND     int int double int double double
10327             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
10328
10329             return aKindTuple
10330
10331         # end of l2_measure
10332         ## @}
10333
10334         ## @addtogroup l2_import_export
10335         ## @{
10336
10337         ## Import a shape from the BREP or IGES or STEP file
10338         #  (depends on given format) with given name.
10339         #  @param theFileName The file, containing the shape.
10340         #  @param theFormatName Specify format for the file reading.
10341         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
10342         #         If format 'IGES_SCALE' is used instead of 'IGES' or
10343         #            format 'STEP_SCALE' is used instead of 'STEP',
10344         #            length unit will be set to 'meter' and result model will be scaled.
10345         #  @param theName Object name; when specified, this parameter is used
10346         #         for result publication in the study. Otherwise, if automatic
10347         #         publication is switched on, default value is used for result name.
10348         #
10349         #  @return New GEOM.GEOM_Object, containing the imported shape.
10350         #          If material names are imported it returns the list of
10351         #          objects. The first one is the imported object followed by
10352         #          material groups.
10353         #  @note Auto publishing is allowed for the shape itself. Imported
10354         #        material groups are not automatically published.
10355         #
10356         #  @ref swig_Import_Export "Example"
10357         def ImportFile(self, theFileName, theFormatName, theName=None):
10358             """
10359             Import a shape from the BREP or IGES or STEP file
10360             (depends on given format) with given name.
10361
10362             Parameters: 
10363                 theFileName The file, containing the shape.
10364                 theFormatName Specify format for the file reading.
10365                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
10366                     If format 'IGES_SCALE' is used instead of 'IGES' or
10367                        format 'STEP_SCALE' is used instead of 'STEP',
10368                        length unit will be set to 'meter' and result model will be scaled.
10369                 theName Object name; when specified, this parameter is used
10370                         for result publication in the study. Otherwise, if automatic
10371                         publication is switched on, default value is used for result name.
10372
10373             Returns:
10374                 New GEOM.GEOM_Object, containing the imported shape.
10375                 If material names are imported it returns the list of
10376                 objects. The first one is the imported object followed by
10377                 material groups.
10378             Note:
10379                 Auto publishing is allowed for the shape itself. Imported
10380                 material groups are not automatically published.
10381             """
10382             # Example: see GEOM_TestOthers.py
10383             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
10384             RaiseIfFailed("ImportFile", self.InsertOp)
10385             aNbObj = len(aListObj)
10386             if aNbObj > 0:
10387                 self._autoPublish(aListObj[0], theName, "imported")
10388             if aNbObj == 1:
10389                 return aListObj[0]
10390             return aListObj
10391
10392         ## Deprecated analog of ImportFile()
10393         def Import(self, theFileName, theFormatName, theName=None):
10394             """
10395             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
10396             """
10397             print "WARNING: Function Import is deprecated, use ImportFile instead"
10398             # note: auto-publishing is done in self.ImportFile()
10399             return self.ImportFile(theFileName, theFormatName, theName)
10400
10401         ## Shortcut to ImportFile() for BREP format.
10402         #  Import a shape from the BREP file with given name.
10403         #  @param theFileName The file, containing the shape.
10404         #  @param theName Object name; when specified, this parameter is used
10405         #         for result publication in the study. Otherwise, if automatic
10406         #         publication is switched on, default value is used for result name.
10407         #
10408         #  @return New GEOM.GEOM_Object, containing the imported shape.
10409         #
10410         #  @ref swig_Import_Export "Example"
10411         def ImportBREP(self, theFileName, theName=None):
10412             """
10413             geompy.ImportFile(...) function for BREP format
10414             Import a shape from the BREP file with given name.
10415
10416             Parameters: 
10417                 theFileName The file, containing the shape.
10418                 theName Object name; when specified, this parameter is used
10419                         for result publication in the study. Otherwise, if automatic
10420                         publication is switched on, default value is used for result name.
10421
10422             Returns:
10423                 New GEOM.GEOM_Object, containing the imported shape.
10424             """
10425             # Example: see GEOM_TestOthers.py
10426             # note: auto-publishing is done in self.ImportFile()
10427             return self.ImportFile(theFileName, "BREP", theName)
10428
10429         ## Shortcut to ImportFile() for IGES format
10430         #  Import a shape from the IGES file with given name.
10431         #  @param theFileName The file, containing the shape.
10432         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10433         #                     and result model will be scaled, if its units are not meters.
10434         #                     If False (default), file length units will be taken into account.
10435         #  @param theName Object name; when specified, this parameter is used
10436         #         for result publication in the study. Otherwise, if automatic
10437         #         publication is switched on, default value is used for result name.
10438         #
10439         #  @return New GEOM.GEOM_Object, containing the imported shape.
10440         #
10441         #  @ref swig_Import_Export "Example"
10442         def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
10443             """
10444             geompy.ImportFile(...) function for IGES format
10445
10446             Parameters:
10447                 theFileName The file, containing the shape.
10448                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10449                             and result model will be scaled, if its units are not meters.
10450                             If False (default), file length units will be taken into account.
10451                 theName Object name; when specified, this parameter is used
10452                         for result publication in the study. Otherwise, if automatic
10453                         publication is switched on, default value is used for result name.
10454
10455             Returns:
10456                 New GEOM.GEOM_Object, containing the imported shape.
10457             """
10458             # Example: see GEOM_TestOthers.py
10459             # note: auto-publishing is done in self.ImportFile()
10460             if ignoreUnits:
10461                 return self.ImportFile(theFileName, "IGES_SCALE", theName)
10462             return self.ImportFile(theFileName, "IGES", theName)
10463
10464         ## Return length unit from given IGES file
10465         #  @param theFileName The file, containing the shape.
10466         #  @return String, containing the units name.
10467         #
10468         #  @ref swig_Import_Export "Example"
10469         def GetIGESUnit(self, theFileName):
10470             """
10471             Return length units from given IGES file
10472
10473             Parameters:
10474                 theFileName The file, containing the shape.
10475
10476             Returns:
10477                 String, containing the units name.
10478             """
10479             # Example: see GEOM_TestOthers.py
10480             aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
10481             return aUnitName
10482
10483         ## Shortcut to ImportFile() for STEP format
10484         #  Import a shape from the STEP file with given name.
10485         #  @param theFileName The file, containing the shape.
10486         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10487         #                     and result model will be scaled, if its units are not meters.
10488         #                     If False (default), file length units will be taken into account.
10489         #  @param theName Object name; when specified, this parameter is used
10490         #         for result publication in the study. Otherwise, if automatic
10491         #         publication is switched on, default value is used for result name.
10492         #
10493         #  @return New GEOM.GEOM_Object, containing the imported shape.
10494         #          If material names are imported it returns the list of
10495         #          objects. The first one is the imported object followed by
10496         #          material groups.
10497         #  @note Auto publishing is allowed for the shape itself. Imported
10498         #        material groups are not automatically published.
10499         #
10500         #  @ref swig_Import_Export "Example"
10501         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
10502             """
10503             geompy.ImportFile(...) function for STEP format
10504
10505             Parameters:
10506                 theFileName The file, containing the shape.
10507                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10508                             and result model will be scaled, if its units are not meters.
10509                             If False (default), file length units will be taken into account.
10510                 theName Object name; when specified, this parameter is used
10511                         for result publication in the study. Otherwise, if automatic
10512                         publication is switched on, default value is used for result name.
10513
10514             Returns:
10515                 New GEOM.GEOM_Object, containing the imported shape.
10516                 If material names are imported it returns the list of
10517                 objects. The first one is the imported object followed by
10518                 material groups.
10519             Note:
10520                 Auto publishing is allowed for the shape itself. Imported
10521                 material groups are not automatically published.
10522             """
10523             # Example: see GEOM_TestOthers.py
10524             # note: auto-publishing is done in self.ImportFile()
10525             if ignoreUnits:
10526                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
10527             return self.ImportFile(theFileName, "STEP", theName)
10528
10529         ## Return length unit from given IGES or STEP file
10530         #  @param theFileName The file, containing the shape.
10531         #  @return String, containing the units name.
10532         #
10533         #  @ref swig_Import_Export "Example"
10534         def GetSTEPUnit(self, theFileName):
10535             """
10536             Return length units from given STEP file
10537
10538             Parameters:
10539                 theFileName The file, containing the shape.
10540
10541             Returns:
10542                 String, containing the units name.
10543             """
10544             # Example: see GEOM_TestOthers.py
10545             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
10546             return aUnitName
10547
10548         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10549         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10550         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10551         #  @param theStream The BRep binary stream.
10552         #  @param theName Object name; when specified, this parameter is used
10553         #         for result publication in the study. Otherwise, if automatic
10554         #         publication is switched on, default value is used for result name.
10555         #
10556         #  @return New GEOM_Object, containing the shape, read from theStream.
10557         #
10558         #  @ref swig_Import_Export "Example"
10559         def RestoreShape (self, theStream, theName=None):
10560             """
10561             Read a shape from the binary stream, containing its bounding representation (BRep).
10562
10563             Note:
10564                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10565
10566             Parameters: 
10567                 theStream The BRep binary stream.
10568                 theName Object name; when specified, this parameter is used
10569                         for result publication in the study. Otherwise, if automatic
10570                         publication is switched on, default value is used for result name.
10571
10572             Returns:
10573                 New GEOM_Object, containing the shape, read from theStream.
10574             """
10575             # Example: see GEOM_TestOthers.py
10576             anObj = self.InsertOp.RestoreShape(theStream)
10577             RaiseIfFailed("RestoreShape", self.InsertOp)
10578             self._autoPublish(anObj, theName, "restored")
10579             return anObj
10580
10581         ## Export the given shape into a file with given name.
10582         #  @param theObject Shape to be stored in the file.
10583         #  @param theFileName Name of the file to store the given shape in.
10584         #  @param theFormatName Specify format for the shape storage.
10585         #         Available formats can be obtained with
10586         #         geompy.InsertOp.ExportTranslators()[0] method.
10587         #
10588         #  @ref swig_Import_Export "Example"
10589         def Export(self, theObject, theFileName, theFormatName):
10590             """
10591             Export the given shape into a file with given name.
10592
10593             Parameters: 
10594                 theObject Shape to be stored in the file.
10595                 theFileName Name of the file to store the given shape in.
10596                 theFormatName Specify format for the shape storage.
10597                               Available formats can be obtained with
10598                               geompy.InsertOp.ExportTranslators()[0] method.
10599             """
10600             # Example: see GEOM_TestOthers.py
10601             self.InsertOp.Export(theObject, theFileName, theFormatName)
10602             if self.InsertOp.IsDone() == 0:
10603                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10604                 pass
10605             pass
10606
10607         ## Shortcut to Export() for BREP format
10608         #
10609         #  @ref swig_Import_Export "Example"
10610         def ExportBREP(self,theObject, theFileName):
10611             """
10612             geompy.Export(...) function for BREP format
10613             """
10614             # Example: see GEOM_TestOthers.py
10615             return self.Export(theObject, theFileName, "BREP")
10616
10617         ## Shortcut to Export() for IGES format
10618         #
10619         #  @ref swig_Import_Export "Example"
10620         def ExportIGES(self,theObject, theFileName):
10621             """
10622             geompy.Export(...) function for IGES format
10623             """
10624             # Example: see GEOM_TestOthers.py
10625             return self.Export(theObject, theFileName, "IGES")
10626
10627         ## Shortcut to Export() for STEP format
10628         #
10629         #  @ref swig_Import_Export "Example"
10630         def ExportSTEP(self,theObject, theFileName):
10631             """
10632             geompy.Export(...) function for STEP format
10633             """
10634             # Example: see GEOM_TestOthers.py
10635             return self.Export(theObject, theFileName, "STEP")
10636
10637         # end of l2_import_export
10638         ## @}
10639
10640         ## @addtogroup l3_blocks
10641         ## @{
10642
10643         ## Create a quadrangle face from four edges. Order of Edges is not
10644         #  important. It is  not necessary that edges share the same vertex.
10645         #  @param E1,E2,E3,E4 Edges for the face bound.
10646         #  @param theName Object name; when specified, this parameter is used
10647         #         for result publication in the study. Otherwise, if automatic
10648         #         publication is switched on, default value is used for result name.
10649         #
10650         #  @return New GEOM.GEOM_Object, containing the created face.
10651         #
10652         #  @ref tui_building_by_blocks_page "Example"
10653         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10654             """
10655             Create a quadrangle face from four edges. Order of Edges is not
10656             important. It is  not necessary that edges share the same vertex.
10657
10658             Parameters: 
10659                 E1,E2,E3,E4 Edges for the face bound.
10660                 theName Object name; when specified, this parameter is used
10661                         for result publication in the study. Otherwise, if automatic
10662                         publication is switched on, default value is used for result name.
10663
10664             Returns: 
10665                 New GEOM.GEOM_Object, containing the created face.
10666
10667             Example of usage:               
10668                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10669             """
10670             # Example: see GEOM_Spanner.py
10671             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10672             RaiseIfFailed("MakeQuad", self.BlocksOp)
10673             self._autoPublish(anObj, theName, "quad")
10674             return anObj
10675
10676         ## Create a quadrangle face on two edges.
10677         #  The missing edges will be built by creating the shortest ones.
10678         #  @param E1,E2 Two opposite edges for the face.
10679         #  @param theName Object name; when specified, this parameter is used
10680         #         for result publication in the study. Otherwise, if automatic
10681         #         publication is switched on, default value is used for result name.
10682         #
10683         #  @return New GEOM.GEOM_Object, containing the created face.
10684         #
10685         #  @ref tui_building_by_blocks_page "Example"
10686         def MakeQuad2Edges(self, E1, E2, theName=None):
10687             """
10688             Create a quadrangle face on two edges.
10689             The missing edges will be built by creating the shortest ones.
10690
10691             Parameters: 
10692                 E1,E2 Two opposite edges for the face.
10693                 theName Object name; when specified, this parameter is used
10694                         for result publication in the study. Otherwise, if automatic
10695                         publication is switched on, default value is used for result name.
10696
10697             Returns: 
10698                 New GEOM.GEOM_Object, containing the created face.
10699             
10700             Example of usage:
10701                 # create vertices
10702                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10703                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10704                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10705                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10706                 # create edges
10707                 edge1 = geompy.MakeEdge(p1, p2)
10708                 edge2 = geompy.MakeEdge(p3, p4)
10709                 # create a quadrangle face from two edges
10710                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10711             """
10712             # Example: see GEOM_Spanner.py
10713             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10714             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10715             self._autoPublish(anObj, theName, "quad")
10716             return anObj
10717
10718         ## Create a quadrangle face with specified corners.
10719         #  The missing edges will be built by creating the shortest ones.
10720         #  @param V1,V2,V3,V4 Corner vertices for the face.
10721         #  @param theName Object name; when specified, this parameter is used
10722         #         for result publication in the study. Otherwise, if automatic
10723         #         publication is switched on, default value is used for result name.
10724         #
10725         #  @return New GEOM.GEOM_Object, containing the created face.
10726         #
10727         #  @ref tui_building_by_blocks_page "Example 1"
10728         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10729         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10730             """
10731             Create a quadrangle face with specified corners.
10732             The missing edges will be built by creating the shortest ones.
10733
10734             Parameters: 
10735                 V1,V2,V3,V4 Corner vertices for the face.
10736                 theName Object name; when specified, this parameter is used
10737                         for result publication in the study. Otherwise, if automatic
10738                         publication is switched on, default value is used for result name.
10739
10740             Returns: 
10741                 New GEOM.GEOM_Object, containing the created face.
10742
10743             Example of usage:
10744                 # create vertices
10745                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10746                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10747                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10748                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10749                 # create a quadrangle from four points in its corners
10750                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10751             """
10752             # Example: see GEOM_Spanner.py
10753             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10754             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10755             self._autoPublish(anObj, theName, "quad")
10756             return anObj
10757
10758         ## Create a hexahedral solid, bounded by the six given faces. Order of
10759         #  faces is not important. It is  not necessary that Faces share the same edge.
10760         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10761         #  @param theName Object name; when specified, this parameter is used
10762         #         for result publication in the study. Otherwise, if automatic
10763         #         publication is switched on, default value is used for result name.
10764         #
10765         #  @return New GEOM.GEOM_Object, containing the created solid.
10766         #
10767         #  @ref tui_building_by_blocks_page "Example 1"
10768         #  \n @ref swig_MakeHexa "Example 2"
10769         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
10770             """
10771             Create a hexahedral solid, bounded by the six given faces. Order of
10772             faces is not important. It is  not necessary that Faces share the same edge.
10773
10774             Parameters: 
10775                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10776                 theName Object name; when specified, this parameter is used
10777                         for result publication in the study. Otherwise, if automatic
10778                         publication is switched on, default value is used for result name.
10779
10780             Returns:    
10781                 New GEOM.GEOM_Object, containing the created solid.
10782
10783             Example of usage:
10784                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
10785             """
10786             # Example: see GEOM_Spanner.py
10787             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
10788             RaiseIfFailed("MakeHexa", self.BlocksOp)
10789             self._autoPublish(anObj, theName, "hexa")
10790             return anObj
10791
10792         ## Create a hexahedral solid between two given faces.
10793         #  The missing faces will be built by creating the smallest ones.
10794         #  @param F1,F2 Two opposite faces for the hexahedral solid.
10795         #  @param theName Object name; when specified, this parameter is used
10796         #         for result publication in the study. Otherwise, if automatic
10797         #         publication is switched on, default value is used for result name.
10798         #
10799         #  @return New GEOM.GEOM_Object, containing the created solid.
10800         #
10801         #  @ref tui_building_by_blocks_page "Example 1"
10802         #  \n @ref swig_MakeHexa2Faces "Example 2"
10803         def MakeHexa2Faces(self, F1, F2, theName=None):
10804             """
10805             Create a hexahedral solid between two given faces.
10806             The missing faces will be built by creating the smallest ones.
10807
10808             Parameters: 
10809                 F1,F2 Two opposite faces for the hexahedral solid.
10810                 theName Object name; when specified, this parameter is used
10811                         for result publication in the study. Otherwise, if automatic
10812                         publication is switched on, default value is used for result name.
10813
10814             Returns:
10815                 New GEOM.GEOM_Object, containing the created solid.
10816
10817             Example of usage:
10818                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
10819             """
10820             # Example: see GEOM_Spanner.py
10821             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
10822             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
10823             self._autoPublish(anObj, theName, "hexa")
10824             return anObj
10825
10826         # end of l3_blocks
10827         ## @}
10828
10829         ## @addtogroup l3_blocks_op
10830         ## @{
10831
10832         ## Get a vertex, found in the given shape by its coordinates.
10833         #  @param theShape Block or a compound of blocks.
10834         #  @param theX,theY,theZ Coordinates of the sought vertex.
10835         #  @param theEpsilon Maximum allowed distance between the resulting
10836         #                    vertex and point with the given coordinates.
10837         #  @param theName Object name; when specified, this parameter is used
10838         #         for result publication in the study. Otherwise, if automatic
10839         #         publication is switched on, default value is used for result name.
10840         #
10841         #  @return New GEOM.GEOM_Object, containing the found vertex.
10842         #
10843         #  @ref swig_GetPoint "Example"
10844         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
10845             """
10846             Get a vertex, found in the given shape by its coordinates.
10847
10848             Parameters: 
10849                 theShape Block or a compound of blocks.
10850                 theX,theY,theZ Coordinates of the sought vertex.
10851                 theEpsilon Maximum allowed distance between the resulting
10852                            vertex and point with the given coordinates.
10853                 theName Object name; when specified, this parameter is used
10854                         for result publication in the study. Otherwise, if automatic
10855                         publication is switched on, default value is used for result name.
10856
10857             Returns:                  
10858                 New GEOM.GEOM_Object, containing the found vertex.
10859
10860             Example of usage:
10861                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
10862             """
10863             # Example: see GEOM_TestOthers.py
10864             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
10865             RaiseIfFailed("GetPoint", self.BlocksOp)
10866             self._autoPublish(anObj, theName, "vertex")
10867             return anObj
10868
10869         ## Find a vertex of the given shape, which has minimal distance to the given point.
10870         #  @param theShape Any shape.
10871         #  @param thePoint Point, close to the desired vertex.
10872         #  @param theName Object name; when specified, this parameter is used
10873         #         for result publication in the study. Otherwise, if automatic
10874         #         publication is switched on, default value is used for result name.
10875         #
10876         #  @return New GEOM.GEOM_Object, containing the found vertex.
10877         #
10878         #  @ref swig_GetVertexNearPoint "Example"
10879         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
10880             """
10881             Find a vertex of the given shape, which has minimal distance to the given point.
10882
10883             Parameters: 
10884                 theShape Any shape.
10885                 thePoint Point, close to the desired vertex.
10886                 theName Object name; when specified, this parameter is used
10887                         for result publication in the study. Otherwise, if automatic
10888                         publication is switched on, default value is used for result name.
10889
10890             Returns:
10891                 New GEOM.GEOM_Object, containing the found vertex.
10892
10893             Example of usage:
10894                 pmidle = geompy.MakeVertex(50, 0, 50)
10895                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
10896             """
10897             # Example: see GEOM_TestOthers.py
10898             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
10899             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
10900             self._autoPublish(anObj, theName, "vertex")
10901             return anObj
10902
10903         ## Get an edge, found in the given shape by two given vertices.
10904         #  @param theShape Block or a compound of blocks.
10905         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
10906         #  @param theName Object name; when specified, this parameter is used
10907         #         for result publication in the study. Otherwise, if automatic
10908         #         publication is switched on, default value is used for result name.
10909         #
10910         #  @return New GEOM.GEOM_Object, containing the found edge.
10911         #
10912         #  @ref swig_GetEdge "Example"
10913         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
10914             """
10915             Get an edge, found in the given shape by two given vertices.
10916
10917             Parameters: 
10918                 theShape Block or a compound of blocks.
10919                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
10920                 theName Object name; when specified, this parameter is used
10921                         for result publication in the study. Otherwise, if automatic
10922                         publication is switched on, default value is used for result name.
10923
10924             Returns:
10925                 New GEOM.GEOM_Object, containing the found edge.
10926             """
10927             # Example: see GEOM_Spanner.py
10928             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
10929             RaiseIfFailed("GetEdge", self.BlocksOp)
10930             self._autoPublish(anObj, theName, "edge")
10931             return anObj
10932
10933         ## Find an edge of the given shape, which has minimal distance to the given point.
10934         #  @param theShape Block or a compound of blocks.
10935         #  @param thePoint Point, close to the desired edge.
10936         #  @param theName Object name; when specified, this parameter is used
10937         #         for result publication in the study. Otherwise, if automatic
10938         #         publication is switched on, default value is used for result name.
10939         #
10940         #  @return New GEOM.GEOM_Object, containing the found edge.
10941         #
10942         #  @ref swig_GetEdgeNearPoint "Example"
10943         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
10944             """
10945             Find an edge of the given shape, which has minimal distance to the given point.
10946
10947             Parameters: 
10948                 theShape Block or a compound of blocks.
10949                 thePoint Point, close to the desired edge.
10950                 theName Object name; when specified, this parameter is used
10951                         for result publication in the study. Otherwise, if automatic
10952                         publication is switched on, default value is used for result name.
10953
10954             Returns:
10955                 New GEOM.GEOM_Object, containing the found edge.
10956             """
10957             # Example: see GEOM_TestOthers.py
10958             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
10959             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
10960             self._autoPublish(anObj, theName, "edge")
10961             return anObj
10962
10963         ## Returns a face, found in the given shape by four given corner vertices.
10964         #  @param theShape Block or a compound of blocks.
10965         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10966         #  @param theName Object name; when specified, this parameter is used
10967         #         for result publication in the study. Otherwise, if automatic
10968         #         publication is switched on, default value is used for result name.
10969         #
10970         #  @return New GEOM.GEOM_Object, containing the found face.
10971         #
10972         #  @ref swig_todo "Example"
10973         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
10974             """
10975             Returns a face, found in the given shape by four given corner vertices.
10976
10977             Parameters:
10978                 theShape Block or a compound of blocks.
10979                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10980                 theName Object name; when specified, this parameter is used
10981                         for result publication in the study. Otherwise, if automatic
10982                         publication is switched on, default value is used for result name.
10983
10984             Returns:
10985                 New GEOM.GEOM_Object, containing the found face.
10986             """
10987             # Example: see GEOM_Spanner.py
10988             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
10989             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
10990             self._autoPublish(anObj, theName, "face")
10991             return anObj
10992
10993         ## Get a face of block, found in the given shape by two given edges.
10994         #  @param theShape Block or a compound of blocks.
10995         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
10996         #  @param theName Object name; when specified, this parameter is used
10997         #         for result publication in the study. Otherwise, if automatic
10998         #         publication is switched on, default value is used for result name.
10999         #
11000         #  @return New GEOM.GEOM_Object, containing the found face.
11001         #
11002         #  @ref swig_todo "Example"
11003         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
11004             """
11005             Get a face of block, found in the given shape by two given edges.
11006
11007             Parameters:
11008                 theShape Block or a compound of blocks.
11009                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
11010                 theName Object name; when specified, this parameter is used
11011                         for result publication in the study. Otherwise, if automatic
11012                         publication is switched on, default value is used for result name.
11013
11014             Returns:
11015                 New GEOM.GEOM_Object, containing the found face.
11016             """
11017             # Example: see GEOM_Spanner.py
11018             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
11019             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
11020             self._autoPublish(anObj, theName, "face")
11021             return anObj
11022
11023         ## Find a face, opposite to the given one in the given block.
11024         #  @param theBlock Must be a hexahedral solid.
11025         #  @param theFace Face of \a theBlock, opposite to the desired face.
11026         #  @param theName Object name; when specified, this parameter is used
11027         #         for result publication in the study. Otherwise, if automatic
11028         #         publication is switched on, default value is used for result name.
11029         #
11030         #  @return New GEOM.GEOM_Object, containing the found face.
11031         #
11032         #  @ref swig_GetOppositeFace "Example"
11033         def GetOppositeFace(self, theBlock, theFace, theName=None):
11034             """
11035             Find a face, opposite to the given one in the given block.
11036
11037             Parameters:
11038                 theBlock Must be a hexahedral solid.
11039                 theFace Face of theBlock, opposite to the desired face.
11040                 theName Object name; when specified, this parameter is used
11041                         for result publication in the study. Otherwise, if automatic
11042                         publication is switched on, default value is used for result name.
11043
11044             Returns: 
11045                 New GEOM.GEOM_Object, containing the found face.
11046             """
11047             # Example: see GEOM_Spanner.py
11048             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
11049             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
11050             self._autoPublish(anObj, theName, "face")
11051             return anObj
11052
11053         ## Find a face of the given shape, which has minimal distance to the given point.
11054         #  @param theShape Block or a compound of blocks.
11055         #  @param thePoint Point, close to the desired face.
11056         #  @param theName Object name; when specified, this parameter is used
11057         #         for result publication in the study. Otherwise, if automatic
11058         #         publication is switched on, default value is used for result name.
11059         #
11060         #  @return New GEOM.GEOM_Object, containing the found face.
11061         #
11062         #  @ref swig_GetFaceNearPoint "Example"
11063         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
11064             """
11065             Find a face of the given shape, which has minimal distance to the given point.
11066
11067             Parameters:
11068                 theShape Block or a compound of blocks.
11069                 thePoint Point, close to the desired face.
11070                 theName Object name; when specified, this parameter is used
11071                         for result publication in the study. Otherwise, if automatic
11072                         publication is switched on, default value is used for result name.
11073
11074             Returns:
11075                 New GEOM.GEOM_Object, containing the found face.
11076             """
11077             # Example: see GEOM_Spanner.py
11078             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
11079             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
11080             self._autoPublish(anObj, theName, "face")
11081             return anObj
11082
11083         ## Find a face of block, whose outside normale has minimal angle with the given vector.
11084         #  @param theBlock Block or a compound of blocks.
11085         #  @param theVector Vector, close to the normale of the desired face.
11086         #  @param theName Object name; when specified, this parameter is used
11087         #         for result publication in the study. Otherwise, if automatic
11088         #         publication is switched on, default value is used for result name.
11089         #
11090         #  @return New GEOM.GEOM_Object, containing the found face.
11091         #
11092         #  @ref swig_todo "Example"
11093         def GetFaceByNormale(self, theBlock, theVector, theName=None):
11094             """
11095             Find a face of block, whose outside normale has minimal angle with the given vector.
11096
11097             Parameters:
11098                 theBlock Block or a compound of blocks.
11099                 theVector Vector, close to the normale of the desired face.
11100                 theName Object name; when specified, this parameter is used
11101                         for result publication in the study. Otherwise, if automatic
11102                         publication is switched on, default value is used for result name.
11103
11104             Returns:
11105                 New GEOM.GEOM_Object, containing the found face.
11106             """
11107             # Example: see GEOM_Spanner.py
11108             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
11109             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
11110             self._autoPublish(anObj, theName, "face")
11111             return anObj
11112
11113         ## Find all sub-shapes of type \a theShapeType of the given shape,
11114         #  which have minimal distance to the given point.
11115         #  @param theShape Any shape.
11116         #  @param thePoint Point, close to the desired shape.
11117         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
11118         #  @param theTolerance The tolerance for distances comparison. All shapes
11119         #                      with distances to the given point in interval
11120         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
11121         #  @param theName Object name; when specified, this parameter is used
11122         #         for result publication in the study. Otherwise, if automatic
11123         #         publication is switched on, default value is used for result name.
11124         #
11125         #  @return New GEOM_Object, containing a group of all found shapes.
11126         #
11127         #  @ref swig_GetShapesNearPoint "Example"
11128         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
11129             """
11130             Find all sub-shapes of type theShapeType of the given shape,
11131             which have minimal distance to the given point.
11132
11133             Parameters:
11134                 theShape Any shape.
11135                 thePoint Point, close to the desired shape.
11136                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
11137                 theTolerance The tolerance for distances comparison. All shapes
11138                                 with distances to the given point in interval
11139                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
11140                 theName Object name; when specified, this parameter is used
11141                         for result publication in the study. Otherwise, if automatic
11142                         publication is switched on, default value is used for result name.
11143
11144             Returns:
11145                 New GEOM_Object, containing a group of all found shapes.
11146             """
11147             # Example: see GEOM_TestOthers.py
11148             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
11149             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
11150             self._autoPublish(anObj, theName, "group")
11151             return anObj
11152
11153         # end of l3_blocks_op
11154         ## @}
11155
11156         ## @addtogroup l4_blocks_measure
11157         ## @{
11158
11159         ## Check, if the compound of blocks is given.
11160         #  To be considered as a compound of blocks, the
11161         #  given shape must satisfy the following conditions:
11162         #  - Each element of the compound should be a Block (6 faces and 12 edges).
11163         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11164         #  - The compound should be connexe.
11165         #  - The glue between two quadrangle faces should be applied.
11166         #  @param theCompound The compound to check.
11167         #  @return TRUE, if the given shape is a compound of blocks.
11168         #  If theCompound is not valid, prints all discovered errors.
11169         #
11170         #  @ref tui_measurement_tools_page "Example 1"
11171         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
11172         def CheckCompoundOfBlocks(self,theCompound):
11173             """
11174             Check, if the compound of blocks is given.
11175             To be considered as a compound of blocks, the
11176             given shape must satisfy the following conditions:
11177             - Each element of the compound should be a Block (6 faces and 12 edges).
11178             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11179             - The compound should be connexe.
11180             - The glue between two quadrangle faces should be applied.
11181
11182             Parameters:
11183                 theCompound The compound to check.
11184
11185             Returns:
11186                 TRUE, if the given shape is a compound of blocks.
11187                 If theCompound is not valid, prints all discovered errors.            
11188             """
11189             # Example: see GEOM_Spanner.py
11190             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
11191             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
11192             if IsValid == 0:
11193                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
11194                 print Descr
11195             return IsValid
11196
11197         ## Retrieve all non blocks solids and faces from \a theShape.
11198         #  @param theShape The shape to explore.
11199         #  @param theName Object name; when specified, this parameter is used
11200         #         for result publication in the study. Otherwise, if automatic
11201         #         publication is switched on, default value is used for result name.
11202         #
11203         #  @return A tuple of two GEOM_Objects. The first object is a group of all
11204         #          non block solids (= not 6 faces, or with 6 faces, but with the
11205         #          presence of non-quadrangular faces). The second object is a
11206         #          group of all non quadrangular faces.
11207         #
11208         #  @ref tui_measurement_tools_page "Example 1"
11209         #  \n @ref swig_GetNonBlocks "Example 2"
11210         def GetNonBlocks (self, theShape, theName=None):
11211             """
11212             Retrieve all non blocks solids and faces from theShape.
11213
11214             Parameters:
11215                 theShape The shape to explore.
11216                 theName Object name; when specified, this parameter is used
11217                         for result publication in the study. Otherwise, if automatic
11218                         publication is switched on, default value is used for result name.
11219
11220             Returns:
11221                 A tuple of two GEOM_Objects. The first object is a group of all
11222                 non block solids (= not 6 faces, or with 6 faces, but with the
11223                 presence of non-quadrangular faces). The second object is a
11224                 group of all non quadrangular faces.
11225
11226             Usage:
11227                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
11228             """
11229             # Example: see GEOM_Spanner.py
11230             aTuple = self.BlocksOp.GetNonBlocks(theShape)
11231             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
11232             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
11233             return aTuple
11234
11235         ## Remove all seam and degenerated edges from \a theShape.
11236         #  Unite faces and edges, sharing one surface. It means that
11237         #  this faces must have references to one C++ surface object (handle).
11238         #  @param theShape The compound or single solid to remove irregular edges from.
11239         #  @param doUnionFaces If True, then unite faces. If False (the default value),
11240         #         do not unite faces.
11241         #  @param theName Object name; when specified, this parameter is used
11242         #         for result publication in the study. Otherwise, if automatic
11243         #         publication is switched on, default value is used for result name.
11244         #
11245         #  @return Improved shape.
11246         #
11247         #  @ref swig_RemoveExtraEdges "Example"
11248         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
11249             """
11250             Remove all seam and degenerated edges from theShape.
11251             Unite faces and edges, sharing one surface. It means that
11252             this faces must have references to one C++ surface object (handle).
11253
11254             Parameters:
11255                 theShape The compound or single solid to remove irregular edges from.
11256                 doUnionFaces If True, then unite faces. If False (the default value),
11257                              do not unite faces.
11258                 theName Object name; when specified, this parameter is used
11259                         for result publication in the study. Otherwise, if automatic
11260                         publication is switched on, default value is used for result name.
11261
11262             Returns: 
11263                 Improved shape.
11264             """
11265             # Example: see GEOM_TestOthers.py
11266             nbFacesOptimum = -1 # -1 means do not unite faces
11267             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
11268             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
11269             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
11270             self._autoPublish(anObj, theName, "removeExtraEdges")
11271             return anObj
11272
11273         ## Performs union faces of \a theShape
11274         #  Unite faces sharing one surface. It means that
11275         #  these faces must have references to one C++ surface object (handle).
11276         #  @param theShape The compound or single solid that contains faces
11277         #         to perform union.
11278         #  @param theName Object name; when specified, this parameter is used
11279         #         for result publication in the study. Otherwise, if automatic
11280         #         publication is switched on, default value is used for result name.
11281         #
11282         #  @return Improved shape.
11283         #
11284         #  @ref swig_UnionFaces "Example"
11285         def UnionFaces(self, theShape, theName=None):
11286             """
11287             Performs union faces of theShape.
11288             Unite faces sharing one surface. It means that
11289             these faces must have references to one C++ surface object (handle).
11290
11291             Parameters:
11292                 theShape The compound or single solid that contains faces
11293                          to perform union.
11294                 theName Object name; when specified, this parameter is used
11295                         for result publication in the study. Otherwise, if automatic
11296                         publication is switched on, default value is used for result name.
11297
11298             Returns: 
11299                 Improved shape.
11300             """
11301             # Example: see GEOM_TestOthers.py
11302             anObj = self.BlocksOp.UnionFaces(theShape)
11303             RaiseIfFailed("UnionFaces", self.BlocksOp)
11304             self._autoPublish(anObj, theName, "unionFaces")
11305             return anObj
11306
11307         ## Check, if the given shape is a blocks compound.
11308         #  Fix all detected errors.
11309         #    \note Single block can be also fixed by this method.
11310         #  @param theShape The compound to check and improve.
11311         #  @param theName Object name; when specified, this parameter is used
11312         #         for result publication in the study. Otherwise, if automatic
11313         #         publication is switched on, default value is used for result name.
11314         #
11315         #  @return Improved compound.
11316         #
11317         #  @ref swig_CheckAndImprove "Example"
11318         def CheckAndImprove(self, theShape, theName=None):
11319             """
11320             Check, if the given shape is a blocks compound.
11321             Fix all detected errors.
11322
11323             Note:
11324                 Single block can be also fixed by this method.
11325
11326             Parameters:
11327                 theShape The compound to check and improve.
11328                 theName Object name; when specified, this parameter is used
11329                         for result publication in the study. Otherwise, if automatic
11330                         publication is switched on, default value is used for result name.
11331
11332             Returns: 
11333                 Improved compound.
11334             """
11335             # Example: see GEOM_TestOthers.py
11336             anObj = self.BlocksOp.CheckAndImprove(theShape)
11337             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
11338             self._autoPublish(anObj, theName, "improved")
11339             return anObj
11340
11341         # end of l4_blocks_measure
11342         ## @}
11343
11344         ## @addtogroup l3_blocks_op
11345         ## @{
11346
11347         ## Get all the blocks, contained in the given compound.
11348         #  @param theCompound The compound to explode.
11349         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
11350         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
11351         #  @param theName Object name; when specified, this parameter is used
11352         #         for result publication in the study. Otherwise, if automatic
11353         #         publication is switched on, default value is used for result name.
11354         #
11355         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11356         #
11357         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
11358         #
11359         #  @ref tui_explode_on_blocks "Example 1"
11360         #  \n @ref swig_MakeBlockExplode "Example 2"
11361         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
11362             """
11363             Get all the blocks, contained in the given compound.
11364
11365             Parameters:
11366                 theCompound The compound to explode.
11367                 theMinNbFaces If solid has lower number of faces, it is not a block.
11368                 theMaxNbFaces If solid has higher number of faces, it is not a block.
11369                 theName Object name; when specified, this parameter is used
11370                         for result publication in the study. Otherwise, if automatic
11371                         publication is switched on, default value is used for result name.
11372
11373             Note:
11374                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11375
11376             Returns:  
11377                 List of GEOM.GEOM_Object, containing the retrieved blocks.
11378             """
11379             # Example: see GEOM_TestOthers.py
11380             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
11381             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
11382             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
11383             for anObj in aList:
11384                 anObj.SetParameters(Parameters)
11385                 pass
11386             self._autoPublish(aList, theName, "block")
11387             return aList
11388
11389         ## Find block, containing the given point inside its volume or on boundary.
11390         #  @param theCompound Compound, to find block in.
11391         #  @param thePoint Point, close to the desired block. If the point lays on
11392         #         boundary between some blocks, we return block with nearest center.
11393         #  @param theName Object name; when specified, this parameter is used
11394         #         for result publication in the study. Otherwise, if automatic
11395         #         publication is switched on, default value is used for result name.
11396         #
11397         #  @return New GEOM.GEOM_Object, containing the found block.
11398         #
11399         #  @ref swig_todo "Example"
11400         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
11401             """
11402             Find block, containing the given point inside its volume or on boundary.
11403
11404             Parameters:
11405                 theCompound Compound, to find block in.
11406                 thePoint Point, close to the desired block. If the point lays on
11407                          boundary between some blocks, we return block with nearest center.
11408                 theName Object name; when specified, this parameter is used
11409                         for result publication in the study. Otherwise, if automatic
11410                         publication is switched on, default value is used for result name.
11411
11412             Returns:
11413                 New GEOM.GEOM_Object, containing the found block.
11414             """
11415             # Example: see GEOM_Spanner.py
11416             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
11417             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
11418             self._autoPublish(anObj, theName, "block")
11419             return anObj
11420
11421         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11422         #  @param theCompound Compound, to find block in.
11423         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
11424         #  @param theName Object name; when specified, this parameter is used
11425         #         for result publication in the study. Otherwise, if automatic
11426         #         publication is switched on, default value is used for result name.
11427         #
11428         #  @return New GEOM.GEOM_Object, containing the found block.
11429         #
11430         #  @ref swig_GetBlockByParts "Example"
11431         def GetBlockByParts(self, theCompound, theParts, theName=None):
11432             """
11433              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11434
11435              Parameters:
11436                 theCompound Compound, to find block in.
11437                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
11438                 theName Object name; when specified, this parameter is used
11439                         for result publication in the study. Otherwise, if automatic
11440                         publication is switched on, default value is used for result name.
11441
11442             Returns: 
11443                 New GEOM_Object, containing the found block.
11444             """
11445             # Example: see GEOM_TestOthers.py
11446             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
11447             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
11448             self._autoPublish(anObj, theName, "block")
11449             return anObj
11450
11451         ## Return all blocks, containing all the elements, passed as the parts.
11452         #  @param theCompound Compound, to find blocks in.
11453         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11454         #  @param theName Object name; when specified, this parameter is used
11455         #         for result publication in the study. Otherwise, if automatic
11456         #         publication is switched on, default value is used for result name.
11457         #
11458         #  @return List of GEOM.GEOM_Object, containing the found blocks.
11459         #
11460         #  @ref swig_todo "Example"
11461         def GetBlocksByParts(self, theCompound, theParts, theName=None):
11462             """
11463             Return all blocks, containing all the elements, passed as the parts.
11464
11465             Parameters:
11466                 theCompound Compound, to find blocks in.
11467                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11468                 theName Object name; when specified, this parameter is used
11469                         for result publication in the study. Otherwise, if automatic
11470                         publication is switched on, default value is used for result name.
11471
11472             Returns:
11473                 List of GEOM.GEOM_Object, containing the found blocks.
11474             """
11475             # Example: see GEOM_Spanner.py
11476             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11477             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11478             self._autoPublish(aList, theName, "block")
11479             return aList
11480
11481         ## Multi-transformate block and glue the result.
11482         #  Transformation is defined so, as to superpose direction faces.
11483         #  @param Block Hexahedral solid to be multi-transformed.
11484         #  @param DirFace1 ID of First direction face.
11485         #  @param DirFace2 ID of Second direction face.
11486         #  @param NbTimes Quantity of transformations to be done.
11487         #  @param theName Object name; when specified, this parameter is used
11488         #         for result publication in the study. Otherwise, if automatic
11489         #         publication is switched on, default value is used for result name.
11490         #
11491         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11492         #
11493         #  @return New GEOM.GEOM_Object, containing the result shape.
11494         #
11495         #  @ref tui_multi_transformation "Example"
11496         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11497             """
11498             Multi-transformate block and glue the result.
11499             Transformation is defined so, as to superpose direction faces.
11500
11501             Parameters:
11502                 Block Hexahedral solid to be multi-transformed.
11503                 DirFace1 ID of First direction face.
11504                 DirFace2 ID of Second direction face.
11505                 NbTimes Quantity of transformations to be done.
11506                 theName Object name; when specified, this parameter is used
11507                         for result publication in the study. Otherwise, if automatic
11508                         publication is switched on, default value is used for result name.
11509
11510             Note:
11511                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11512
11513             Returns:
11514                 New GEOM.GEOM_Object, containing the result shape.
11515             """
11516             # Example: see GEOM_Spanner.py
11517             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11518             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11519             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11520             anObj.SetParameters(Parameters)
11521             self._autoPublish(anObj, theName, "transformed")
11522             return anObj
11523
11524         ## Multi-transformate block and glue the result.
11525         #  @param Block Hexahedral solid to be multi-transformed.
11526         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11527         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11528         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11529         #  @param theName Object name; when specified, this parameter is used
11530         #         for result publication in the study. Otherwise, if automatic
11531         #         publication is switched on, default value is used for result name.
11532         #
11533         #  @return New GEOM.GEOM_Object, containing the result shape.
11534         #
11535         #  @ref tui_multi_transformation "Example"
11536         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11537                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11538             """
11539             Multi-transformate block and glue the result.
11540
11541             Parameters:
11542                 Block Hexahedral solid to be multi-transformed.
11543                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11544                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11545                 NbTimesU,NbTimesV Quantity of transformations to be done.
11546                 theName Object name; when specified, this parameter is used
11547                         for result publication in the study. Otherwise, if automatic
11548                         publication is switched on, default value is used for result name.
11549
11550             Returns:
11551                 New GEOM.GEOM_Object, containing the result shape.
11552             """
11553             # Example: see GEOM_Spanner.py
11554             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11555               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11556             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11557                                                             DirFace1V, DirFace2V, NbTimesV)
11558             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11559             anObj.SetParameters(Parameters)
11560             self._autoPublish(anObj, theName, "transformed")
11561             return anObj
11562
11563         ## Build all possible propagation groups.
11564         #  Propagation group is a set of all edges, opposite to one (main)
11565         #  edge of this group directly or through other opposite edges.
11566         #  Notion of Opposite Edge make sence only on quadrangle face.
11567         #  @param theShape Shape to build propagation groups on.
11568         #  @param theName Object name; when specified, this parameter is used
11569         #         for result publication in the study. Otherwise, if automatic
11570         #         publication is switched on, default value is used for result name.
11571         #
11572         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11573         #
11574         #  @ref swig_Propagate "Example"
11575         def Propagate(self, theShape, theName=None):
11576             """
11577             Build all possible propagation groups.
11578             Propagation group is a set of all edges, opposite to one (main)
11579             edge of this group directly or through other opposite edges.
11580             Notion of Opposite Edge make sence only on quadrangle face.
11581
11582             Parameters:
11583                 theShape Shape to build propagation groups on.
11584                 theName Object name; when specified, this parameter is used
11585                         for result publication in the study. Otherwise, if automatic
11586                         publication is switched on, default value is used for result name.
11587
11588             Returns:
11589                 List of GEOM.GEOM_Object, each of them is a propagation group.
11590             """
11591             # Example: see GEOM_TestOthers.py
11592             listChains = self.BlocksOp.Propagate(theShape)
11593             RaiseIfFailed("Propagate", self.BlocksOp)
11594             self._autoPublish(listChains, theName, "propagate")
11595             return listChains
11596
11597         # end of l3_blocks_op
11598         ## @}
11599
11600         ## @addtogroup l3_groups
11601         ## @{
11602
11603         ## Creates a new group which will store sub-shapes of theMainShape
11604         #  @param theMainShape is a GEOM object on which the group is selected
11605         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
11606         #  @param theName Object name; when specified, this parameter is used
11607         #         for result publication in the study. Otherwise, if automatic
11608         #         publication is switched on, default value is used for result name.
11609         #
11610         #  @return a newly created GEOM group (GEOM.GEOM_Object)
11611         #
11612         #  @ref tui_working_with_groups_page "Example 1"
11613         #  \n @ref swig_CreateGroup "Example 2"
11614         def CreateGroup(self, theMainShape, theShapeType, theName=None):
11615             """
11616             Creates a new group which will store sub-shapes of theMainShape
11617
11618             Parameters:
11619                theMainShape is a GEOM object on which the group is selected
11620                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
11621                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
11622                 theName Object name; when specified, this parameter is used
11623                         for result publication in the study. Otherwise, if automatic
11624                         publication is switched on, default value is used for result name.
11625
11626             Returns:
11627                a newly created GEOM group
11628
11629             Example of usage:
11630                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
11631                 
11632             """
11633             # Example: see GEOM_TestOthers.py
11634             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
11635             RaiseIfFailed("CreateGroup", self.GroupOp)
11636             self._autoPublish(anObj, theName, "group")
11637             return anObj
11638
11639         ## Adds a sub-object with ID theSubShapeId to the group
11640         #  @param theGroup is a GEOM group to which the new sub-shape is added
11641         #  @param theSubShapeID is a sub-shape ID in the main object.
11642         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11643         #
11644         #  @ref tui_working_with_groups_page "Example"
11645         def AddObject(self,theGroup, theSubShapeID):
11646             """
11647             Adds a sub-object with ID theSubShapeId to the group
11648
11649             Parameters:
11650                 theGroup       is a GEOM group to which the new sub-shape is added
11651                 theSubShapeID  is a sub-shape ID in the main object.
11652
11653             Note:
11654                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
11655             """
11656             # Example: see GEOM_TestOthers.py
11657             self.GroupOp.AddObject(theGroup, theSubShapeID)
11658             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
11659                 RaiseIfFailed("AddObject", self.GroupOp)
11660                 pass
11661             pass
11662
11663         ## Removes a sub-object with ID \a theSubShapeId from the group
11664         #  @param theGroup is a GEOM group from which the new sub-shape is removed
11665         #  @param theSubShapeID is a sub-shape ID in the main object.
11666         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11667         #
11668         #  @ref tui_working_with_groups_page "Example"
11669         def RemoveObject(self,theGroup, theSubShapeID):
11670             """
11671             Removes a sub-object with ID theSubShapeId from the group
11672
11673             Parameters:
11674                 theGroup is a GEOM group from which the new sub-shape is removed
11675                 theSubShapeID is a sub-shape ID in the main object.
11676
11677             Note:
11678                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11679             """
11680             # Example: see GEOM_TestOthers.py
11681             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
11682             RaiseIfFailed("RemoveObject", self.GroupOp)
11683             pass
11684
11685         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11686         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11687         #  @param theSubShapes is a list of sub-shapes to be added.
11688         #
11689         #  @ref tui_working_with_groups_page "Example"
11690         def UnionList (self,theGroup, theSubShapes):
11691             """
11692             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11693
11694             Parameters:
11695                 theGroup is a GEOM group to which the new sub-shapes are added.
11696                 theSubShapes is a list of sub-shapes to be added.
11697             """
11698             # Example: see GEOM_TestOthers.py
11699             self.GroupOp.UnionList(theGroup, theSubShapes)
11700             RaiseIfFailed("UnionList", self.GroupOp)
11701             pass
11702
11703         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11704         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11705         #  @param theSubShapes is a list of indices of sub-shapes to be added.
11706         #
11707         #  @ref swig_UnionIDs "Example"
11708         def UnionIDs(self,theGroup, theSubShapes):
11709             """
11710             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11711
11712             Parameters:
11713                 theGroup is a GEOM group to which the new sub-shapes are added.
11714                 theSubShapes is a list of indices of sub-shapes to be added.
11715             """
11716             # Example: see GEOM_TestOthers.py
11717             self.GroupOp.UnionIDs(theGroup, theSubShapes)
11718             RaiseIfFailed("UnionIDs", self.GroupOp)
11719             pass
11720
11721         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11722         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11723         #  @param theSubShapes is a list of sub-shapes to be removed.
11724         #
11725         #  @ref tui_working_with_groups_page "Example"
11726         def DifferenceList (self,theGroup, theSubShapes):
11727             """
11728             Removes from the group all the given shapes. No errors, if some shapes are not included.
11729
11730             Parameters:
11731                 theGroup is a GEOM group from which the sub-shapes are removed.
11732                 theSubShapes is a list of sub-shapes to be removed.
11733             """
11734             # Example: see GEOM_TestOthers.py
11735             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11736             RaiseIfFailed("DifferenceList", self.GroupOp)
11737             pass
11738
11739         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11740         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11741         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
11742         #
11743         #  @ref swig_DifferenceIDs "Example"
11744         def DifferenceIDs(self,theGroup, theSubShapes):
11745             """
11746             Removes from the group all the given shapes. No errors, if some shapes are not included.
11747
11748             Parameters:
11749                 theGroup is a GEOM group from which the sub-shapes are removed.
11750                 theSubShapes is a list of indices of sub-shapes to be removed.
11751             """            
11752             # Example: see GEOM_TestOthers.py
11753             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
11754             RaiseIfFailed("DifferenceIDs", self.GroupOp)
11755             pass
11756
11757         ## Union of two groups.
11758         #  New group is created. It will contain all entities
11759         #  which are present in groups theGroup1 and theGroup2.
11760         #  @param theGroup1, theGroup2 are the initial GEOM groups
11761         #                              to create the united group from.
11762         #  @param theName Object name; when specified, this parameter is used
11763         #         for result publication in the study. Otherwise, if automatic
11764         #         publication is switched on, default value is used for result name.
11765         #
11766         #  @return a newly created GEOM group.
11767         #
11768         #  @ref tui_union_groups_anchor "Example"
11769         def UnionGroups (self, theGroup1, theGroup2, theName=None):
11770             """
11771             Union of two groups.
11772             New group is created. It will contain all entities
11773             which are present in groups theGroup1 and theGroup2.
11774
11775             Parameters:
11776                 theGroup1, theGroup2 are the initial GEOM groups
11777                                      to create the united group from.
11778                 theName Object name; when specified, this parameter is used
11779                         for result publication in the study. Otherwise, if automatic
11780                         publication is switched on, default value is used for result name.
11781
11782             Returns:
11783                 a newly created GEOM group.
11784             """
11785             # Example: see GEOM_TestOthers.py
11786             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
11787             RaiseIfFailed("UnionGroups", self.GroupOp)
11788             self._autoPublish(aGroup, theName, "group")
11789             return aGroup
11790
11791         ## Intersection of two groups.
11792         #  New group is created. It will contain only those entities
11793         #  which are present in both groups theGroup1 and theGroup2.
11794         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11795         #  @param theName Object name; when specified, this parameter is used
11796         #         for result publication in the study. Otherwise, if automatic
11797         #         publication is switched on, default value is used for result name.
11798         #
11799         #  @return a newly created GEOM group.
11800         #
11801         #  @ref tui_intersect_groups_anchor "Example"
11802         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
11803             """
11804             Intersection of two groups.
11805             New group is created. It will contain only those entities
11806             which are present in both groups theGroup1 and theGroup2.
11807
11808             Parameters:
11809                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11810                 theName Object name; when specified, this parameter is used
11811                         for result publication in the study. Otherwise, if automatic
11812                         publication is switched on, default value is used for result name.
11813
11814             Returns:
11815                 a newly created GEOM group.
11816             """
11817             # Example: see GEOM_TestOthers.py
11818             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
11819             RaiseIfFailed("IntersectGroups", self.GroupOp)
11820             self._autoPublish(aGroup, theName, "group")
11821             return aGroup
11822
11823         ## Cut of two groups.
11824         #  New group is created. It will contain entities which are
11825         #  present in group theGroup1 but are not present in group theGroup2.
11826         #  @param theGroup1 is a GEOM group to include elements of.
11827         #  @param theGroup2 is a GEOM group to exclude elements of.
11828         #  @param theName Object name; when specified, this parameter is used
11829         #         for result publication in the study. Otherwise, if automatic
11830         #         publication is switched on, default value is used for result name.
11831         #
11832         #  @return a newly created GEOM group.
11833         #
11834         #  @ref tui_cut_groups_anchor "Example"
11835         def CutGroups (self, theGroup1, theGroup2, theName=None):
11836             """
11837             Cut of two groups.
11838             New group is created. It will contain entities which are
11839             present in group theGroup1 but are not present in group theGroup2.
11840
11841             Parameters:
11842                 theGroup1 is a GEOM group to include elements of.
11843                 theGroup2 is a GEOM group to exclude elements of.
11844                 theName Object name; when specified, this parameter is used
11845                         for result publication in the study. Otherwise, if automatic
11846                         publication is switched on, default value is used for result name.
11847
11848             Returns:
11849                 a newly created GEOM group.
11850             """
11851             # Example: see GEOM_TestOthers.py
11852             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
11853             RaiseIfFailed("CutGroups", self.GroupOp)
11854             self._autoPublish(aGroup, theName, "group")
11855             return aGroup
11856
11857         ## Union of list of groups.
11858         #  New group is created. It will contain all entities that are
11859         #  present in groups listed in theGList.
11860         #  @param theGList is a list of GEOM groups to create the united group from.
11861         #  @param theName Object name; when specified, this parameter is used
11862         #         for result publication in the study. Otherwise, if automatic
11863         #         publication is switched on, default value is used for result name.
11864         #
11865         #  @return a newly created GEOM group.
11866         #
11867         #  @ref tui_union_groups_anchor "Example"
11868         def UnionListOfGroups (self, theGList, theName=None):
11869             """
11870             Union of list of groups.
11871             New group is created. It will contain all entities that are
11872             present in groups listed in theGList.
11873
11874             Parameters:
11875                 theGList is a list of GEOM groups to create the united group from.
11876                 theName Object name; when specified, this parameter is used
11877                         for result publication in the study. Otherwise, if automatic
11878                         publication is switched on, default value is used for result name.
11879
11880             Returns:
11881                 a newly created GEOM group.
11882             """
11883             # Example: see GEOM_TestOthers.py
11884             aGroup = self.GroupOp.UnionListOfGroups(theGList)
11885             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
11886             self._autoPublish(aGroup, theName, "group")
11887             return aGroup
11888
11889         ## Cut of lists of groups.
11890         #  New group is created. It will contain only entities
11891         #  which are present in groups listed in theGList.
11892         #  @param theGList is a list of GEOM groups to include elements of.
11893         #  @param theName Object name; when specified, this parameter is used
11894         #         for result publication in the study. Otherwise, if automatic
11895         #         publication is switched on, default value is used for result name.
11896         #
11897         #  @return a newly created GEOM group.
11898         #
11899         #  @ref tui_intersect_groups_anchor "Example"
11900         def IntersectListOfGroups (self, theGList, theName=None):
11901             """
11902             Cut of lists of groups.
11903             New group is created. It will contain only entities
11904             which are present in groups listed in theGList.
11905
11906             Parameters:
11907                 theGList is a list of GEOM groups to include elements of.
11908                 theName Object name; when specified, this parameter is used
11909                         for result publication in the study. Otherwise, if automatic
11910                         publication is switched on, default value is used for result name.
11911
11912             Returns:
11913                 a newly created GEOM group.
11914             """
11915             # Example: see GEOM_TestOthers.py
11916             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
11917             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
11918             self._autoPublish(aGroup, theName, "group")
11919             return aGroup
11920
11921         ## Cut of lists of groups.
11922         #  New group is created. It will contain only entities
11923         #  which are present in groups listed in theGList1 but 
11924         #  are not present in groups from theGList2.
11925         #  @param theGList1 is a list of GEOM groups to include elements of.
11926         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11927         #  @param theName Object name; when specified, this parameter is used
11928         #         for result publication in the study. Otherwise, if automatic
11929         #         publication is switched on, default value is used for result name.
11930         #
11931         #  @return a newly created GEOM group.
11932         #
11933         #  @ref tui_cut_groups_anchor "Example"
11934         def CutListOfGroups (self, theGList1, theGList2, theName=None):
11935             """
11936             Cut of lists of groups.
11937             New group is created. It will contain only entities
11938             which are present in groups listed in theGList1 but 
11939             are not present in groups from theGList2.
11940
11941             Parameters:
11942                 theGList1 is a list of GEOM groups to include elements of.
11943                 theGList2 is a list of GEOM groups to exclude elements of.
11944                 theName Object name; when specified, this parameter is used
11945                         for result publication in the study. Otherwise, if automatic
11946                         publication is switched on, default value is used for result name.
11947
11948             Returns:
11949                 a newly created GEOM group.
11950             """
11951             # Example: see GEOM_TestOthers.py
11952             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
11953             RaiseIfFailed("CutListOfGroups", self.GroupOp)
11954             self._autoPublish(aGroup, theName, "group")
11955             return aGroup
11956
11957         ## Returns a list of sub-objects ID stored in the group
11958         #  @param theGroup is a GEOM group for which a list of IDs is requested
11959         #
11960         #  @ref swig_GetObjectIDs "Example"
11961         def GetObjectIDs(self,theGroup):
11962             """
11963             Returns a list of sub-objects ID stored in the group
11964
11965             Parameters:
11966                 theGroup is a GEOM group for which a list of IDs is requested
11967             """
11968             # Example: see GEOM_TestOthers.py
11969             ListIDs = self.GroupOp.GetObjects(theGroup)
11970             RaiseIfFailed("GetObjects", self.GroupOp)
11971             return ListIDs
11972
11973         ## Returns a type of sub-objects stored in the group
11974         #  @param theGroup is a GEOM group which type is returned.
11975         #
11976         #  @ref swig_GetType "Example"
11977         def GetType(self,theGroup):
11978             """
11979             Returns a type of sub-objects stored in the group
11980
11981             Parameters:
11982                 theGroup is a GEOM group which type is returned.
11983             """
11984             # Example: see GEOM_TestOthers.py
11985             aType = self.GroupOp.GetType(theGroup)
11986             RaiseIfFailed("GetType", self.GroupOp)
11987             return aType
11988
11989         ## Convert a type of geom object from id to string value
11990         #  @param theId is a GEOM obect type id.
11991         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11992         #  @ref swig_GetType "Example"
11993         def ShapeIdToType(self, theId):
11994             """
11995             Convert a type of geom object from id to string value
11996
11997             Parameters:
11998                 theId is a GEOM obect type id.
11999                 
12000             Returns:
12001                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12002             """
12003             if theId == 0:
12004                 return "COPY"
12005             if theId == 1:
12006                 return "IMPORT"
12007             if theId == 2:
12008                 return "POINT"
12009             if theId == 3:
12010                 return "VECTOR"
12011             if theId == 4:
12012                 return "PLANE"
12013             if theId == 5:
12014                 return "LINE"
12015             if theId == 6:
12016                 return "TORUS"
12017             if theId == 7:
12018                 return "BOX"
12019             if theId == 8:
12020                 return "CYLINDER"
12021             if theId == 9:
12022                 return "CONE"
12023             if theId == 10:
12024                 return "SPHERE"
12025             if theId == 11:
12026                 return "PRISM"
12027             if theId == 12:
12028                 return "REVOLUTION"
12029             if theId == 13:
12030                 return "BOOLEAN"
12031             if theId == 14:
12032                 return "PARTITION"
12033             if theId == 15:
12034                 return "POLYLINE"
12035             if theId == 16:
12036                 return "CIRCLE"
12037             if theId == 17:
12038                 return "SPLINE"
12039             if theId == 18:
12040                 return "ELLIPSE"
12041             if theId == 19:
12042                 return "CIRC_ARC"
12043             if theId == 20:
12044                 return "FILLET"
12045             if theId == 21:
12046                 return "CHAMFER"
12047             if theId == 22:
12048                 return "EDGE"
12049             if theId == 23:
12050                 return "WIRE"
12051             if theId == 24:
12052                 return "FACE"
12053             if theId == 25:
12054                 return "SHELL"
12055             if theId == 26:
12056                 return "SOLID"
12057             if theId == 27:
12058                 return "COMPOUND"
12059             if theId == 28:
12060                 return "SUBSHAPE"
12061             if theId == 29:
12062                 return "PIPE"
12063             if theId == 30:
12064                 return "ARCHIMEDE"
12065             if theId == 31:
12066                 return "FILLING"
12067             if theId == 32:
12068                 return "EXPLODE"
12069             if theId == 33:
12070                 return "GLUED"
12071             if theId == 34:
12072                 return "SKETCHER"
12073             if theId == 35:
12074                 return "CDG"
12075             if theId == 36:
12076                 return "FREE_BOUNDS"
12077             if theId == 37:
12078                 return "GROUP"
12079             if theId == 38:
12080                 return "BLOCK"
12081             if theId == 39:
12082                 return "MARKER"
12083             if theId == 40:
12084                 return "THRUSECTIONS"
12085             if theId == 41:
12086                 return "COMPOUNDFILTER"
12087             if theId == 42:
12088                 return "SHAPES_ON_SHAPE"
12089             if theId == 43:
12090                 return "ELLIPSE_ARC"
12091             if theId == 44:
12092                 return "3DSKETCHER"
12093             if theId == 45:
12094                 return "FILLET_2D"
12095             if theId == 46:
12096                 return "FILLET_1D"
12097             if theId == 201:
12098                 return "PIPETSHAPE"
12099             return "Shape Id not exist."
12100
12101         ## Returns a main shape associated with the group
12102         #  @param theGroup is a GEOM group for which a main shape object is requested
12103         #  @return a GEOM object which is a main shape for theGroup
12104         #
12105         #  @ref swig_GetMainShape "Example"
12106         def GetMainShape(self,theGroup):
12107             """
12108             Returns a main shape associated with the group
12109
12110             Parameters:
12111                 theGroup is a GEOM group for which a main shape object is requested
12112
12113             Returns:
12114                 a GEOM object which is a main shape for theGroup
12115
12116             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
12117             """
12118             # Example: see GEOM_TestOthers.py
12119             anObj = self.GroupOp.GetMainShape(theGroup)
12120             RaiseIfFailed("GetMainShape", self.GroupOp)
12121             return anObj
12122
12123         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
12124         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12125         #  @param theShape given shape (see GEOM.GEOM_Object)
12126         #  @param min_length minimum length of edges of theShape
12127         #  @param max_length maximum length of edges of theShape
12128         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12129         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12130         #  @param theName Object name; when specified, this parameter is used
12131         #         for result publication in the study. Otherwise, if automatic
12132         #         publication is switched on, default value is used for result name.
12133         #
12134         #  @return a newly created GEOM group of edges
12135         #
12136         #  @@ref swig_todo "Example"
12137         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
12138             """
12139             Create group of edges of theShape, whose length is in range [min_length, max_length].
12140             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12141
12142             Parameters:
12143                 theShape given shape
12144                 min_length minimum length of edges of theShape
12145                 max_length maximum length of edges of theShape
12146                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12147                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12148                 theName Object name; when specified, this parameter is used
12149                         for result publication in the study. Otherwise, if automatic
12150                         publication is switched on, default value is used for result name.
12151
12152              Returns:
12153                 a newly created GEOM group of edges.
12154             """
12155             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
12156             edges_in_range = []
12157             for edge in edges:
12158                 Props = self.BasicProperties(edge)
12159                 if min_length <= Props[0] and Props[0] <= max_length:
12160                     if (not include_min) and (min_length == Props[0]):
12161                         skip = 1
12162                     else:
12163                         if (not include_max) and (Props[0] == max_length):
12164                             skip = 1
12165                         else:
12166                             edges_in_range.append(edge)
12167
12168             if len(edges_in_range) <= 0:
12169                 print "No edges found by given criteria"
12170                 return None
12171
12172             # note: auto-publishing is done in self.CreateGroup()
12173             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
12174             self.UnionList(group_edges, edges_in_range)
12175
12176             return group_edges
12177
12178         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
12179         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12180         #  @param min_length minimum length of edges of selected shape
12181         #  @param max_length maximum length of edges of selected shape
12182         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12183         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12184         #  @return a newly created GEOM group of edges
12185         #  @ref swig_todo "Example"
12186         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
12187             """
12188             Create group of edges of selected shape, whose length is in range [min_length, max_length].
12189             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12190
12191             Parameters:
12192                 min_length minimum length of edges of selected shape
12193                 max_length maximum length of edges of selected shape
12194                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12195                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12196
12197              Returns:
12198                 a newly created GEOM group of edges.
12199             """
12200             nb_selected = sg.SelectedCount()
12201             if nb_selected < 1:
12202                 print "Select a shape before calling this function, please."
12203                 return 0
12204             if nb_selected > 1:
12205                 print "Only one shape must be selected"
12206                 return 0
12207
12208             id_shape = sg.getSelected(0)
12209             shape = IDToObject( id_shape )
12210
12211             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
12212
12213             left_str  = " < "
12214             right_str = " < "
12215             if include_min: left_str  = " <= "
12216             if include_max: right_str  = " <= "
12217
12218             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
12219                                     + left_str + "length" + right_str + `max_length`)
12220
12221             sg.updateObjBrowser(1)
12222
12223             return group_edges
12224
12225         # end of l3_groups
12226         ## @}
12227
12228         ## @addtogroup l4_advanced
12229         ## @{
12230
12231         ## Create a T-shape object with specified caracteristics for the main
12232         #  and the incident pipes (radius, width, half-length).
12233         #  The extremities of the main pipe are located on junctions points P1 and P2.
12234         #  The extremity of the incident pipe is located on junction point P3.
12235         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12236         #  the main plane of the T-shape is XOY.
12237         #
12238         #  @param theR1 Internal radius of main pipe
12239         #  @param theW1 Width of main pipe
12240         #  @param theL1 Half-length of main pipe
12241         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12242         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12243         #  @param theL2 Half-length of incident pipe
12244         #
12245         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12246         #  @param theP1 1st junction point of main pipe
12247         #  @param theP2 2nd junction point of main pipe
12248         #  @param theP3 Junction point of incident pipe
12249         #
12250         #  @param theRL Internal radius of left thickness reduction
12251         #  @param theWL Width of left thickness reduction
12252         #  @param theLtransL Length of left transition part
12253         #  @param theLthinL Length of left thin part
12254         #
12255         #  @param theRR Internal radius of right thickness reduction
12256         #  @param theWR Width of right thickness reduction
12257         #  @param theLtransR Length of right transition part
12258         #  @param theLthinR Length of right thin part
12259         #
12260         #  @param theRI Internal radius of incident thickness reduction
12261         #  @param theWI Width of incident thickness reduction
12262         #  @param theLtransI Length of incident transition part
12263         #  @param theLthinI Length of incident thin part
12264         #
12265         #  @param theName Object name; when specified, this parameter is used
12266         #         for result publication in the study. Otherwise, if automatic
12267         #         publication is switched on, default value is used for result name.
12268         #
12269         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12270         #
12271         #  @ref tui_creation_pipetshape "Example"
12272         def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
12273                             theHexMesh=True, theP1=None, theP2=None, theP3=None,
12274                             theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12275                             theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12276                             theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12277                             theName=None):
12278             """
12279             Create a T-shape object with specified caracteristics for the main
12280             and the incident pipes (radius, width, half-length).
12281             The extremities of the main pipe are located on junctions points P1 and P2.
12282             The extremity of the incident pipe is located on junction point P3.
12283             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12284             the main plane of the T-shape is XOY.
12285
12286             Parameters:
12287                 theR1 Internal radius of main pipe
12288                 theW1 Width of main pipe
12289                 theL1 Half-length of main pipe
12290                 theR2 Internal radius of incident pipe (R2 < R1)
12291                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12292                 theL2 Half-length of incident pipe
12293                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12294                 theP1 1st junction point of main pipe
12295                 theP2 2nd junction point of main pipe
12296                 theP3 Junction point of incident pipe
12297
12298                 theRL Internal radius of left thickness reduction
12299                 theWL Width of left thickness reduction
12300                 theLtransL Length of left transition part
12301                 theLthinL Length of left thin part
12302
12303                 theRR Internal radius of right thickness reduction
12304                 theWR Width of right thickness reduction
12305                 theLtransR Length of right transition part
12306                 theLthinR Length of right thin part
12307
12308                 theRI Internal radius of incident thickness reduction
12309                 theWI Width of incident thickness reduction
12310                 theLtransI Length of incident transition part
12311                 theLthinI Length of incident thin part
12312
12313                 theName Object name; when specified, this parameter is used
12314                         for result publication in the study. Otherwise, if automatic
12315                         publication is switched on, default value is used for result name.
12316
12317             Returns:
12318                 List of GEOM_Object, containing the created shape and propagation groups.
12319
12320             Example of usage:
12321                 # create PipeTShape object
12322                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
12323                 # create PipeTShape object with position
12324                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
12325                 # create PipeTShape object with left thickness reduction
12326                 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
12327             """
12328             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)
12329             if (theP1 and theP2 and theP3):
12330                 anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12331                                                                 theRL, theWL, theLtransL, theLthinL,
12332                                                                 theRR, theWR, theLtransR, theLthinR,
12333                                                                 theRI, theWI, theLtransI, theLthinI,
12334                                                                 theHexMesh, theP1, theP2, theP3)
12335             else:
12336                 anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
12337                                                     theRL, theWL, theLtransL, theLthinL,
12338                                                     theRR, theWR, theLtransR, theLthinR,
12339                                                     theRI, theWI, theLtransI, theLthinI,
12340                                                     theHexMesh)
12341             RaiseIfFailed("MakePipeTShape", self.AdvOp)
12342             if Parameters: anObj[0].SetParameters(Parameters)
12343             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12344             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12345             return anObj
12346
12347         ## Create a T-shape object with chamfer and with specified caracteristics for the main
12348         #  and the incident pipes (radius, width, half-length). The chamfer is
12349         #  created on the junction of the pipes.
12350         #  The extremities of the main pipe are located on junctions points P1 and P2.
12351         #  The extremity of the incident pipe is located on junction point P3.
12352         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12353         #  the main plane of the T-shape is XOY.
12354         #  @param theR1 Internal radius of main pipe
12355         #  @param theW1 Width of main pipe
12356         #  @param theL1 Half-length of main pipe
12357         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12358         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12359         #  @param theL2 Half-length of incident pipe
12360         #  @param theH Height of the chamfer.
12361         #  @param theW Width of the chamfer.
12362         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12363         #  @param theP1 1st junction point of main pipe
12364         #  @param theP2 2nd junction point of main pipe
12365         #  @param theP3 Junction point of incident pipe
12366         #
12367         #  @param theRL Internal radius of left thickness reduction
12368         #  @param theWL Width of left thickness reduction
12369         #  @param theLtransL Length of left transition part
12370         #  @param theLthinL Length of left thin part
12371         #
12372         #  @param theRR Internal radius of right thickness reduction
12373         #  @param theWR Width of right thickness reduction
12374         #  @param theLtransR Length of right transition part
12375         #  @param theLthinR Length of right thin part
12376         #
12377         #  @param theRI Internal radius of incident thickness reduction
12378         #  @param theWI Width of incident thickness reduction
12379         #  @param theLtransI Length of incident transition part
12380         #  @param theLthinI Length of incident thin part
12381         #
12382         #  @param theName Object name; when specified, this parameter is used
12383         #         for result publication in the study. Otherwise, if automatic
12384         #         publication is switched on, default value is used for result name.
12385         #
12386         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12387         #
12388         #  @ref tui_creation_pipetshape "Example"
12389         def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
12390                                    theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12391                                    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12392                                    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12393                                    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12394                                    theName=None):
12395             """
12396             Create a T-shape object with chamfer and with specified caracteristics for the main
12397             and the incident pipes (radius, width, half-length). The chamfer is
12398             created on the junction of the pipes.
12399             The extremities of the main pipe are located on junctions points P1 and P2.
12400             The extremity of the incident pipe is located on junction point P3.
12401             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12402             the main plane of the T-shape is XOY.
12403
12404             Parameters:
12405                 theR1 Internal radius of main pipe
12406                 theW1 Width of main pipe
12407                 theL1 Half-length of main pipe
12408                 theR2 Internal radius of incident pipe (R2 < R1)
12409                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12410                 theL2 Half-length of incident pipe
12411                 theH Height of the chamfer.
12412                 theW Width of the chamfer.
12413                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12414                 theP1 1st junction point of main pipe
12415                 theP2 2nd junction point of main pipe
12416                 theP3 Junction point of incident pipe
12417
12418                 theRL Internal radius of left thickness reduction
12419                 theWL Width of left thickness reduction
12420                 theLtransL Length of left transition part
12421                 theLthinL Length of left thin part
12422
12423                 theRR Internal radius of right thickness reduction
12424                 theWR Width of right thickness reduction
12425                 theLtransR Length of right transition part
12426                 theLthinR Length of right thin part
12427
12428                 theRI Internal radius of incident thickness reduction
12429                 theWI Width of incident thickness reduction
12430                 theLtransI Length of incident transition part
12431                 theLthinI Length of incident thin part
12432
12433                 theName Object name; when specified, this parameter is used
12434                         for result publication in the study. Otherwise, if automatic
12435                         publication is switched on, default value is used for result name.
12436
12437             Returns:
12438                 List of GEOM_Object, containing the created shape and propagation groups.
12439
12440             Example of usage:
12441                 # create PipeTShape with chamfer object
12442                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
12443                 # create PipeTShape with chamfer object with position
12444                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
12445                 # create PipeTShape with chamfer object with left thickness reduction
12446                 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)
12447             """
12448             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)
12449             if (theP1 and theP2 and theP3):
12450               anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12451                                                                      theRL, theWL, theLtransL, theLthinL,
12452                                                                      theRR, theWR, theLtransR, theLthinR,
12453                                                                      theRI, theWI, theLtransI, theLthinI,
12454                                                                      theH, theW, theHexMesh, theP1, theP2, theP3)
12455             else:
12456               anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
12457                                                          theRL, theWL, theLtransL, theLthinL,
12458                                                          theRR, theWR, theLtransR, theLthinR,
12459                                                          theRI, theWI, theLtransI, theLthinI,
12460                                                          theH, theW, theHexMesh)
12461             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
12462             if Parameters: anObj[0].SetParameters(Parameters)
12463             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12464             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12465             return anObj
12466
12467         ## Create a T-shape object with fillet and with specified caracteristics for the main
12468         #  and the incident pipes (radius, width, half-length). The fillet is
12469         #  created on the junction of the pipes.
12470         #  The extremities of the main pipe are located on junctions points P1 and P2.
12471         #  The extremity of the incident pipe is located on junction point P3.
12472         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12473         #  the main plane of the T-shape is XOY.
12474         #  @param theR1 Internal radius of main pipe
12475         #  @param theW1 Width of main pipe
12476         #  @param theL1 Half-length of main pipe
12477         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12478         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12479         #  @param theL2 Half-length of incident pipe
12480         #  @param theRF Radius of curvature of fillet.
12481         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12482         #  @param theP1 1st junction point of main pipe
12483         #  @param theP2 2nd junction point of main pipe
12484         #  @param theP3 Junction point of incident pipe
12485         #
12486         #  @param theRL Internal radius of left thickness reduction
12487         #  @param theWL Width of left thickness reduction
12488         #  @param theLtransL Length of left transition part
12489         #  @param theLthinL Length of left thin part
12490         #
12491         #  @param theRR Internal radius of right thickness reduction
12492         #  @param theWR Width of right thickness reduction
12493         #  @param theLtransR Length of right transition part
12494         #  @param theLthinR Length of right thin part
12495         #
12496         #  @param theRI Internal radius of incident thickness reduction
12497         #  @param theWI Width of incident thickness reduction
12498         #  @param theLtransI Length of incident transition part
12499         #  @param theLthinI Length of incident thin part
12500         #
12501         #  @param theName Object name; when specified, this parameter is used
12502         #         for result publication in the study. Otherwise, if automatic
12503         #         publication is switched on, default value is used for result name.
12504         #
12505         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12506         #
12507         #  @ref tui_creation_pipetshape "Example"
12508         def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
12509                                   theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12510                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12511                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12512                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12513                                   theName=None):
12514             """
12515             Create a T-shape object with fillet and with specified caracteristics for the main
12516             and the incident pipes (radius, width, half-length). The fillet is
12517             created on the junction of the pipes.
12518             The extremities of the main pipe are located on junctions points P1 and P2.
12519             The extremity of the incident pipe is located on junction point P3.
12520
12521             Parameters:
12522                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12523                 the main plane of the T-shape is XOY.
12524                 theR1 Internal radius of main pipe
12525                 theW1 Width of main pipe
12526                 heL1 Half-length of main pipe
12527                 theR2 Internal radius of incident pipe (R2 < R1)
12528                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12529                 theL2 Half-length of incident pipe
12530                 theRF Radius of curvature of fillet.
12531                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12532                 theP1 1st junction point of main pipe
12533                 theP2 2nd junction point of main pipe
12534                 theP3 Junction point of incident pipe
12535
12536                 theRL Internal radius of left thickness reduction
12537                 theWL Width of left thickness reduction
12538                 theLtransL Length of left transition part
12539                 theLthinL Length of left thin part
12540
12541                 theRR Internal radius of right thickness reduction
12542                 theWR Width of right thickness reduction
12543                 theLtransR Length of right transition part
12544                 theLthinR Length of right thin part
12545
12546                 theRI Internal radius of incident thickness reduction
12547                 theWI Width of incident thickness reduction
12548                 theLtransI Length of incident transition part
12549                 theLthinI Length of incident thin part
12550
12551                 theName Object name; when specified, this parameter is used
12552                         for result publication in the study. Otherwise, if automatic
12553                         publication is switched on, default value is used for result name.
12554                 
12555             Returns:
12556                 List of GEOM_Object, containing the created shape and propagation groups.
12557                 
12558             Example of usage:
12559                 # create PipeTShape with fillet object
12560                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
12561                 # create PipeTShape with fillet object with position
12562                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
12563                 # create PipeTShape with fillet object with left thickness reduction
12564                 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)
12565             """
12566             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)
12567             if (theP1 and theP2 and theP3):
12568               anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12569                                                                     theRL, theWL, theLtransL, theLthinL,
12570                                                                     theRR, theWR, theLtransR, theLthinR,
12571                                                                     theRI, theWI, theLtransI, theLthinI,
12572                                                                     theRF, theHexMesh, theP1, theP2, theP3)
12573             else:
12574               anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
12575                                                         theRL, theWL, theLtransL, theLthinL,
12576                                                         theRR, theWR, theLtransR, theLthinR,
12577                                                         theRI, theWI, theLtransI, theLthinI,
12578                                                         theRF, theHexMesh)
12579             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
12580             if Parameters: anObj[0].SetParameters(Parameters)
12581             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12582             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12583             return anObj
12584
12585         ## This function allows creating a disk already divided into blocks. It
12586         #  can be used to create divided pipes for later meshing in hexaedra.
12587         #  @param theR Radius of the disk
12588         #  @param theOrientation Orientation of the plane on which the disk will be built
12589         #         1 = XOY, 2 = OYZ, 3 = OZX
12590         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12591         #  @param theName Object name; when specified, this parameter is used
12592         #         for result publication in the study. Otherwise, if automatic
12593         #         publication is switched on, default value is used for result name.
12594         #
12595         #  @return New GEOM_Object, containing the created shape.
12596         #
12597         #  @ref tui_creation_divideddisk "Example"
12598         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
12599             """
12600             Creates a disk, divided into blocks. It can be used to create divided pipes
12601             for later meshing in hexaedra.
12602
12603             Parameters:
12604                 theR Radius of the disk
12605                 theOrientation Orientation of the plane on which the disk will be built:
12606                                1 = XOY, 2 = OYZ, 3 = OZX
12607                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12608                 theName Object name; when specified, this parameter is used
12609                         for result publication in the study. Otherwise, if automatic
12610                         publication is switched on, default value is used for result name.
12611
12612             Returns:
12613                 New GEOM_Object, containing the created shape.
12614             """
12615             theR, Parameters = ParseParameters(theR)
12616             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
12617             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
12618             if Parameters: anObj.SetParameters(Parameters)
12619             self._autoPublish(anObj, theName, "dividedDisk")
12620             return anObj
12621             
12622         ## This function allows creating a disk already divided into blocks. It
12623         #  can be used to create divided pipes for later meshing in hexaedra.
12624         #  @param theCenter Center of the disk
12625         #  @param theVector Normal vector to the plane of the created disk
12626         #  @param theRadius Radius of the disk
12627         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12628         #  @param theName Object name; when specified, this parameter is used
12629         #         for result publication in the study. Otherwise, if automatic
12630         #         publication is switched on, default value is used for result name.
12631         #
12632         #  @return New GEOM_Object, containing the created shape.
12633         #
12634         #  @ref tui_creation_divideddisk "Example"
12635         def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
12636             """
12637             Creates a disk already divided into blocks. It can be used to create divided pipes
12638             for later meshing in hexaedra.
12639
12640             Parameters:
12641                 theCenter Center of the disk
12642                 theVector Normal vector to the plane of the created disk
12643                 theRadius Radius of the disk
12644                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12645                 theName Object name; when specified, this parameter is used
12646                         for result publication in the study. Otherwise, if automatic
12647                         publication is switched on, default value is used for result name.
12648
12649             Returns:
12650                 New GEOM_Object, containing the created shape.
12651             """
12652             theRadius, Parameters = ParseParameters(theRadius)
12653             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
12654             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
12655             if Parameters: anObj.SetParameters(Parameters)
12656             self._autoPublish(anObj, theName, "dividedDisk")
12657             return anObj
12658
12659         ## Builds a cylinder prepared for hexa meshes
12660         #  @param theR Radius of the cylinder
12661         #  @param theH Height of the cylinder
12662         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12663         #  @param theName Object name; when specified, this parameter is used
12664         #         for result publication in the study. Otherwise, if automatic
12665         #         publication is switched on, default value is used for result name.
12666         #
12667         #  @return New GEOM_Object, containing the created shape.
12668         #
12669         #  @ref tui_creation_dividedcylinder "Example"
12670         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
12671             """
12672             Builds a cylinder prepared for hexa meshes
12673
12674             Parameters:
12675                 theR Radius of the cylinder
12676                 theH Height of the cylinder
12677                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12678                 theName Object name; when specified, this parameter is used
12679                         for result publication in the study. Otherwise, if automatic
12680                         publication is switched on, default value is used for result name.
12681
12682             Returns:
12683                 New GEOM_Object, containing the created shape.
12684             """
12685             theR, theH, Parameters = ParseParameters(theR, theH)
12686             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
12687             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
12688             if Parameters: anObj.SetParameters(Parameters)
12689             self._autoPublish(anObj, theName, "dividedCylinder")
12690             return anObj
12691
12692         ## Create a surface from a cloud of points
12693         #  @param thelPoints list of points. Compounds of points are
12694         #         accepted as well.
12695         #  @param theNbMax maximum number of Bezier pieces in the resulting
12696         #         surface.
12697         #  @param theDegMax maximum degree of the resulting BSpline surface.
12698         #  @param theDMax 3D tolerance of initial approximation.
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         #  @note 3D tolerance of initial approximation represents a tolerance of
12704         #        initial plate surface approximation. If this parameter is equal
12705         #        to 0 (default value) it is computed. In this case an error of
12706         #        initial plate surface computation is used as the approximation
12707         #        tolerance. This error represents a maximal distance between
12708         #        computed plate surface and given points.
12709         #
12710         #  @ref tui_creation_smoothingsurface "Example"
12711         def MakeSmoothingSurface(self, thelPoints, theNbMax=2, theDegMax=8,
12712                                  theDMax=0.0, theName=None):
12713             """
12714             Create a surface from a cloud of points
12715
12716             Parameters:
12717                 thelPoints list of points. Compounds of points are
12718                            accepted as well.
12719                 theNbMax maximum number of Bezier pieces in the resulting
12720                          surface.
12721                 theDegMax maximum degree of the resulting BSpline surface.
12722                 theDMax 3D tolerance of initial approximation.
12723                 theName Object name; when specified, this parameter is used
12724                         for result publication in the study. Otherwise, if automatic
12725                         publication is switched on, default value is used for result name.
12726
12727             Returns:
12728                 New GEOM_Object, containing the created shape.
12729
12730             Note:
12731                 3D tolerance of initial approximation represents a tolerance of
12732                 initial plate surface approximation. If this parameter is equal
12733                 to 0 (default value) it is computed. In this case an error of
12734                 initial plate surface computation is used as the approximation
12735                 tolerance. This error represents a maximal distance between
12736                 computed plate surface and given points.
12737             """
12738             anObj = self.AdvOp.MakeSmoothingSurface(thelPoints, theNbMax,
12739                                                     theDegMax, theDMax)
12740             RaiseIfFailed("MakeSmoothingSurface", self.AdvOp)
12741             self._autoPublish(anObj, theName, "smoothing")
12742             return anObj
12743
12744         ## Export a shape to XAO format
12745         #  @param shape The shape to export
12746         #  @param groups The list of groups to export
12747         #  @param fields The list of fields to export
12748         #  @param author The author of the export
12749         #  @param fileName The name of the file to export
12750         #  @return boolean
12751         #
12752         #  @ref tui_exportxao "Example"
12753         def ExportXAO(self, shape, groups, fields, author, fileName):
12754             res = self.InsertOp.ExportXAO(shape, groups, fields, author, fileName)
12755             RaiseIfFailed("ExportXAO", self.InsertOp)
12756             return res
12757
12758         ## Import a shape from XAO format
12759         #  @param shape Shape to export
12760         #  @param fileName The name of the file to import
12761         #  @return tuple (res, shape, subShapes, groups, fields)
12762         #       res Flag indicating if the import was successful
12763         #       shape The imported shape
12764         #       subShapes The list of imported subShapes
12765         #       groups The list of imported groups
12766         #       fields The list of imported fields
12767         #
12768         #  @ref tui_importxao "Example"
12769         def ImportXAO(self, fileName):
12770             res = self.InsertOp.ImportXAO(fileName)
12771             RaiseIfFailed("ImportXAO", self.InsertOp)
12772             return res
12773
12774         #@@ insert new functions before this line @@ do not remove this line @@#
12775
12776         # end of l4_advanced
12777         ## @}
12778
12779         ## Create a copy of the given object
12780         #
12781         #  @param theOriginal geometry object for copy
12782         #  @param theName Object name; when specified, this parameter is used
12783         #         for result publication in the study. Otherwise, if automatic
12784         #         publication is switched on, default value is used for result name.
12785         #
12786         #  @return New GEOM_Object, containing the copied shape.
12787         #
12788         #  @ingroup l1_geomBuilder_auxiliary
12789         #  @ref swig_MakeCopy "Example"
12790         def MakeCopy(self, theOriginal, theName=None):
12791             """
12792             Create a copy of the given object
12793
12794             Parameters:
12795                 theOriginal geometry object for copy
12796                 theName Object name; when specified, this parameter is used
12797                         for result publication in the study. Otherwise, if automatic
12798                         publication is switched on, default value is used for result name.
12799
12800             Returns:
12801                 New GEOM_Object, containing the copied shape.
12802
12803             Example of usage: Copy = geompy.MakeCopy(Box)
12804             """
12805             # Example: see GEOM_TestAll.py
12806             anObj = self.InsertOp.MakeCopy(theOriginal)
12807             RaiseIfFailed("MakeCopy", self.InsertOp)
12808             self._autoPublish(anObj, theName, "copy")
12809             return anObj
12810
12811         ## Add Path to load python scripts from
12812         #  @param Path a path to load python scripts from
12813         #  @ingroup l1_geomBuilder_auxiliary
12814         def addPath(self,Path):
12815             """
12816             Add Path to load python scripts from
12817
12818             Parameters:
12819                 Path a path to load python scripts from
12820             """
12821             if (sys.path.count(Path) < 1):
12822                 sys.path.append(Path)
12823                 pass
12824             pass
12825
12826         ## Load marker texture from the file
12827         #  @param Path a path to the texture file
12828         #  @return unique texture identifier
12829         #  @ingroup l1_geomBuilder_auxiliary
12830         def LoadTexture(self, Path):
12831             """
12832             Load marker texture from the file
12833             
12834             Parameters:
12835                 Path a path to the texture file
12836                 
12837             Returns:
12838                 unique texture identifier
12839             """
12840             # Example: see GEOM_TestAll.py
12841             ID = self.InsertOp.LoadTexture(Path)
12842             RaiseIfFailed("LoadTexture", self.InsertOp)
12843             return ID
12844
12845         ## Get internal name of the object based on its study entry
12846         #  @note This method does not provide an unique identifier of the geometry object.
12847         #  @note This is internal function of GEOM component, though it can be used outside it for 
12848         #  appropriate reason (e.g. for identification of geometry object).
12849         #  @param obj geometry object
12850         #  @return unique object identifier
12851         #  @ingroup l1_geomBuilder_auxiliary
12852         def getObjectID(self, obj):
12853             """
12854             Get internal name of the object based on its study entry.
12855             Note: this method does not provide an unique identifier of the geometry object.
12856             It is an internal function of GEOM component, though it can be used outside GEOM for 
12857             appropriate reason (e.g. for identification of geometry object).
12858
12859             Parameters:
12860                 obj geometry object
12861
12862             Returns:
12863                 unique object identifier
12864             """
12865             ID = ""
12866             entry = salome.ObjectToID(obj)
12867             if entry is not None:
12868                 lst = entry.split(":")
12869                 if len(lst) > 0:
12870                     ID = lst[-1] # -1 means last item in the list            
12871                     return "GEOM_" + ID
12872             return ID
12873                 
12874             
12875
12876         ## Add marker texture. @a Width and @a Height parameters
12877         #  specify width and height of the texture in pixels.
12878         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12879         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12880         #  parameter should be unpacked string, in which '1' symbols represent opaque
12881         #  pixels and '0' represent transparent pixels of the texture bitmap.
12882         #
12883         #  @param Width texture width in pixels
12884         #  @param Height texture height in pixels
12885         #  @param Texture texture data
12886         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12887         #  @return unique texture identifier
12888         #  @ingroup l1_geomBuilder_auxiliary
12889         def AddTexture(self, Width, Height, Texture, RowData=False):
12890             """
12891             Add marker texture. Width and Height parameters
12892             specify width and height of the texture in pixels.
12893             If RowData is True, Texture parameter should represent texture data
12894             packed into the byte array. If RowData is False (default), Texture
12895             parameter should be unpacked string, in which '1' symbols represent opaque
12896             pixels and '0' represent transparent pixels of the texture bitmap.
12897
12898             Parameters:
12899                 Width texture width in pixels
12900                 Height texture height in pixels
12901                 Texture texture data
12902                 RowData if True, Texture data are packed in the byte stream
12903
12904             Returns:
12905                 return unique texture identifier
12906             """
12907             if not RowData: Texture = PackData(Texture)
12908             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12909             RaiseIfFailed("AddTexture", self.InsertOp)
12910             return ID
12911
12912         ## Creates a new folder object. It is a container for any GEOM objects.
12913         #  @param Name name of the container
12914         #  @param Father parent object. If None, 
12915         #         folder under 'Geometry' root object will be created.
12916         #  @return a new created folder
12917         #  @ingroup l1_publish_data
12918         def NewFolder(self, Name, Father=None):
12919             """
12920             Create a new folder object. It is an auxiliary container for any GEOM objects.
12921             
12922             Parameters:
12923                 Name name of the container
12924                 Father parent object. If None, 
12925                 folder under 'Geometry' root object will be created.
12926             
12927             Returns:
12928                 a new created folder
12929             """
12930             if not Father: Father = self.father
12931             return self.CreateFolder(Name, Father)
12932
12933         ## Move object to the specified folder
12934         #  @param Object object to move
12935         #  @param Folder target folder
12936         #  @ingroup l1_publish_data
12937         def PutToFolder(self, Object, Folder):
12938             """
12939             Move object to the specified folder
12940             
12941             Parameters:
12942                 Object object to move
12943                 Folder target folder
12944             """
12945             self.MoveToFolder(Object, Folder)
12946             pass
12947
12948         ## Move list of objects to the specified folder
12949         #  @param ListOfSO list of objects to move
12950         #  @param Folder target folder
12951         #  @ingroup l1_publish_data
12952         def PutListToFolder(self, ListOfSO, Folder):
12953             """
12954             Move list of objects to the specified folder
12955             
12956             Parameters:
12957                 ListOfSO list of objects to move
12958                 Folder target folder
12959             """
12960             self.MoveListToFolder(ListOfSO, Folder)
12961             pass
12962
12963         ## @addtogroup l2_field
12964         ## @{
12965
12966         ## Creates a field
12967         #  @param shape the shape the field lies on
12968         #  @param name the field name
12969         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
12970         #  @param dimension dimension of the shape the field lies on
12971         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12972         #  @param componentNames names of components
12973         #  @return a created field
12974         def CreateField(self, shape, name, type, dimension, componentNames):
12975             """
12976             Creates a field
12977
12978             Parameters:
12979                 shape the shape the field lies on
12980                 name  the field name
12981                 type  type of field data
12982                 dimension dimension of the shape the field lies on
12983                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12984                 componentNames names of components
12985             
12986             Returns:
12987                 a created field
12988             """
12989             if isinstance( type, int ):
12990                 if type < 0 or type > 3:
12991                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
12992                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
12993
12994             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
12995             RaiseIfFailed("CreateField", self.FieldOp)
12996             global geom
12997             geom._autoPublish( f, "", name)
12998             return f
12999
13000         ## Removes a field from the GEOM component
13001         #  @param field the field to remove
13002         def RemoveField(self, field):
13003             "Removes a field from the GEOM component"
13004             global geom
13005             if isinstance( field, GEOM._objref_GEOM_Field ):
13006                 geom.RemoveObject( field )
13007             elif isinstance( field, geomField ):
13008                 geom.RemoveObject( field.field )
13009             else:
13010                 raise RuntimeError, "RemoveField() : the object is not a field"
13011             return
13012
13013         ## Returns number of fields on a shape
13014         def CountFields(self, shape):
13015             "Returns number of fields on a shape"
13016             nb = self.FieldOp.CountFields( shape )
13017             RaiseIfFailed("CountFields", self.FieldOp)
13018             return nb
13019
13020         ## Returns all fields on a shape
13021         def GetFields(self, shape):
13022             "Returns all fields on a shape"
13023             ff = self.FieldOp.GetFields( shape )
13024             RaiseIfFailed("GetFields", self.FieldOp)
13025             return ff
13026
13027         ## Returns a field on a shape by its name
13028         def GetField(self, shape, name):
13029             "Returns a field on a shape by its name"
13030             f = self.FieldOp.GetField( shape, name )
13031             RaiseIfFailed("GetField", self.FieldOp)
13032             return f
13033
13034         # end of l2_field
13035         ## @}
13036
13037
13038 import omniORB
13039 # Register the new proxy for GEOM_Gen
13040 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
13041
13042
13043 ## Field on Geometry
13044 #  @ingroup l2_field
13045 class geomField( GEOM._objref_GEOM_Field ):
13046
13047     def __init__(self):
13048         GEOM._objref_GEOM_Field.__init__(self)
13049         self.field = GEOM._objref_GEOM_Field
13050         return
13051
13052     ## Returns the shape the field lies on
13053     def getShape(self):
13054         "Returns the shape the field lies on"
13055         return self.field.GetShape(self)
13056
13057     ## Returns the field name
13058     def getName(self):
13059         "Returns the field name"
13060         return self.field.GetName(self)
13061
13062     ## Returns type of field data as integer [0-3]
13063     def getType(self):
13064         "Returns type of field data"
13065         return self.field.GetDataType(self)._v
13066
13067     ## Returns type of field data:
13068     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
13069     def getTypeEnum(self):
13070         "Returns type of field data"
13071         return self.field.GetDataType(self)
13072
13073     ## Returns dimension of the shape the field lies on:
13074     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13075     def getDimension(self):
13076         """Returns dimension of the shape the field lies on:
13077         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
13078         return self.field.GetDimension(self)
13079
13080     ## Returns names of components
13081     def getComponents(self):
13082         "Returns names of components"
13083         return self.field.GetComponents(self)
13084
13085     ## Adds a time step to the field
13086     #  @param step the time step number futher used as the step identifier
13087     #  @param stamp the time step time
13088     #  @param values the values of the time step
13089     def addStep(self, step, stamp, values):
13090         "Adds a time step to the field"
13091         stp = self.field.AddStep( self, step, stamp )
13092         if not stp:
13093             raise RuntimeError, \
13094                   "Field.addStep() : Error: step %s already exists in this field"%step
13095         global geom
13096         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
13097         self.setValues( step, values )
13098         return stp
13099
13100     ## Remove a time step from the field
13101     def removeStep(self,step):
13102         "Remove a time step from the field"
13103         stepSO = None
13104         try:
13105             stepObj = self.field.GetStep( self, step )
13106             if stepObj:
13107                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
13108         except:
13109             #import traceback
13110             #traceback.print_exc()
13111             pass
13112         self.field.RemoveStep( self, step )
13113         if stepSO:
13114             geom.myBuilder.RemoveObjectWithChildren( stepSO )
13115         return
13116
13117     ## Returns number of time steps in the field
13118     def countSteps(self):
13119         "Returns number of time steps in the field"
13120         return self.field.CountSteps(self)
13121
13122     ## Returns a list of time step IDs in the field
13123     def getSteps(self):
13124         "Returns a list of time step IDs in the field"
13125         return self.field.GetSteps(self)
13126
13127     ## Returns a time step by its ID
13128     def getStep(self,step):
13129         "Returns a time step by its ID"
13130         stp = self.field.GetStep(self, step)
13131         if not stp:
13132             raise RuntimeError, "Step %s is missing from this field"%step
13133         return stp
13134
13135     ## Returns the time of the field step
13136     def getStamp(self,step):
13137         "Returns the time of the field step"
13138         return self.getStep(step).GetStamp()
13139
13140     ## Changes the time of the field step
13141     def setStamp(self, step, stamp):
13142         "Changes the time of the field step"
13143         return self.getStep(step).SetStamp(stamp)
13144
13145     ## Returns values of the field step
13146     def getValues(self, step):
13147         "Returns values of the field step"
13148         return self.getStep(step).GetValues()
13149
13150     ## Changes values of the field step
13151     def setValues(self, step, values):
13152         "Changes values of the field step"
13153         stp = self.getStep(step)
13154         errBeg = "Field.setValues(values) : Error: "
13155         try:
13156             ok = stp.SetValues( values )
13157         except Exception, e:
13158             excStr = str(e)
13159             if excStr.find("WrongPythonType") > 0:
13160                 raise RuntimeError, errBeg +\
13161                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
13162             raise RuntimeError, errBeg + str(e)
13163         if not ok:
13164             nbOK = self.field.GetArraySize(self)
13165             nbKO = len(values)
13166             if nbOK != nbKO:
13167                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
13168             else:
13169                 raise RuntimeError, errBeg + "failed"
13170         return
13171
13172     pass # end of class geomField
13173
13174 # Register the new proxy for GEOM_Field
13175 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
13176
13177
13178 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
13179 #  interface to GEOM operations.
13180 #
13181 #  Typical use is:
13182 #  \code
13183 #    import salome
13184 #    salome.salome_init()
13185 #    from salome.geom import geomBuilder
13186 #    geompy = geomBuilder.New(salome.myStudy)
13187 #  \endcode
13188 #  @param  study     SALOME study, generally obtained by salome.myStudy.
13189 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13190 #  @return geomBuilder instance
13191 def New( study, instance=None):
13192     """
13193     Create a new geomBuilder instance.The geomBuilder class provides the Python
13194     interface to GEOM operations.
13195
13196     Typical use is:
13197         import salome
13198         salome.salome_init()
13199         from salome.geom import geomBuilder
13200         geompy = geomBuilder.New(salome.myStudy)
13201
13202     Parameters:
13203         study     SALOME study, generally obtained by salome.myStudy.
13204         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13205     Returns:
13206         geomBuilder instance
13207     """
13208     #print "New geomBuilder ", study, instance
13209     global engine
13210     global geom
13211     global doLcc
13212     engine = instance
13213     if engine is None:
13214       doLcc = True
13215     geom = geomBuilder()
13216     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
13217     geom.init_geom(study)
13218     return geom