Salome HOME
0022475: EDF 2811 GEOM: Features for "Smoothing Surface" function
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 #  GEOM GEOM_SWIG : binding of C++ implementation with Python
22 #  File   : geomBuilder.py
23 #  Author : Paul RASCLE, EDF
24 #  Module : GEOM
25
26 """
27     \namespace geomBuilder
28     \brief Module geomBuilder
29 """
30
31 ##
32 ## @defgroup geomBuilder geomBuilder Python module
33 ## @{
34 ##
35 ## @details
36 ##
37 ## By default, all functions of geomBuilder Python module do not publish
38 ## resulting geometrical objects. This can be done in the Python script
39 ## by means of \ref geomBuilder.geomBuilder.addToStudy() "addToStudy()"
40 ## or \ref geomBuilder.geomBuilder.addToStudyInFather() "addToStudyInFather()"
41 ## functions.
42 ## 
43 ## However, it is possible to publish result data in the study
44 ## automatically. For this, almost each function of
45 ## \ref geomBuilder.geomBuilder "geomBuilder" class has
46 ## an additional @a theName parameter (@c None by default).
47 ## As soon as non-empty string value is passed to this parameter,
48 ## the result object is published in the study automatically.
49 ## 
50 ## For example, consider the following Python script:
51 ## 
52 ## @code
53 ## import salome
54 ## from salome.geom import geomBuilder
55 ## geompy = geomBuilder.New(salome.myStudy)
56 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
57 ## geompy.addToStudy(box, "box")             # explicit publishing
58 ## @endcode
59 ## 
60 ## Last two lines can be replaced by one-line instruction:
61 ## 
62 ## @code
63 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name
64 ## @endcode
65 ## 
66 ## ... or simply
67 ## 
68 ## @code
69 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "box") # box is published in the study with "box" name
70 ## @endcode
71 ##
72 ## Note, that some functions produce more than one geometrical objects. For example,
73 ## \ref geomBuilder.geomBuilder.GetNonBlocks() "GetNonBlocks()" function returns two objects:
74 ## group of all non-hexa solids and group of all non-quad faces.
75 ## For such functions it is possible to specify separate names for results.
76 ##
77 ## For example
78 ##
79 ## @code
80 ## # create and publish cylinder
81 ## cyl = geompy.MakeCylinderRH(100, 100, "cylinder")
82 ## # get non blocks from cylinder
83 ## g1, g2 = geompy.GetNonBlocks(cyl, "nonblock")
84 ## @endcode
85 ##
86 ## Above example will publish both result compounds (first with non-hexa solids and
87 ## second with non-quad faces) as two items, both named "nonblock".
88 ## However, if second command is invoked as
89 ##
90 ## @code
91 ## g1, g2 = geompy.GetNonBlocks(cyl, ("nonhexa", "nonquad"))
92 ## @endcode
93 ##
94 ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
95 ##
96 ## Automatic publication of all results can be also enabled/disabled by means of the function
97 ## \ref geomBuilder.geomBuilder.addToStudyAuto() "addToStudyAuto()". The automatic publishing
98 ## is managed by the numeric parameter passed to this function:
99 ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
100 ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
101 ##   maximum number of sub-shapes allowed for publishing is unlimited; any negative
102 ##   value passed as parameter has the same effect.
103 ## - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
104 ##   maximum number of sub-shapes allowed for publishing is set to specified value.
105 ## 
106 ## When automatic publishing is enabled, you even do not need to pass @a theName parameter 
107 ## to the functions creating objects, instead default names will be used. However, you
108 ## can always change the behavior, by passing explicit name to the @a theName parameter
109 ## and it will be used instead default one.
110 ## The publishing of the collections of objects will be done according to the above
111 ## mentioned rules (maximum allowed number of sub-shapes).
112 ##
113 ## For example:
114 ##
115 ## @code
116 ## import salome
117 ## from salome.geom import geomBuilder
118 ## geompy = geomBuilder.New(salome.myStudy)
119 ## geompy.addToStudyAuto() # enable automatic publication
120 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) 
121 ## # the box is created and published in the study with default name
122 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
123 ## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
124 ## # only 5 first vertices will be published, with default names
125 ## print len(vertices)
126 ## # note, that result value still containes all 8 vertices
127 ## geompy.addToStudyAuto(-1) # disable automatic publication
128 ## @endcode
129 ##
130 ## This feature can be used, for example, for debugging purposes.
131 ##
132 ## @note
133 ## - Use automatic publication feature with caution. When it is enabled, any function of
134 ##   \ref geomBuilder.geomBuilder "geomBuilder" class publishes the results in the study,
135 ##   that can lead to the huge size of the study data tree.
136 ##   For example, repeating call of \ref geomBuilder.geomBuilder.SubShapeAll() "SubShapeAll()"
137 ##   command on the same main shape each time will publish all child objects, that will lead
138 ##   to a lot of duplicated items in the study.
139 ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
140 ##   shape was also published before. Otherwise, sub-shapes are published as top-level objects.
141 ## - Some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
142 ##   \a theName parameter (and, thus, do not support automatic publication).
143 ##   For example, some transformation operations like
144 ##   \ref geomBuilder.geomBuilder.TranslateDXDYDZ() "TranslateDXDYDZ()".
145 ##   Refer to the documentation to check if some function has such possibility.
146 ##
147 ## It is possible to customize the representation of the geometrical
148 ## data in the data tree; this can be done by using folders. A folder can
149 ## be created in the study tree using function 
150 ## \ref geomBuilder.geomBuilder.NewFolder() "NewFolder()" 
151 ## (by default it is created under the "Geometry" root object). 
152 ## As soon as folder is created, any published geometry object 
153 ## can be moved into it.
154 ##  
155 ## For example:
156 ## 
157 ## @code
158 ## import salome
159 ## from salome.geom import geomBuilder
160 ## geompy = geomBuilder.New(salome.myStudy)
161 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "Box") 
162 ## # the box was created and published in the study
163 ## folder = geompy.NewFolder("Primitives")
164 ## # an empty "Primitives" folder was created under default "Geometry" root object
165 ## geompy.PutToFolder(box, folder)
166 ## # the box was moved into "Primitives" folder
167 ## @endcode
168 ## 
169 ## Subfolders are also can be created by specifying another folder as a parent:
170 ## 
171 ## @code
172 ## subfolder = geompy.NewFolder("3D", folder)
173 ## # "3D" folder was created under "Primitives" folder
174 ## @endcode
175 ## 
176 ## @note
177 ## - Folder container is just a representation layer object that
178 ## deals with already published objects only. So, any geometry object 
179 ## should be published in the study (for example, with 
180 ## \ref geomBuilder.geomBuilder.PutToFolder() "addToStudy()" function)
181 ## BEFORE moving it into any existing folder.
182 ## - \ref geomBuilder.geomBuilder.PutToFolder() "PutToFolder()" function
183 ## does not change physical position of geometry object in the study tree,
184 ## it only affects on the representation of the data tree.
185 ## - It is impossible to publish geometry object using any folder as father.
186 ## 
187 ##  \defgroup l1_publish_data
188 ##  \defgroup l1_geomBuilder_auxiliary
189 ##  \defgroup l1_geomBuilder_purpose
190 ## @}
191
192 ## @defgroup l1_publish_data Publishing results in SALOME study
193
194 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
195
196 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
197 ## @{
198 ##   @defgroup l2_import_export Importing/exporting geometrical objects
199 ##   @defgroup l2_creating      Creating geometrical objects
200 ##   @{
201 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
202 ##     @{
203 ##       @defgroup l4_curves        Creating Curves
204
205 ##     @}
206 ##     @defgroup l3_3d_primitives Creating 3D Primitives
207 ##     @defgroup l3_complex       Creating Complex Objects
208 ##     @defgroup l3_groups        Working with groups
209 ##     @defgroup l3_blocks        Building by blocks
210 ##     @{
211 ##       @defgroup l4_blocks_measure Check and Improve
212
213 ##     @}
214 ##     @defgroup l3_sketcher      Sketcher
215 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
216 ##     @{
217 ##       @defgroup l4_decompose     Decompose objects
218 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
219 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
220 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
221 ##       @defgroup l4_advanced      Advanced objects creation functions
222
223 ##     @}
224
225 ##   @}
226 ##   @defgroup l2_transforming  Transforming geometrical objects
227 ##   @{
228 ##     @defgroup l3_basic_op      Basic Operations
229 ##     @defgroup l3_boolean       Boolean Operations
230 ##     @defgroup l3_transform     Transformation Operations
231 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
232 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
233 ##     @defgroup l3_blocks_op     Blocks Operations
234 ##     @defgroup l3_healing       Repairing Operations
235 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
236
237 ##   @}
238 ##   @defgroup l2_measure       Using measurement tools
239 ##   @defgroup l2_field         Field on Geometry
240
241 ## @}
242
243 # initialize SALOME session in try/except block
244 # to avoid problems in some cases, e.g. when generating documentation
245 try:
246     import salome
247     salome.salome_init()
248     from salome import *
249 except:
250     pass
251
252 from salome_notebook import *
253
254 import GEOM
255 import math
256 import os
257
258 from salome.geom.gsketcher import Sketcher3D, Sketcher2D
259
260 # service function
261 def _toListOfNames(_names, _size=-1):
262     l = []
263     import types
264     if type(_names) in [types.ListType, types.TupleType]:
265         for i in _names: l.append(i)
266     elif _names:
267         l.append(_names)
268     if l and len(l) < _size:
269         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
270     return l
271
272 ## Raise an Error, containing the Method_name, if Operation is Failed
273 ## @ingroup l1_geomBuilder_auxiliary
274 def RaiseIfFailed (Method_name, Operation):
275     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
276         Operation.AbortOperation()
277         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
278     else:
279         Operation.FinishOperation()
280         pass
281
282 ## Return list of variables value from salome notebook
283 ## @ingroup l1_geomBuilder_auxiliary
284 def ParseParameters(*parameters):
285     Result = []
286     StringResult = []
287     for parameter in parameters:
288         if isinstance(parameter, list):
289             lResults = ParseParameters(*parameter)
290             if len(lResults) > 0:
291                 Result.append(lResults[:-1])
292                 StringResult += lResults[-1].split(":")
293                 pass
294             pass
295         else:
296             if isinstance(parameter,str):
297                 if notebook.isVariable(parameter):
298                     Result.append(notebook.get(parameter))
299                 else:
300                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
301                 pass
302             else:
303                 Result.append(parameter)
304                 pass
305             StringResult.append(str(parameter))
306             pass
307         pass
308     if Result:
309         Result.append(":".join(StringResult))
310     else:
311         Result = ":".join(StringResult)
312     return Result
313
314 ## Return list of variables value from salome notebook
315 ## @ingroup l1_geomBuilder_auxiliary
316 def ParseList(list):
317     Result = []
318     StringResult = ""
319     for parameter in list:
320         if isinstance(parameter,str) and notebook.isVariable(parameter):
321             Result.append(str(notebook.get(parameter)))
322             pass
323         else:
324             Result.append(str(parameter))
325             pass
326
327         StringResult = StringResult + str(parameter)
328         StringResult = StringResult + ":"
329         pass
330     StringResult = StringResult[:len(StringResult)-1]
331     return Result, StringResult
332
333 ## Return list of variables value from salome notebook
334 ## @ingroup l1_geomBuilder_auxiliary
335 def ParseSketcherCommand(command):
336     Result = ""
337     StringResult = ""
338     sections = command.split(":")
339     for section in sections:
340         parameters = section.split(" ")
341         paramIndex = 1
342         for parameter in parameters:
343             if paramIndex > 1 and parameter.find("'") != -1:
344                 parameter = parameter.replace("'","")
345                 if notebook.isVariable(parameter):
346                     Result = Result + str(notebook.get(parameter)) + " "
347                     pass
348                 else:
349                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
350                     pass
351                 pass
352             else:
353                 Result = Result + str(parameter) + " "
354                 pass
355             if paramIndex > 1:
356                 StringResult = StringResult + parameter
357                 StringResult = StringResult + ":"
358                 pass
359             paramIndex = paramIndex + 1
360             pass
361         Result = Result[:len(Result)-1] + ":"
362         pass
363     Result = Result[:len(Result)-1]
364     return Result, StringResult
365
366 ## Helper function which can be used to pack the passed string to the byte data.
367 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
368 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
369 ## For example,
370 ## \code
371 ## val = PackData("10001110") # val = 0xAE
372 ## val = PackData("1")        # val = 0x80
373 ## \endcode
374 ## @param data unpacked data - a string containing '1' and '0' symbols
375 ## @return data packed to the byte stream
376 ## @ingroup l1_geomBuilder_auxiliary
377 def PackData(data):
378     """
379     Helper function which can be used to pack the passed string to the byte data.
380     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
381     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
382
383     Parameters:
384         data unpacked data - a string containing '1' and '0' symbols
385
386     Returns:
387         data packed to the byte stream
388         
389     Example of usage:
390         val = PackData("10001110") # val = 0xAE
391         val = PackData("1")        # val = 0x80
392     """
393     bytes = len(data)/8
394     if len(data)%8: bytes += 1
395     res = ""
396     for b in range(bytes):
397         d = data[b*8:(b+1)*8]
398         val = 0
399         for i in range(8):
400             val *= 2
401             if i < len(d):
402                 if d[i] == "1": val += 1
403                 elif d[i] != "0":
404                     raise "Invalid symbol %s" % d[i]
405                 pass
406             pass
407         res += chr(val)
408         pass
409     return res
410
411 ## Read bitmap texture from the text file.
412 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
413 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
414 ## The function returns width and height of the pixmap in pixels and byte stream representing
415 ## texture bitmap itself.
416 ##
417 ## This function can be used to read the texture to the byte stream in order to pass it to
418 ## the AddTexture() function of geomBuilder class.
419 ## For example,
420 ## \code
421 ## from salome.geom import geomBuilder
422 ## geompy = geomBuilder.New(salome.myStudy)
423 ## texture = geompy.readtexture('mytexture.dat')
424 ## texture = geompy.AddTexture(*texture)
425 ## obj.SetMarkerTexture(texture)
426 ## \endcode
427 ## @param fname texture file name
428 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
429 ## @ingroup l1_geomBuilder_auxiliary
430 def ReadTexture(fname):
431     """
432     Read bitmap texture from the text file.
433     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
434     A zero symbol ('0') represents transparent pixel of the texture bitmap.
435     The function returns width and height of the pixmap in pixels and byte stream representing
436     texture bitmap itself.
437     This function can be used to read the texture to the byte stream in order to pass it to
438     the AddTexture() function of geomBuilder class.
439     
440     Parameters:
441         fname texture file name
442
443     Returns:
444         sequence of tree values: texture's width, height in pixels and its byte stream
445     
446     Example of usage:
447         from salome.geom import geomBuilder
448         geompy = geomBuilder.New(salome.myStudy)
449         texture = geompy.readtexture('mytexture.dat')
450         texture = geompy.AddTexture(*texture)
451         obj.SetMarkerTexture(texture)
452     """
453     try:
454         f = open(fname)
455         lines = [ l.strip() for l in f.readlines()]
456         f.close()
457         maxlen = 0
458         if lines: maxlen = max([len(x) for x in lines])
459         lenbytes = maxlen/8
460         if maxlen%8: lenbytes += 1
461         bytedata=""
462         for line in lines:
463             if len(line)%8:
464                 lenline = (len(line)/8+1)*8
465                 pass
466             else:
467                 lenline = (len(line)/8)*8
468                 pass
469             for i in range(lenline/8):
470                 byte=""
471                 for j in range(8):
472                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
473                     else: byte += "0"
474                     pass
475                 bytedata += PackData(byte)
476                 pass
477             for i in range(lenline/8, lenbytes):
478                 bytedata += PackData("0")
479             pass
480         return lenbytes*8, len(lines), bytedata
481     except:
482         pass
483     return 0, 0, ""
484
485 ## Returns a long value from enumeration type
486 #  Can be used for CORBA enumerator types like GEOM.shape_type
487 #  @param theItem enumeration type
488 #  @ingroup l1_geomBuilder_auxiliary
489 def EnumToLong(theItem):
490     """
491     Returns a long value from enumeration type
492     Can be used for CORBA enumerator types like geomBuilder.ShapeType
493
494     Parameters:
495         theItem enumeration type
496     """
497     ret = theItem
498     if hasattr(theItem, "_v"): ret = theItem._v
499     return ret
500
501 ## Information about closed/unclosed state of shell or wire
502 #  @ingroup l1_geomBuilder_auxiliary
503 class info:
504     """
505     Information about closed/unclosed state of shell or wire
506     """
507     UNKNOWN  = 0
508     CLOSED   = 1
509     UNCLOSED = 2
510
511 ## Private class used to bind calls of plugin operations to geomBuilder
512 class PluginOperation:
513   def __init__(self, operation, function):
514     self.operation = operation
515     self.function = function
516     pass
517
518   def __call__(self, *args):
519     res = self.function(self.operation, *args)
520     RaiseIfFailed(self.function.__name__, self.operation)
521     return res
522
523 # Warning: geom is a singleton
524 geom = None
525 engine = None
526 doLcc = False
527 created = False
528
529 class geomBuilder(object, GEOM._objref_GEOM_Gen):
530
531         ## Enumeration ShapeType as a dictionary. \n
532         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
533         #  @ingroup l1_geomBuilder_auxiliary
534         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
535
536         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
537         #  and a list of parameters, describing the shape.
538         #  List of parameters, describing the shape:
539         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
540         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
541         #
542         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
543         #
544         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
545         #
546         #  - SPHERE:       [xc yc zc            R]
547         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
548         #  - BOX:          [xc yc zc                      ax ay az]
549         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
550         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
551         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
552         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
553         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
554         #
555         #  - SPHERE2D:     [xc yc zc            R]
556         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
557         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
558         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
559         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
560         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
561         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
562         #  - PLANE:        [xo yo zo  dx dy dz]
563         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
564         #  - FACE:                                       [nb_edges  nb_vertices]
565         #
566         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
567         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
568         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
569         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
570         #  - LINE:         [xo yo zo  dx dy dz]
571         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
572         #  - EDGE:                                                 [nb_vertices]
573         #
574         #  - VERTEX:       [x  y  z]
575         #  @ingroup l1_geomBuilder_auxiliary
576         kind = GEOM.GEOM_IKindOfShape
577
578         def __new__(cls):
579             global engine
580             global geom
581             global doLcc
582             global created
583             #print "==== __new__ ", engine, geom, doLcc, created
584             if geom is None:
585                 # geom engine is either retrieved from engine, or created
586                 geom = engine
587                 # Following test avoids a recursive loop
588                 if doLcc:
589                     if geom is not None:
590                         # geom engine not created: existing engine found
591                         doLcc = False
592                     if doLcc and not created:
593                         doLcc = False
594                         # FindOrLoadComponent called:
595                         # 1. CORBA resolution of server
596                         # 2. the __new__ method is called again
597                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
598                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
599                         #print "====1 ",geom
600                 else:
601                     # FindOrLoadComponent not called
602                     if geom is None:
603                         # geomBuilder instance is created from lcc.FindOrLoadComponent
604                         #print "==== super ", engine, geom, doLcc, created
605                         geom = super(geomBuilder,cls).__new__(cls)
606                         #print "====2 ",geom
607                     else:
608                         # geom engine not created: existing engine found
609                         #print "==== existing ", engine, geom, doLcc, created
610                         pass
611                 #print "return geom 1 ", geom
612                 return geom
613
614             #print "return geom 2 ", geom
615             return geom
616
617         def __init__(self):
618             global created
619             #print "-------- geomBuilder __init__ --- ", created, self
620             if not created:
621               created = True
622               GEOM._objref_GEOM_Gen.__init__(self)
623               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
624               self.myBuilder = None
625               self.myStudyId = 0
626               self.father    = None
627
628               self.BasicOp  = None
629               self.CurvesOp = None
630               self.PrimOp   = None
631               self.ShapesOp = None
632               self.HealOp   = None
633               self.InsertOp = None
634               self.BoolOp   = None
635               self.TrsfOp   = None
636               self.LocalOp  = None
637               self.MeasuOp  = None
638               self.BlocksOp = None
639               self.GroupOp  = None
640               self.AdvOp    = None
641               self.FieldOp  = None
642             pass
643
644         ## Process object publication in the study, as follows:
645         #  - if @a theName is specified (not None), the object is published in the study
646         #    with this name, not taking into account "auto-publishing" option;
647         #  - if @a theName is NOT specified, the object is published in the study
648         #    (using default name, which can be customized using @a theDefaultName parameter)
649         #    only if auto-publishing is switched on.
650         #
651         #  @param theObj  object, a subject for publishing
652         #  @param theName object name for study
653         #  @param theDefaultName default name for the auto-publishing
654         #
655         #  @sa addToStudyAuto()
656         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
657             # ---
658             def _item_name(_names, _defname, _idx=-1):
659                 if not _names: _names = _defname
660                 if type(_names) in [types.ListType, types.TupleType]:
661                     if _idx >= 0:
662                         if _idx >= len(_names) or not _names[_idx]:
663                             if type(_defname) not in [types.ListType, types.TupleType]:
664                                 _name = "%s_%d"%(_defname, _idx+1)
665                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
666                                 _name = _defname[_idx]
667                             else:
668                                 _name = "%noname_%d"%(dn, _idx+1)
669                             pass
670                         else:
671                             _name = _names[_idx]
672                         pass
673                     else:
674                         # must be wrong  usage
675                         _name = _names[0]
676                     pass
677                 else:
678                     if _idx >= 0:
679                         _name = "%s_%d"%(_names, _idx+1)
680                     else:
681                         _name = _names
682                     pass
683                 return _name
684             # ---
685             def _publish( _name, _obj ):
686                 fatherObj = None
687                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
688                     fatherObj = _obj.GetShape()
689                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
690                     fatherObj = _obj.GetField()
691                 elif not _obj.IsMainShape():
692                     fatherObj = _obj.GetMainShape()
693                     pass
694                 if fatherObj and fatherObj.GetStudyEntry():
695                     self.addToStudyInFather(fatherObj, _obj, _name)
696                 else:
697                     self.addToStudy(_obj, _name)
698                     pass
699                 return
700             # ---
701             if not theObj:
702                 return # null object
703             if not theName and not self.myMaxNbSubShapesAllowed:
704                 return # nothing to do: auto-publishing is disabled
705             if not theName and not theDefaultName:
706                 return # neither theName nor theDefaultName is given
707             import types
708             if type(theObj) in [types.ListType, types.TupleType]:
709                 # list of objects is being published
710                 idx = 0
711                 for obj in theObj:
712                     if not obj: continue # bad object
713                     name = _item_name(theName, theDefaultName, idx)
714                     _publish( name, obj )
715                     idx = idx+1
716                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
717                     pass
718                 pass
719             else:
720                 # single object is published
721                 name = _item_name(theName, theDefaultName)
722                 _publish( name, theObj )
723             pass
724
725         ## @addtogroup l1_geomBuilder_auxiliary
726         ## @{
727         def init_geom(self,theStudy):
728             self.myStudy = theStudy
729             self.myStudyId = self.myStudy._get_StudyId()
730             self.myBuilder = self.myStudy.NewBuilder()
731             self.father = self.myStudy.FindComponent("GEOM")
732             if self.father is None:
733                 self.father = self.myBuilder.NewComponent("GEOM")
734                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
735                 FName = A1._narrow(SALOMEDS.AttributeName)
736                 FName.SetValue("Geometry")
737                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
738                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
739                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
740                 self.myBuilder.DefineComponentInstance(self.father,self)
741                 pass
742             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
743             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
744             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
745             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
746             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
747             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
748             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
749             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
750             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
751             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
752             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
753             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
754             self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
755
756             # The below line is a right way to map all plugin functions to geomBuilder,
757             # but AdvancedOperations are already mapped, that is why this line is commented
758             # and presents here only as an axample
759             #self.AdvOp    = self.GetPluginOperations (self.myStudyId, "AdvancedEngine")
760
761             # self.AdvOp is used by functions MakePipeTShape*, MakeDividedDisk, etc.
762             self.AdvOp = GEOM._objref_GEOM_Gen.GetPluginOperations (self, self.myStudyId, "AdvancedEngine")
763
764             # set GEOM as root in the use case tree
765             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
766             self.myUseCaseBuilder.SetRootCurrent()
767             self.myUseCaseBuilder.Append(self.father)
768             pass
769
770         def GetPluginOperations(self, studyID, libraryName):
771             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
772             if op:
773                 # bind methods of operations to self
774                 methods = op.__class__.__dict__['__methods__']
775                 avoid_methods = self.BasicOp.__class__.__dict__['__methods__']
776                 for meth_name in methods:
777                     if not meth_name in avoid_methods: # avoid basic methods
778                         function = getattr(op.__class__, meth_name)
779                         if callable(function):
780                             #self.__dict__[meth_name] = self.__PluginOperation(op, function)
781                             self.__dict__[meth_name] = PluginOperation(op, function)
782             return op
783
784         ## Enable / disable results auto-publishing
785         # 
786         #  The automatic publishing is managed in the following way:
787         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
788         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
789         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
790         #  value passed as parameter has the same effect.
791         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
792         #  maximum number of sub-shapes allowed for publishing is set to specified value.
793         #
794         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
795         #  @ingroup l1_publish_data
796         def addToStudyAuto(self, maxNbSubShapes=-1):
797             """
798             Enable / disable results auto-publishing
799
800             The automatic publishing is managed in the following way:
801             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
802             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
803             maximum number of sub-shapes allowed for publishing is unlimited; any negative
804             value passed as parameter has the same effect.
805             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
806             maximum number of sub-shapes allowed for publishing is set to this value.
807
808             Parameters:
809                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
810
811             Example of usage:
812                 geompy.addToStudyAuto()   # enable auto-publishing
813                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
814                 geompy.addToStudyAuto(0)  # disable auto-publishing
815             """
816             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
817             pass
818
819         ## Dump component to the Python script
820         #  This method overrides IDL function to allow default values for the parameters.
821         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
822             """
823             Dump component to the Python script
824             This method overrides IDL function to allow default values for the parameters.
825             """
826             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
827
828         ## Get name for sub-shape aSubObj of shape aMainObj
829         #
830         # @ref swig_SubShapeName "Example"
831         def SubShapeName(self,aSubObj, aMainObj):
832             """
833             Get name for sub-shape aSubObj of shape aMainObj
834             """
835             # Example: see GEOM_TestAll.py
836
837             #aSubId  = orb.object_to_string(aSubObj)
838             #aMainId = orb.object_to_string(aMainObj)
839             #index = gg.getIndexTopology(aSubId, aMainId)
840             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
841             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
842             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
843             return name
844
845         ## Publish in study aShape with name aName
846         #
847         #  \param aShape the shape to be published
848         #  \param aName  the name for the shape
849         #  \param doRestoreSubShapes if True, finds and publishes also
850         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
851         #         and published sub-shapes of arguments
852         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
853         #                                                  these arguments description
854         #  \return study entry of the published shape in form of string
855         #
856         #  @ingroup l1_publish_data
857         #  @ref swig_all_addtostudy "Example"
858         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
859                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
860             """
861             Publish in study aShape with name aName
862
863             Parameters:
864                 aShape the shape to be published
865                 aName  the name for the shape
866                 doRestoreSubShapes if True, finds and publishes also
867                                    sub-shapes of aShape, corresponding to its arguments
868                                    and published sub-shapes of arguments
869                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
870                                                          these arguments description
871
872             Returns:
873                 study entry of the published shape in form of string
874
875             Example of usage:
876                 id_block1 = geompy.addToStudy(Block1, "Block 1")
877             """
878             # Example: see GEOM_TestAll.py
879             try:
880                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
881                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
882                 if doRestoreSubShapes:
883                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
884                                             theFindMethod, theInheritFirstArg, True )
885             except:
886                 print "addToStudy() failed"
887                 return ""
888             return aShape.GetStudyEntry()
889
890         ## Publish in study aShape with name aName as sub-object of previously published aFather
891         #  \param aFather previously published object
892         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
893         #  \param aName  the name for the shape
894         #
895         #  \return study entry of the published shape in form of string
896         #
897         #  @ingroup l1_publish_data
898         #  @ref swig_all_addtostudyInFather "Example"
899         def addToStudyInFather(self, aFather, aShape, aName):
900             """
901             Publish in study aShape with name aName as sub-object of previously published aFather
902
903             Parameters:
904                 aFather previously published object
905                 aShape the shape to be published as sub-object of aFather
906                 aName  the name for the shape
907
908             Returns:
909                 study entry of the published shape in form of string
910             """
911             # Example: see GEOM_TestAll.py
912             try:
913                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
914                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
915             except:
916                 print "addToStudyInFather() failed"
917                 return ""
918             return aShape.GetStudyEntry()
919
920         ## Unpublish object in study
921         #
922         #  \param obj the object to be unpublished
923         def hideInStudy(self, obj):
924             """
925             Unpublish object in study
926
927             Parameters:
928                 obj the object to be unpublished
929             """
930             ior = salome.orb.object_to_string(obj)
931             aSObject = self.myStudy.FindObjectIOR(ior)
932             if aSObject is not None:
933                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
934                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
935                 drwAttribute.SetDrawable(False)
936                 pass
937
938         # end of l1_geomBuilder_auxiliary
939         ## @}
940
941         ## @addtogroup l3_restore_ss
942         ## @{
943
944         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
945         #  To be used from python scripts out of addToStudy() (non-default usage)
946         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
947         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
948         #                   If this list is empty, all operation arguments will be published
949         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
950         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
951         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
952         #                            Do not publish sub-shapes in place of arguments, but only
953         #                            in place of sub-shapes of the first argument,
954         #                            because the whole shape corresponds to the first argument.
955         #                            Mainly to be used after transformations, but it also can be
956         #                            usefull after partition with one object shape, and some other
957         #                            operations, where only the first argument has to be considered.
958         #                            If theObject has only one argument shape, this flag is automatically
959         #                            considered as True, not regarding really passed value.
960         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
961         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
962         #  \return list of published sub-shapes
963         #
964         #  @ref tui_restore_prs_params "Example"
965         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
966                               theInheritFirstArg=False, theAddPrefix=True):
967             """
968             Publish sub-shapes, standing for arguments and sub-shapes of arguments
969             To be used from python scripts out of geompy.addToStudy (non-default usage)
970
971             Parameters:
972                 theObject published GEOM.GEOM_Object, arguments of which will be published
973                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
974                           If this list is empty, all operation arguments will be published
975                 theFindMethod method to search sub-shapes, corresponding to arguments and
976                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
977                 theInheritFirstArg set properties of the first argument for theObject.
978                                    Do not publish sub-shapes in place of arguments, but only
979                                    in place of sub-shapes of the first argument,
980                                    because the whole shape corresponds to the first argument.
981                                    Mainly to be used after transformations, but it also can be
982                                    usefull after partition with one object shape, and some other
983                                    operations, where only the first argument has to be considered.
984                                    If theObject has only one argument shape, this flag is automatically
985                                    considered as True, not regarding really passed value.
986                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
987                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
988             Returns:
989                 list of published sub-shapes
990             """
991             # Example: see GEOM_TestAll.py
992             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
993                                           theFindMethod, theInheritFirstArg, theAddPrefix)
994
995         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
996         #  To be used from python scripts out of addToStudy() (non-default usage)
997         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
998         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
999         #                   If this list is empty, all operation arguments will be published
1000         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1001         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1002         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1003         #                            Do not publish sub-shapes in place of arguments, but only
1004         #                            in place of sub-shapes of the first argument,
1005         #                            because the whole shape corresponds to the first argument.
1006         #                            Mainly to be used after transformations, but it also can be
1007         #                            usefull after partition with one object shape, and some other
1008         #                            operations, where only the first argument has to be considered.
1009         #                            If theObject has only one argument shape, this flag is automatically
1010         #                            considered as True, not regarding really passed value.
1011         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1012         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1013         #  \return list of published sub-shapes
1014         #
1015         #  @ref tui_restore_prs_params "Example"
1016         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1017                                    theInheritFirstArg=False, theAddPrefix=True):
1018             """
1019             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1020             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1021
1022             Parameters:
1023                 theObject published GEOM.GEOM_Object, arguments of which will be published
1024                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1025                           If this list is empty, all operation arguments will be published
1026                 theFindMethod method to search sub-shapes, corresponding to arguments and
1027                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1028                 theInheritFirstArg set properties of the first argument for theObject.
1029                                    Do not publish sub-shapes in place of arguments, but only
1030                                    in place of sub-shapes of the first argument,
1031                                    because the whole shape corresponds to the first argument.
1032                                    Mainly to be used after transformations, but it also can be
1033                                    usefull after partition with one object shape, and some other
1034                                    operations, where only the first argument has to be considered.
1035                                    If theObject has only one argument shape, this flag is automatically
1036                                    considered as True, not regarding really passed value.
1037                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1038                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1039
1040             Returns: 
1041                 list of published sub-shapes
1042             """
1043             # Example: see GEOM_TestAll.py
1044             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
1045                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1046
1047         # end of l3_restore_ss
1048         ## @}
1049
1050         ## @addtogroup l3_basic_go
1051         ## @{
1052
1053         ## Create point by three coordinates.
1054         #  @param theX The X coordinate of the point.
1055         #  @param theY The Y coordinate of the point.
1056         #  @param theZ The Z coordinate of the point.
1057         #  @param theName Object name; when specified, this parameter is used
1058         #         for result publication in the study. Otherwise, if automatic
1059         #         publication is switched on, default value is used for result name.
1060         #
1061         #  @return New GEOM.GEOM_Object, containing the created point.
1062         #
1063         #  @ref tui_creation_point "Example"
1064         def MakeVertex(self, theX, theY, theZ, theName=None):
1065             """
1066             Create point by three coordinates.
1067
1068             Parameters:
1069                 theX The X coordinate of the point.
1070                 theY The Y coordinate of the point.
1071                 theZ The Z coordinate of the point.
1072                 theName Object name; when specified, this parameter is used
1073                         for result publication in the study. Otherwise, if automatic
1074                         publication is switched on, default value is used for result name.
1075                 
1076             Returns: 
1077                 New GEOM.GEOM_Object, containing the created point.
1078             """
1079             # Example: see GEOM_TestAll.py
1080             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1081             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1082             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1083             anObj.SetParameters(Parameters)
1084             self._autoPublish(anObj, theName, "vertex")
1085             return anObj
1086
1087         ## Create a point, distant from the referenced point
1088         #  on the given distances along the coordinate axes.
1089         #  @param theReference The referenced point.
1090         #  @param theX Displacement from the referenced point along OX axis.
1091         #  @param theY Displacement from the referenced point along OY axis.
1092         #  @param theZ Displacement from the referenced point along OZ axis.
1093         #  @param theName Object name; when specified, this parameter is used
1094         #         for result publication in the study. Otherwise, if automatic
1095         #         publication is switched on, default value is used for result name.
1096         #
1097         #  @return New GEOM.GEOM_Object, containing the created point.
1098         #
1099         #  @ref tui_creation_point "Example"
1100         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1101             """
1102             Create a point, distant from the referenced point
1103             on the given distances along the coordinate axes.
1104
1105             Parameters:
1106                 theReference The referenced point.
1107                 theX Displacement from the referenced point along OX axis.
1108                 theY Displacement from the referenced point along OY axis.
1109                 theZ Displacement from the referenced point along OZ axis.
1110                 theName Object name; when specified, this parameter is used
1111                         for result publication in the study. Otherwise, if automatic
1112                         publication is switched on, default value is used for result name.
1113
1114             Returns:
1115                 New GEOM.GEOM_Object, containing the created point.
1116             """
1117             # Example: see GEOM_TestAll.py
1118             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1119             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1120             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1121             anObj.SetParameters(Parameters)
1122             self._autoPublish(anObj, theName, "vertex")
1123             return anObj
1124
1125         ## Create a point, corresponding to the given parameter on the given curve.
1126         #  @param theRefCurve The referenced curve.
1127         #  @param theParameter Value of parameter on the referenced curve.
1128         #  @param theName Object name; when specified, this parameter is used
1129         #         for result publication in the study. Otherwise, if automatic
1130         #         publication is switched on, default value is used for result name.
1131         #
1132         #  @return New GEOM.GEOM_Object, containing the created point.
1133         #
1134         #  @ref tui_creation_point "Example"
1135         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1136             """
1137             Create a point, corresponding to the given parameter on the given curve.
1138
1139             Parameters:
1140                 theRefCurve The referenced curve.
1141                 theParameter Value of parameter on the referenced curve.
1142                 theName Object name; when specified, this parameter is used
1143                         for result publication in the study. Otherwise, if automatic
1144                         publication is switched on, default value is used for result name.
1145
1146             Returns:
1147                 New GEOM.GEOM_Object, containing the created point.
1148
1149             Example of usage:
1150                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1151             """
1152             # Example: see GEOM_TestAll.py
1153             theParameter, Parameters = ParseParameters(theParameter)
1154             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1155             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1156             anObj.SetParameters(Parameters)
1157             self._autoPublish(anObj, theName, "vertex")
1158             return anObj
1159
1160         ## Create a point by projection give coordinates on the given curve
1161         #  @param theRefCurve The referenced curve.
1162         #  @param theX X-coordinate in 3D space
1163         #  @param theY Y-coordinate in 3D space
1164         #  @param theZ Z-coordinate in 3D space
1165         #  @param theName Object name; when specified, this parameter is used
1166         #         for result publication in the study. Otherwise, if automatic
1167         #         publication is switched on, default value is used for result name.
1168         #
1169         #  @return New GEOM.GEOM_Object, containing the created point.
1170         #
1171         #  @ref tui_creation_point "Example"
1172         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1173             """
1174             Create a point by projection give coordinates on the given curve
1175             
1176             Parameters:
1177                 theRefCurve The referenced curve.
1178                 theX X-coordinate in 3D space
1179                 theY Y-coordinate in 3D space
1180                 theZ Z-coordinate in 3D space
1181                 theName Object name; when specified, this parameter is used
1182                         for result publication in the study. Otherwise, if automatic
1183                         publication is switched on, default value is used for result name.
1184
1185             Returns:
1186                 New GEOM.GEOM_Object, containing the created point.
1187
1188             Example of usage:
1189                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1190             """
1191             # Example: see GEOM_TestAll.py
1192             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1193             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1194             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1195             anObj.SetParameters(Parameters)
1196             self._autoPublish(anObj, theName, "vertex")
1197             return anObj
1198
1199         ## Create a point, corresponding to the given length on the given curve.
1200         #  @param theRefCurve The referenced curve.
1201         #  @param theLength Length on the referenced curve. It can be negative.
1202         #  @param theStartPoint Point allowing to choose the direction for the calculation
1203         #                       of the length. If None, start from the first point of theRefCurve.
1204         #  @param theName Object name; when specified, this parameter is used
1205         #         for result publication in the study. Otherwise, if automatic
1206         #         publication is switched on, default value is used for result name.
1207         #
1208         #  @return New GEOM.GEOM_Object, containing the created point.
1209         #
1210         #  @ref tui_creation_point "Example"
1211         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1212             """
1213             Create a point, corresponding to the given length on the given curve.
1214
1215             Parameters:
1216                 theRefCurve The referenced curve.
1217                 theLength Length on the referenced curve. It can be negative.
1218                 theStartPoint Point allowing to choose the direction for the calculation
1219                               of the length. If None, start from the first point of theRefCurve.
1220                 theName Object name; when specified, this parameter is used
1221                         for result publication in the study. Otherwise, if automatic
1222                         publication is switched on, default value is used for result name.
1223
1224             Returns:
1225                 New GEOM.GEOM_Object, containing the created point.
1226             """
1227             # Example: see GEOM_TestAll.py
1228             theLength, Parameters = ParseParameters(theLength)
1229             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1230             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1231             anObj.SetParameters(Parameters)
1232             self._autoPublish(anObj, theName, "vertex")
1233             return anObj
1234
1235         ## Create a point, corresponding to the given parameters on the
1236         #    given surface.
1237         #  @param theRefSurf The referenced surface.
1238         #  @param theUParameter Value of U-parameter on the referenced surface.
1239         #  @param theVParameter Value of V-parameter on the referenced surface.
1240         #  @param theName Object name; when specified, this parameter is used
1241         #         for result publication in the study. Otherwise, if automatic
1242         #         publication is switched on, default value is used for result name.
1243         #
1244         #  @return New GEOM.GEOM_Object, containing the created point.
1245         #
1246         #  @ref swig_MakeVertexOnSurface "Example"
1247         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1248             """
1249             Create a point, corresponding to the given parameters on the
1250             given surface.
1251
1252             Parameters:
1253                 theRefSurf The referenced surface.
1254                 theUParameter Value of U-parameter on the referenced surface.
1255                 theVParameter Value of V-parameter on the referenced surface.
1256                 theName Object name; when specified, this parameter is used
1257                         for result publication in the study. Otherwise, if automatic
1258                         publication is switched on, default value is used for result name.
1259
1260             Returns:
1261                 New GEOM.GEOM_Object, containing the created point.
1262
1263             Example of usage:
1264                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1265             """
1266             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1267             # Example: see GEOM_TestAll.py
1268             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1269             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1270             anObj.SetParameters(Parameters);
1271             self._autoPublish(anObj, theName, "vertex")
1272             return anObj
1273
1274         ## Create a point by projection give coordinates on the given surface
1275         #  @param theRefSurf The referenced surface.
1276         #  @param theX X-coordinate in 3D space
1277         #  @param theY Y-coordinate in 3D space
1278         #  @param theZ Z-coordinate in 3D space
1279         #  @param theName Object name; when specified, this parameter is used
1280         #         for result publication in the study. Otherwise, if automatic
1281         #         publication is switched on, default value is used for result name.
1282         #
1283         #  @return New GEOM.GEOM_Object, containing the created point.
1284         #
1285         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1286         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1287             """
1288             Create a point by projection give coordinates on the given surface
1289
1290             Parameters:
1291                 theRefSurf The referenced surface.
1292                 theX X-coordinate in 3D space
1293                 theY Y-coordinate in 3D space
1294                 theZ Z-coordinate in 3D space
1295                 theName Object name; when specified, this parameter is used
1296                         for result publication in the study. Otherwise, if automatic
1297                         publication is switched on, default value is used for result name.
1298
1299             Returns:
1300                 New GEOM.GEOM_Object, containing the created point.
1301
1302             Example of usage:
1303                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1304             """
1305             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1306             # Example: see GEOM_TestAll.py
1307             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1308             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1309             anObj.SetParameters(Parameters);
1310             self._autoPublish(anObj, theName, "vertex")
1311             return anObj
1312
1313         ## Create a point, which lays on the given face.
1314         #  The point will lay in arbitrary place of the face.
1315         #  The only condition on it is a non-zero distance to the face boundary.
1316         #  Such point can be used to uniquely identify the face inside any
1317         #  shape in case, when the shape does not contain overlapped faces.
1318         #  @param theFace The referenced face.
1319         #  @param theName Object name; when specified, this parameter is used
1320         #         for result publication in the study. Otherwise, if automatic
1321         #         publication is switched on, default value is used for result name.
1322         #
1323         #  @return New GEOM.GEOM_Object, containing the created point.
1324         #
1325         #  @ref swig_MakeVertexInsideFace "Example"
1326         def MakeVertexInsideFace (self, theFace, theName=None):
1327             """
1328             Create a point, which lays on the given face.
1329             The point will lay in arbitrary place of the face.
1330             The only condition on it is a non-zero distance to the face boundary.
1331             Such point can be used to uniquely identify the face inside any
1332             shape in case, when the shape does not contain overlapped faces.
1333
1334             Parameters:
1335                 theFace The referenced face.
1336                 theName Object name; when specified, this parameter is used
1337                         for result publication in the study. Otherwise, if automatic
1338                         publication is switched on, default value is used for result name.
1339
1340             Returns:
1341                 New GEOM.GEOM_Object, containing the created point.
1342
1343             Example of usage:
1344                 p_on_face = geompy.MakeVertexInsideFace(Face)
1345             """
1346             # Example: see GEOM_TestAll.py
1347             anObj = self.BasicOp.MakePointOnFace(theFace)
1348             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1349             self._autoPublish(anObj, theName, "vertex")
1350             return anObj
1351
1352         ## Create a point on intersection of two lines.
1353         #  @param theRefLine1, theRefLine2 The referenced lines.
1354         #  @param theName Object name; when specified, this parameter is used
1355         #         for result publication in the study. Otherwise, if automatic
1356         #         publication is switched on, default value is used for result name.
1357         #
1358         #  @return New GEOM.GEOM_Object, containing the created point.
1359         #
1360         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1361         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1362             """
1363             Create a point on intersection of two lines.
1364
1365             Parameters:
1366                 theRefLine1, theRefLine2 The referenced lines.
1367                 theName Object name; when specified, this parameter is used
1368                         for result publication in the study. Otherwise, if automatic
1369                         publication is switched on, default value is used for result name.
1370
1371             Returns:
1372                 New GEOM.GEOM_Object, containing the created point.
1373             """
1374             # Example: see GEOM_TestAll.py
1375             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1376             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1377             self._autoPublish(anObj, theName, "vertex")
1378             return anObj
1379
1380         ## Create a tangent, corresponding to the given parameter on the given curve.
1381         #  @param theRefCurve The referenced curve.
1382         #  @param theParameter Value of parameter on the referenced curve.
1383         #  @param theName Object name; when specified, this parameter is used
1384         #         for result publication in the study. Otherwise, if automatic
1385         #         publication is switched on, default value is used for result name.
1386         #
1387         #  @return New GEOM.GEOM_Object, containing the created tangent.
1388         #
1389         #  @ref swig_MakeTangentOnCurve "Example"
1390         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1391             """
1392             Create a tangent, corresponding to the given parameter on the given curve.
1393
1394             Parameters:
1395                 theRefCurve The referenced curve.
1396                 theParameter Value of parameter on the referenced curve.
1397                 theName Object name; when specified, this parameter is used
1398                         for result publication in the study. Otherwise, if automatic
1399                         publication is switched on, default value is used for result name.
1400
1401             Returns:
1402                 New GEOM.GEOM_Object, containing the created tangent.
1403
1404             Example of usage:
1405                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1406             """
1407             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1408             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1409             self._autoPublish(anObj, theName, "tangent")
1410             return anObj
1411
1412         ## Create a tangent plane, corresponding to the given parameter on the given face.
1413         #  @param theFace The face for which tangent plane should be built.
1414         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1415         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1416         #  @param theTrimSize the size of plane.
1417         #  @param theName Object name; when specified, this parameter is used
1418         #         for result publication in the study. Otherwise, if automatic
1419         #         publication is switched on, default value is used for result name.
1420         #
1421         #  @return New GEOM.GEOM_Object, containing the created tangent.
1422         #
1423         #  @ref swig_MakeTangentPlaneOnFace "Example"
1424         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1425             """
1426             Create a tangent plane, corresponding to the given parameter on the given face.
1427
1428             Parameters:
1429                 theFace The face for which tangent plane should be built.
1430                 theParameterV vertical value of the center point (0.0 - 1.0).
1431                 theParameterU horisontal value of the center point (0.0 - 1.0).
1432                 theTrimSize the size of plane.
1433                 theName Object name; when specified, this parameter is used
1434                         for result publication in the study. Otherwise, if automatic
1435                         publication is switched on, default value is used for result name.
1436
1437            Returns: 
1438                 New GEOM.GEOM_Object, containing the created tangent.
1439
1440            Example of usage:
1441                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1442             """
1443             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1444             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1445             self._autoPublish(anObj, theName, "tangent")
1446             return anObj
1447
1448         ## Create a vector with the given components.
1449         #  @param theDX X component of the vector.
1450         #  @param theDY Y component of the vector.
1451         #  @param theDZ Z component of the vector.
1452         #  @param theName Object name; when specified, this parameter is used
1453         #         for result publication in the study. Otherwise, if automatic
1454         #         publication is switched on, default value is used for result name.
1455         #
1456         #  @return New GEOM.GEOM_Object, containing the created vector.
1457         #
1458         #  @ref tui_creation_vector "Example"
1459         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1460             """
1461             Create a vector with the given components.
1462
1463             Parameters:
1464                 theDX X component of the vector.
1465                 theDY Y component of the vector.
1466                 theDZ Z component of the vector.
1467                 theName Object name; when specified, this parameter is used
1468                         for result publication in the study. Otherwise, if automatic
1469                         publication is switched on, default value is used for result name.
1470
1471             Returns:     
1472                 New GEOM.GEOM_Object, containing the created vector.
1473             """
1474             # Example: see GEOM_TestAll.py
1475             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1476             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1477             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1478             anObj.SetParameters(Parameters)
1479             self._autoPublish(anObj, theName, "vector")
1480             return anObj
1481
1482         ## Create a vector between two points.
1483         #  @param thePnt1 Start point for the vector.
1484         #  @param thePnt2 End point for the vector.
1485         #  @param theName Object name; when specified, this parameter is used
1486         #         for result publication in the study. Otherwise, if automatic
1487         #         publication is switched on, default value is used for result name.
1488         #
1489         #  @return New GEOM.GEOM_Object, containing the created vector.
1490         #
1491         #  @ref tui_creation_vector "Example"
1492         def MakeVector(self, thePnt1, thePnt2, theName=None):
1493             """
1494             Create a vector between two points.
1495
1496             Parameters:
1497                 thePnt1 Start point for the vector.
1498                 thePnt2 End point for the vector.
1499                 theName Object name; when specified, this parameter is used
1500                         for result publication in the study. Otherwise, if automatic
1501                         publication is switched on, default value is used for result name.
1502
1503             Returns:        
1504                 New GEOM.GEOM_Object, containing the created vector.
1505             """
1506             # Example: see GEOM_TestAll.py
1507             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1508             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1509             self._autoPublish(anObj, theName, "vector")
1510             return anObj
1511
1512         ## Create a line, passing through the given point
1513         #  and parrallel to the given direction
1514         #  @param thePnt Point. The resulting line will pass through it.
1515         #  @param theDir Direction. The resulting line will be parallel to it.
1516         #  @param theName Object name; when specified, this parameter is used
1517         #         for result publication in the study. Otherwise, if automatic
1518         #         publication is switched on, default value is used for result name.
1519         #
1520         #  @return New GEOM.GEOM_Object, containing the created line.
1521         #
1522         #  @ref tui_creation_line "Example"
1523         def MakeLine(self, thePnt, theDir, theName=None):
1524             """
1525             Create a line, passing through the given point
1526             and parrallel to the given direction
1527
1528             Parameters:
1529                 thePnt Point. The resulting line will pass through it.
1530                 theDir Direction. The resulting line will be parallel to it.
1531                 theName Object name; when specified, this parameter is used
1532                         for result publication in the study. Otherwise, if automatic
1533                         publication is switched on, default value is used for result name.
1534
1535             Returns:
1536                 New GEOM.GEOM_Object, containing the created line.
1537             """
1538             # Example: see GEOM_TestAll.py
1539             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1540             RaiseIfFailed("MakeLine", self.BasicOp)
1541             self._autoPublish(anObj, theName, "line")
1542             return anObj
1543
1544         ## Create a line, passing through the given points
1545         #  @param thePnt1 First of two points, defining the line.
1546         #  @param thePnt2 Second of two points, defining the line.
1547         #  @param theName Object name; when specified, this parameter is used
1548         #         for result publication in the study. Otherwise, if automatic
1549         #         publication is switched on, default value is used for result name.
1550         #
1551         #  @return New GEOM.GEOM_Object, containing the created line.
1552         #
1553         #  @ref tui_creation_line "Example"
1554         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1555             """
1556             Create a line, passing through the given points
1557
1558             Parameters:
1559                 thePnt1 First of two points, defining the line.
1560                 thePnt2 Second of two points, defining the line.
1561                 theName Object name; when specified, this parameter is used
1562                         for result publication in the study. Otherwise, if automatic
1563                         publication is switched on, default value is used for result name.
1564
1565             Returns:
1566                 New GEOM.GEOM_Object, containing the created line.
1567             """
1568             # Example: see GEOM_TestAll.py
1569             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1570             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1571             self._autoPublish(anObj, theName, "line")
1572             return anObj
1573
1574         ## Create a line on two faces intersection.
1575         #  @param theFace1 First of two faces, defining the line.
1576         #  @param theFace2 Second of two faces, defining the line.
1577         #  @param theName Object name; when specified, this parameter is used
1578         #         for result publication in the study. Otherwise, if automatic
1579         #         publication is switched on, default value is used for result name.
1580         #
1581         #  @return New GEOM.GEOM_Object, containing the created line.
1582         #
1583         #  @ref swig_MakeLineTwoFaces "Example"
1584         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1585             """
1586             Create a line on two faces intersection.
1587
1588             Parameters:
1589                 theFace1 First of two faces, defining the line.
1590                 theFace2 Second of two faces, defining the line.
1591                 theName Object name; when specified, this parameter is used
1592                         for result publication in the study. Otherwise, if automatic
1593                         publication is switched on, default value is used for result name.
1594
1595             Returns:
1596                 New GEOM.GEOM_Object, containing the created line.
1597             """
1598             # Example: see GEOM_TestAll.py
1599             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1600             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1601             self._autoPublish(anObj, theName, "line")
1602             return anObj
1603
1604         ## Create a plane, passing through the given point
1605         #  and normal to the given vector.
1606         #  @param thePnt Point, the plane has to pass through.
1607         #  @param theVec Vector, defining the plane normal direction.
1608         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1609         #  @param theName Object name; when specified, this parameter is used
1610         #         for result publication in the study. Otherwise, if automatic
1611         #         publication is switched on, default value is used for result name.
1612         #
1613         #  @return New GEOM.GEOM_Object, containing the created plane.
1614         #
1615         #  @ref tui_creation_plane "Example"
1616         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1617             """
1618             Create a plane, passing through the given point
1619             and normal to the given vector.
1620
1621             Parameters:
1622                 thePnt Point, the plane has to pass through.
1623                 theVec Vector, defining the plane normal direction.
1624                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1625                 theName Object name; when specified, this parameter is used
1626                         for result publication in the study. Otherwise, if automatic
1627                         publication is switched on, default value is used for result name.
1628
1629             Returns:    
1630                 New GEOM.GEOM_Object, containing the created plane.
1631             """
1632             # Example: see GEOM_TestAll.py
1633             theTrimSize, Parameters = ParseParameters(theTrimSize);
1634             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1635             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1636             anObj.SetParameters(Parameters)
1637             self._autoPublish(anObj, theName, "plane")
1638             return anObj
1639
1640         ## Create a plane, passing through the three given points
1641         #  @param thePnt1 First of three points, defining the plane.
1642         #  @param thePnt2 Second of three points, defining the plane.
1643         #  @param thePnt3 Fird of three points, defining the plane.
1644         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1645         #  @param theName Object name; when specified, this parameter is used
1646         #         for result publication in the study. Otherwise, if automatic
1647         #         publication is switched on, default value is used for result name.
1648         #
1649         #  @return New GEOM.GEOM_Object, containing the created plane.
1650         #
1651         #  @ref tui_creation_plane "Example"
1652         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1653             """
1654             Create a plane, passing through the three given points
1655
1656             Parameters:
1657                 thePnt1 First of three points, defining the plane.
1658                 thePnt2 Second of three points, defining the plane.
1659                 thePnt3 Fird of three points, defining the plane.
1660                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1661                 theName Object name; when specified, this parameter is used
1662                         for result publication in the study. Otherwise, if automatic
1663                         publication is switched on, default value is used for result name.
1664
1665             Returns:
1666                 New GEOM.GEOM_Object, containing the created plane.
1667             """
1668             # Example: see GEOM_TestAll.py
1669             theTrimSize, Parameters = ParseParameters(theTrimSize);
1670             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1671             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1672             anObj.SetParameters(Parameters)
1673             self._autoPublish(anObj, theName, "plane")
1674             return anObj
1675
1676         ## Create a plane, similar to the existing one, but with another size of representing face.
1677         #  @param theFace Referenced plane or LCS(Marker).
1678         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1679         #  @param theName Object name; when specified, this parameter is used
1680         #         for result publication in the study. Otherwise, if automatic
1681         #         publication is switched on, default value is used for result name.
1682         #
1683         #  @return New GEOM.GEOM_Object, containing the created plane.
1684         #
1685         #  @ref tui_creation_plane "Example"
1686         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1687             """
1688             Create a plane, similar to the existing one, but with another size of representing face.
1689
1690             Parameters:
1691                 theFace Referenced plane or LCS(Marker).
1692                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1693                 theName Object name; when specified, this parameter is used
1694                         for result publication in the study. Otherwise, if automatic
1695                         publication is switched on, default value is used for result name.
1696
1697             Returns:
1698                 New GEOM.GEOM_Object, containing the created plane.
1699             """
1700             # Example: see GEOM_TestAll.py
1701             theTrimSize, Parameters = ParseParameters(theTrimSize);
1702             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1703             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1704             anObj.SetParameters(Parameters)
1705             self._autoPublish(anObj, theName, "plane")
1706             return anObj
1707
1708         ## Create a plane, passing through the 2 vectors
1709         #  with center in a start point of the first vector.
1710         #  @param theVec1 Vector, defining center point and plane direction.
1711         #  @param theVec2 Vector, defining the plane normal direction.
1712         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1713         #  @param theName Object name; when specified, this parameter is used
1714         #         for result publication in the study. Otherwise, if automatic
1715         #         publication is switched on, default value is used for result name.
1716         #
1717         #  @return New GEOM.GEOM_Object, containing the created plane.
1718         #
1719         #  @ref tui_creation_plane "Example"
1720         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1721             """
1722             Create a plane, passing through the 2 vectors
1723             with center in a start point of the first vector.
1724
1725             Parameters:
1726                 theVec1 Vector, defining center point and plane direction.
1727                 theVec2 Vector, defining the plane normal direction.
1728                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1729                 theName Object name; when specified, this parameter is used
1730                         for result publication in the study. Otherwise, if automatic
1731                         publication is switched on, default value is used for result name.
1732
1733             Returns: 
1734                 New GEOM.GEOM_Object, containing the created plane.
1735             """
1736             # Example: see GEOM_TestAll.py
1737             theTrimSize, Parameters = ParseParameters(theTrimSize);
1738             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1739             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1740             anObj.SetParameters(Parameters)
1741             self._autoPublish(anObj, theName, "plane")
1742             return anObj
1743
1744         ## Create a plane, based on a Local coordinate system.
1745         #  @param theLCS  coordinate system, defining plane.
1746         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1747         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1748         #  @param theName Object name; when specified, this parameter is used
1749         #         for result publication in the study. Otherwise, if automatic
1750         #         publication is switched on, default value is used for result name.
1751         #
1752         #  @return New GEOM.GEOM_Object, containing the created plane.
1753         #
1754         #  @ref tui_creation_plane "Example"
1755         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1756             """
1757             Create a plane, based on a Local coordinate system.
1758
1759            Parameters: 
1760                 theLCS  coordinate system, defining plane.
1761                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1762                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1763                 theName Object name; when specified, this parameter is used
1764                         for result publication in the study. Otherwise, if automatic
1765                         publication is switched on, default value is used for result name.
1766
1767             Returns: 
1768                 New GEOM.GEOM_Object, containing the created plane.
1769             """
1770             # Example: see GEOM_TestAll.py
1771             theTrimSize, Parameters = ParseParameters(theTrimSize);
1772             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1773             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1774             anObj.SetParameters(Parameters)
1775             self._autoPublish(anObj, theName, "plane")
1776             return anObj
1777
1778         ## Create a local coordinate system.
1779         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1780         #  @param XDX,XDY,XDZ Three components of OX direction
1781         #  @param YDX,YDY,YDZ Three components of OY direction
1782         #  @param theName Object name; when specified, this parameter is used
1783         #         for result publication in the study. Otherwise, if automatic
1784         #         publication is switched on, default value is used for result name.
1785         #
1786         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1787         #
1788         #  @ref swig_MakeMarker "Example"
1789         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1790             """
1791             Create a local coordinate system.
1792
1793             Parameters: 
1794                 OX,OY,OZ Three coordinates of coordinate system origin.
1795                 XDX,XDY,XDZ Three components of OX direction
1796                 YDX,YDY,YDZ Three components of OY direction
1797                 theName Object name; when specified, this parameter is used
1798                         for result publication in the study. Otherwise, if automatic
1799                         publication is switched on, default value is used for result name.
1800
1801             Returns: 
1802                 New GEOM.GEOM_Object, containing the created coordinate system.
1803             """
1804             # Example: see GEOM_TestAll.py
1805             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1806             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1807             RaiseIfFailed("MakeMarker", self.BasicOp)
1808             anObj.SetParameters(Parameters)
1809             self._autoPublish(anObj, theName, "lcs")
1810             return anObj
1811
1812         ## Create a local coordinate system from shape.
1813         #  @param theShape The initial shape to detect the coordinate system.
1814         #  @param theName Object name; when specified, this parameter is used
1815         #         for result publication in the study. Otherwise, if automatic
1816         #         publication is switched on, default value is used for result name.
1817         #
1818         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1819         #
1820         #  @ref tui_creation_lcs "Example"
1821         def MakeMarkerFromShape(self, theShape, theName=None):
1822             """
1823             Create a local coordinate system from shape.
1824
1825             Parameters:
1826                 theShape The initial shape to detect the coordinate system.
1827                 theName Object name; when specified, this parameter is used
1828                         for result publication in the study. Otherwise, if automatic
1829                         publication is switched on, default value is used for result name.
1830                 
1831             Returns: 
1832                 New GEOM.GEOM_Object, containing the created coordinate system.
1833             """
1834             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1835             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1836             self._autoPublish(anObj, theName, "lcs")
1837             return anObj
1838
1839         ## Create a local coordinate system from point and two vectors.
1840         #  @param theOrigin Point of coordinate system origin.
1841         #  @param theXVec Vector of X direction
1842         #  @param theYVec Vector of Y direction
1843         #  @param theName Object name; when specified, this parameter is used
1844         #         for result publication in the study. Otherwise, if automatic
1845         #         publication is switched on, default value is used for result name.
1846         #
1847         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1848         #
1849         #  @ref tui_creation_lcs "Example"
1850         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1851             """
1852             Create a local coordinate system from point and two vectors.
1853
1854             Parameters:
1855                 theOrigin Point of coordinate system origin.
1856                 theXVec Vector of X direction
1857                 theYVec Vector of Y direction
1858                 theName Object name; when specified, this parameter is used
1859                         for result publication in the study. Otherwise, if automatic
1860                         publication is switched on, default value is used for result name.
1861
1862             Returns: 
1863                 New GEOM.GEOM_Object, containing the created coordinate system.
1864
1865             """
1866             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1867             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1868             self._autoPublish(anObj, theName, "lcs")
1869             return anObj
1870
1871         # end of l3_basic_go
1872         ## @}
1873
1874         ## @addtogroup l4_curves
1875         ## @{
1876
1877         ##  Create an arc of circle, passing through three given points.
1878         #  @param thePnt1 Start point of the arc.
1879         #  @param thePnt2 Middle point of the arc.
1880         #  @param thePnt3 End point of the arc.
1881         #  @param theName Object name; when specified, this parameter is used
1882         #         for result publication in the study. Otherwise, if automatic
1883         #         publication is switched on, default value is used for result name.
1884         #
1885         #  @return New GEOM.GEOM_Object, containing the created arc.
1886         #
1887         #  @ref swig_MakeArc "Example"
1888         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1889             """
1890             Create an arc of circle, passing through three given points.
1891
1892             Parameters:
1893                 thePnt1 Start point of the arc.
1894                 thePnt2 Middle point of the arc.
1895                 thePnt3 End point of the arc.
1896                 theName Object name; when specified, this parameter is used
1897                         for result publication in the study. Otherwise, if automatic
1898                         publication is switched on, default value is used for result name.
1899
1900             Returns: 
1901                 New GEOM.GEOM_Object, containing the created arc.
1902             """
1903             # Example: see GEOM_TestAll.py
1904             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1905             RaiseIfFailed("MakeArc", self.CurvesOp)
1906             self._autoPublish(anObj, theName, "arc")
1907             return anObj
1908
1909         ##  Create an arc of circle from a center and 2 points.
1910         #  @param thePnt1 Center of the arc
1911         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1912         #  @param thePnt3 End point of the arc (Gives also a direction)
1913         #  @param theSense Orientation of the arc
1914         #  @param theName Object name; when specified, this parameter is used
1915         #         for result publication in the study. Otherwise, if automatic
1916         #         publication is switched on, default value is used for result name.
1917         #
1918         #  @return New GEOM.GEOM_Object, containing the created arc.
1919         #
1920         #  @ref swig_MakeArc "Example"
1921         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1922             """
1923             Create an arc of circle from a center and 2 points.
1924
1925             Parameters:
1926                 thePnt1 Center of the arc
1927                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1928                 thePnt3 End point of the arc (Gives also a direction)
1929                 theSense Orientation of the arc
1930                 theName Object name; when specified, this parameter is used
1931                         for result publication in the study. Otherwise, if automatic
1932                         publication is switched on, default value is used for result name.
1933
1934             Returns:
1935                 New GEOM.GEOM_Object, containing the created arc.
1936             """
1937             # Example: see GEOM_TestAll.py
1938             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1939             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1940             self._autoPublish(anObj, theName, "arc")
1941             return anObj
1942
1943         ##  Create an arc of ellipse, of center and two points.
1944         #  @param theCenter Center of the arc.
1945         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1946         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1947         #  @param theName Object name; when specified, this parameter is used
1948         #         for result publication in the study. Otherwise, if automatic
1949         #         publication is switched on, default value is used for result name.
1950         #
1951         #  @return New GEOM.GEOM_Object, containing the created arc.
1952         #
1953         #  @ref swig_MakeArc "Example"
1954         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
1955             """
1956             Create an arc of ellipse, of center and two points.
1957
1958             Parameters:
1959                 theCenter Center of the arc.
1960                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1961                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1962                 theName Object name; when specified, this parameter is used
1963                         for result publication in the study. Otherwise, if automatic
1964                         publication is switched on, default value is used for result name.
1965
1966             Returns:
1967                 New GEOM.GEOM_Object, containing the created arc.
1968             """
1969             # Example: see GEOM_TestAll.py
1970             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
1971             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
1972             self._autoPublish(anObj, theName, "arc")
1973             return anObj
1974
1975         ## Create a circle with given center, normal vector and radius.
1976         #  @param thePnt Circle center.
1977         #  @param theVec Vector, normal to the plane of the circle.
1978         #  @param theR Circle radius.
1979         #  @param theName Object name; when specified, this parameter is used
1980         #         for result publication in the study. Otherwise, if automatic
1981         #         publication is switched on, default value is used for result name.
1982         #
1983         #  @return New GEOM.GEOM_Object, containing the created circle.
1984         #
1985         #  @ref tui_creation_circle "Example"
1986         def MakeCircle(self, thePnt, theVec, theR, theName=None):
1987             """
1988             Create a circle with given center, normal vector and radius.
1989
1990             Parameters:
1991                 thePnt Circle center.
1992                 theVec Vector, normal to the plane of the circle.
1993                 theR Circle radius.
1994                 theName Object name; when specified, this parameter is used
1995                         for result publication in the study. Otherwise, if automatic
1996                         publication is switched on, default value is used for result name.
1997
1998             Returns:
1999                 New GEOM.GEOM_Object, containing the created circle.
2000             """
2001             # Example: see GEOM_TestAll.py
2002             theR, Parameters = ParseParameters(theR)
2003             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2004             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2005             anObj.SetParameters(Parameters)
2006             self._autoPublish(anObj, theName, "circle")
2007             return anObj
2008
2009         ## Create a circle with given radius.
2010         #  Center of the circle will be in the origin of global
2011         #  coordinate system and normal vector will be codirected with Z axis
2012         #  @param theR Circle radius.
2013         #  @param theName Object name; when specified, this parameter is used
2014         #         for result publication in the study. Otherwise, if automatic
2015         #         publication is switched on, default value is used for result name.
2016         #
2017         #  @return New GEOM.GEOM_Object, containing the created circle.
2018         def MakeCircleR(self, theR, theName=None):
2019             """
2020             Create a circle with given radius.
2021             Center of the circle will be in the origin of global
2022             coordinate system and normal vector will be codirected with Z axis
2023
2024             Parameters:
2025                 theR Circle radius.
2026                 theName Object name; when specified, this parameter is used
2027                         for result publication in the study. Otherwise, if automatic
2028                         publication is switched on, default value is used for result name.
2029
2030             Returns:
2031                 New GEOM.GEOM_Object, containing the created circle.
2032             """
2033             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2034             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2035             self._autoPublish(anObj, theName, "circle")
2036             return anObj
2037
2038         ## Create a circle, passing through three given points
2039         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2040         #  @param theName Object name; when specified, this parameter is used
2041         #         for result publication in the study. Otherwise, if automatic
2042         #         publication is switched on, default value is used for result name.
2043         #
2044         #  @return New GEOM.GEOM_Object, containing the created circle.
2045         #
2046         #  @ref tui_creation_circle "Example"
2047         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2048             """
2049             Create a circle, passing through three given points
2050
2051             Parameters:
2052                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2053                 theName Object name; when specified, this parameter is used
2054                         for result publication in the study. Otherwise, if automatic
2055                         publication is switched on, default value is used for result name.
2056
2057             Returns:
2058                 New GEOM.GEOM_Object, containing the created circle.
2059             """
2060             # Example: see GEOM_TestAll.py
2061             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2062             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2063             self._autoPublish(anObj, theName, "circle")
2064             return anObj
2065
2066         ## Create a circle, with given point1 as center,
2067         #  passing through the point2 as radius and laying in the plane,
2068         #  defined by all three given points.
2069         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2070         #  @param theName Object name; when specified, this parameter is used
2071         #         for result publication in the study. Otherwise, if automatic
2072         #         publication is switched on, default value is used for result name.
2073         #
2074         #  @return New GEOM.GEOM_Object, containing the created circle.
2075         #
2076         #  @ref swig_MakeCircle "Example"
2077         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2078             """
2079             Create a circle, with given point1 as center,
2080             passing through the point2 as radius and laying in the plane,
2081             defined by all three given points.
2082
2083             Parameters:
2084                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2085                 theName Object name; when specified, this parameter is used
2086                         for result publication in the study. Otherwise, if automatic
2087                         publication is switched on, default value is used for result name.
2088
2089             Returns:
2090                 New GEOM.GEOM_Object, containing the created circle.
2091             """
2092             # Example: see GEOM_example6.py
2093             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2094             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2095             self._autoPublish(anObj, theName, "circle")
2096             return anObj
2097
2098         ## Create an ellipse with given center, normal vector and radiuses.
2099         #  @param thePnt Ellipse center.
2100         #  @param theVec Vector, normal to the plane of the ellipse.
2101         #  @param theRMajor Major ellipse radius.
2102         #  @param theRMinor Minor ellipse radius.
2103         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2104         #  @param theName Object name; when specified, this parameter is used
2105         #         for result publication in the study. Otherwise, if automatic
2106         #         publication is switched on, default value is used for result name.
2107         #
2108         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2109         #
2110         #  @ref tui_creation_ellipse "Example"
2111         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2112             """
2113             Create an ellipse with given center, normal vector and radiuses.
2114
2115             Parameters:
2116                 thePnt Ellipse center.
2117                 theVec Vector, normal to the plane of the ellipse.
2118                 theRMajor Major ellipse radius.
2119                 theRMinor Minor ellipse radius.
2120                 theVecMaj Vector, direction of the ellipse's main axis.
2121                 theName Object name; when specified, this parameter is used
2122                         for result publication in the study. Otherwise, if automatic
2123                         publication is switched on, default value is used for result name.
2124
2125             Returns:    
2126                 New GEOM.GEOM_Object, containing the created ellipse.
2127             """
2128             # Example: see GEOM_TestAll.py
2129             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2130             if theVecMaj is not None:
2131                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2132             else:
2133                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2134                 pass
2135             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2136             anObj.SetParameters(Parameters)
2137             self._autoPublish(anObj, theName, "ellipse")
2138             return anObj
2139
2140         ## Create an ellipse with given radiuses.
2141         #  Center of the ellipse will be in the origin of global
2142         #  coordinate system and normal vector will be codirected with Z axis
2143         #  @param theRMajor Major ellipse radius.
2144         #  @param theRMinor Minor ellipse radius.
2145         #  @param theName Object name; when specified, this parameter is used
2146         #         for result publication in the study. Otherwise, if automatic
2147         #         publication is switched on, default value is used for result name.
2148         #
2149         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2150         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2151             """
2152             Create an ellipse with given radiuses.
2153             Center of the ellipse will be in the origin of global
2154             coordinate system and normal vector will be codirected with Z axis
2155
2156             Parameters:
2157                 theRMajor Major ellipse radius.
2158                 theRMinor Minor ellipse radius.
2159                 theName Object name; when specified, this parameter is used
2160                         for result publication in the study. Otherwise, if automatic
2161                         publication is switched on, default value is used for result name.
2162
2163             Returns:
2164             New GEOM.GEOM_Object, containing the created ellipse.
2165             """
2166             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2167             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2168             self._autoPublish(anObj, theName, "ellipse")
2169             return anObj
2170
2171         ## Create a polyline on the set of points.
2172         #  @param thePoints Sequence of points for the polyline.
2173         #  @param theIsClosed If True, build a closed wire.
2174         #  @param theName Object name; when specified, this parameter is used
2175         #         for result publication in the study. Otherwise, if automatic
2176         #         publication is switched on, default value is used for result name.
2177         #
2178         #  @return New GEOM.GEOM_Object, containing the created polyline.
2179         #
2180         #  @ref tui_creation_curve "Example"
2181         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2182             """
2183             Create a polyline on the set of points.
2184
2185             Parameters:
2186                 thePoints Sequence of points for the polyline.
2187                 theIsClosed If True, build a closed wire.
2188                 theName Object name; when specified, this parameter is used
2189                         for result publication in the study. Otherwise, if automatic
2190                         publication is switched on, default value is used for result name.
2191
2192             Returns:
2193                 New GEOM.GEOM_Object, containing the created polyline.
2194             """
2195             # Example: see GEOM_TestAll.py
2196             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2197             RaiseIfFailed("MakePolyline", self.CurvesOp)
2198             self._autoPublish(anObj, theName, "polyline")
2199             return anObj
2200
2201         ## Create bezier curve on the set of points.
2202         #  @param thePoints Sequence of points for the bezier curve.
2203         #  @param theIsClosed If True, build a closed curve.
2204         #  @param theName Object name; when specified, this parameter is used
2205         #         for result publication in the study. Otherwise, if automatic
2206         #         publication is switched on, default value is used for result name.
2207         #
2208         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2209         #
2210         #  @ref tui_creation_curve "Example"
2211         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2212             """
2213             Create bezier curve on the set of points.
2214
2215             Parameters:
2216                 thePoints Sequence of points for the bezier curve.
2217                 theIsClosed If True, build a closed curve.
2218                 theName Object name; when specified, this parameter is used
2219                         for result publication in the study. Otherwise, if automatic
2220                         publication is switched on, default value is used for result name.
2221
2222             Returns:
2223                 New GEOM.GEOM_Object, containing the created bezier curve.
2224             """
2225             # Example: see GEOM_TestAll.py
2226             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2227             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2228             self._autoPublish(anObj, theName, "bezier")
2229             return anObj
2230
2231         ## Create B-Spline curve on the set of points.
2232         #  @param thePoints Sequence of points for the B-Spline curve.
2233         #  @param theIsClosed If True, build a closed curve.
2234         #  @param theDoReordering If TRUE, the algo does not follow the order of
2235         #                         \a thePoints but searches for the closest vertex.
2236         #  @param theName Object name; when specified, this parameter is used
2237         #         for result publication in the study. Otherwise, if automatic
2238         #         publication is switched on, default value is used for result name.
2239         #
2240         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2241         #
2242         #  @ref tui_creation_curve "Example"
2243         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2244             """
2245             Create B-Spline curve on the set of points.
2246
2247             Parameters:
2248                 thePoints Sequence of points for the B-Spline curve.
2249                 theIsClosed If True, build a closed curve.
2250                 theDoReordering If True, the algo does not follow the order of
2251                                 thePoints but searches for the closest vertex.
2252                 theName Object name; when specified, this parameter is used
2253                         for result publication in the study. Otherwise, if automatic
2254                         publication is switched on, default value is used for result name.
2255
2256             Returns:                     
2257                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2258             """
2259             # Example: see GEOM_TestAll.py
2260             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2261             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2262             self._autoPublish(anObj, theName, "bspline")
2263             return anObj
2264
2265         ## Create B-Spline curve on the set of points.
2266         #  @param thePoints Sequence of points for the B-Spline curve.
2267         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2268         #  @param theLastVec Vector object, defining the curve direction at its last point.
2269         #  @param theName Object name; when specified, this parameter is used
2270         #         for result publication in the study. Otherwise, if automatic
2271         #         publication is switched on, default value is used for result name.
2272         #
2273         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2274         #
2275         #  @ref tui_creation_curve "Example"
2276         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2277             """
2278             Create B-Spline curve on the set of points.
2279
2280             Parameters:
2281                 thePoints Sequence of points for the B-Spline curve.
2282                 theFirstVec Vector object, defining the curve direction at its first point.
2283                 theLastVec Vector object, defining the curve direction at its last point.
2284                 theName Object name; when specified, this parameter is used
2285                         for result publication in the study. Otherwise, if automatic
2286                         publication is switched on, default value is used for result name.
2287
2288             Returns:                     
2289                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2290             """
2291             # Example: see GEOM_TestAll.py
2292             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2293             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2294             self._autoPublish(anObj, theName, "bspline")
2295             return anObj
2296
2297         ## Creates a curve using the parametric definition of the basic points.
2298         #  @param thexExpr parametric equation of the coordinates X.
2299         #  @param theyExpr parametric equation of the coordinates Y.
2300         #  @param thezExpr parametric equation of the coordinates Z.
2301         #  @param theParamMin the minimal value of the parameter.
2302         #  @param theParamMax the maximum value of the parameter.
2303         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2304         #  @param theCurveType the type of the curve,
2305         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2306         #  @param theNewMethod flag for switching to the new method if the flag is set to false a deprecated method is used which can lead to a bug.
2307         #  @param theName Object name; when specified, this parameter is used
2308         #         for result publication in the study. Otherwise, if automatic
2309         #         publication is switched on, default value is used for result name.
2310         #
2311         #  @return New GEOM.GEOM_Object, containing the created curve.
2312         #
2313         #  @ref tui_creation_curve "Example"
2314         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2315                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2316             """
2317             Creates a curve using the parametric definition of the basic points.
2318
2319             Parameters:
2320                 thexExpr parametric equation of the coordinates X.
2321                 theyExpr parametric equation of the coordinates Y.
2322                 thezExpr parametric equation of the coordinates Z.
2323                 theParamMin the minimal value of the parameter.
2324                 theParamMax the maximum value of the parameter.
2325                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2326                 theCurveType the type of the curve,
2327                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2328                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2329                              method is used which can lead to a bug.
2330                 theName Object name; when specified, this parameter is used
2331                         for result publication in the study. Otherwise, if automatic
2332                         publication is switched on, default value is used for result name.
2333
2334             Returns:
2335                 New GEOM.GEOM_Object, containing the created curve.
2336             """
2337             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2338             if theNewMethod:
2339               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2340             else:
2341               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
2342             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2343             anObj.SetParameters(Parameters)
2344             self._autoPublish(anObj, theName, "curve")
2345             return anObj
2346
2347         ## Create an isoline curve on a face.
2348         #  @param theFace the face for which an isoline is created.
2349         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2350         #         creation.
2351         #  @param theParameter the U parameter for U-isoline or V parameter
2352         #         for V-isoline.
2353         #  @param theName Object name; when specified, this parameter is used
2354         #         for result publication in the study. Otherwise, if automatic
2355         #         publication is switched on, default value is used for result name.
2356         #
2357         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2358         #          a compound of edges.
2359         #
2360         #  @ref tui_creation_curve "Example"
2361         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2362             """
2363             Create an isoline curve on a face.
2364
2365             Parameters:
2366                 theFace the face for which an isoline is created.
2367                 IsUIsoline True for U-isoline creation; False for V-isoline
2368                            creation.
2369                 theParameter the U parameter for U-isoline or V parameter
2370                              for V-isoline.
2371                 theName Object name; when specified, this parameter is used
2372                         for result publication in the study. Otherwise, if automatic
2373                         publication is switched on, default value is used for result name.
2374
2375             Returns:
2376                 New GEOM.GEOM_Object, containing the created isoline edge or a
2377                 compound of edges.
2378             """
2379             # Example: see GEOM_TestAll.py
2380             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2381             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2382             if IsUIsoline:
2383                 self._autoPublish(anObj, theName, "U-Isoline")
2384             else:
2385                 self._autoPublish(anObj, theName, "V-Isoline")
2386             return anObj
2387
2388         # end of l4_curves
2389         ## @}
2390
2391         ## @addtogroup l3_sketcher
2392         ## @{
2393
2394         ## Create a sketcher (wire or face), following the textual description,
2395         #  passed through <VAR>theCommand</VAR> argument. \n
2396         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2397         #  Format of the description string have to be the following:
2398         #
2399         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2400         #
2401         #  Where:
2402         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2403         #  - CMD is one of
2404         #     - "R angle" : Set the direction by angle
2405         #     - "D dx dy" : Set the direction by DX & DY
2406         #     .
2407         #       \n
2408         #     - "TT x y" : Create segment by point at X & Y
2409         #     - "T dx dy" : Create segment by point with DX & DY
2410         #     - "L length" : Create segment by direction & Length
2411         #     - "IX x" : Create segment by direction & Intersect. X
2412         #     - "IY y" : Create segment by direction & Intersect. Y
2413         #     .
2414         #       \n
2415         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2416         #     - "AA x y": Create arc by point at X & Y
2417         #     - "A dx dy" : Create arc by point with DX & DY
2418         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2419         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2420         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2421         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2422         #     .
2423         #       \n
2424         #     - "WW" : Close Wire (to finish)
2425         #     - "WF" : Close Wire and build face (to finish)
2426         #     .
2427         #        \n
2428         #  - Flag1 (= reverse) is 0 or 2 ...
2429         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2430         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2431         #     .
2432         #        \n
2433         #  - Flag2 (= control tolerance) is 0 or 1 ...
2434         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2435         #     - if 1 the wire is built only if the end point is on the arc
2436         #       with a tolerance of 10^-7 on the distance else the creation fails
2437         #
2438         #  @param theCommand String, defining the sketcher in local
2439         #                    coordinates of the working plane.
2440         #  @param theWorkingPlane Nine double values, defining origin,
2441         #                         OZ and OX directions of the working plane.
2442         #  @param theName Object name; when specified, this parameter is used
2443         #         for result publication in the study. Otherwise, if automatic
2444         #         publication is switched on, default value is used for result name.
2445         #
2446         #  @return New GEOM.GEOM_Object, containing the created wire.
2447         #
2448         #  @ref tui_sketcher_page "Example"
2449         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2450             """
2451             Create a sketcher (wire or face), following the textual description, passed
2452             through theCommand argument.
2453             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2454             Format of the description string have to be the following:
2455                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2456             Where:
2457             - x1, y1 are coordinates of the first sketcher point (zero by default),
2458             - CMD is one of
2459                - "R angle" : Set the direction by angle
2460                - "D dx dy" : Set the direction by DX & DY
2461                
2462                - "TT x y" : Create segment by point at X & Y
2463                - "T dx dy" : Create segment by point with DX & DY
2464                - "L length" : Create segment by direction & Length
2465                - "IX x" : Create segment by direction & Intersect. X
2466                - "IY y" : Create segment by direction & Intersect. Y
2467
2468                - "C radius length" : Create arc by direction, radius and length(in degree)
2469                - "AA x y": Create arc by point at X & Y
2470                - "A dx dy" : Create arc by point with DX & DY
2471                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2472                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2473                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2474                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2475
2476                - "WW" : Close Wire (to finish)
2477                - "WF" : Close Wire and build face (to finish)
2478             
2479             - Flag1 (= reverse) is 0 or 2 ...
2480                - if 0 the drawn arc is the one of lower angle (< Pi)
2481                - if 2 the drawn arc ius the one of greater angle (> Pi)
2482         
2483             - Flag2 (= control tolerance) is 0 or 1 ...
2484                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2485                - if 1 the wire is built only if the end point is on the arc
2486                  with a tolerance of 10^-7 on the distance else the creation fails
2487
2488             Parameters:
2489                 theCommand String, defining the sketcher in local
2490                            coordinates of the working plane.
2491                 theWorkingPlane Nine double values, defining origin,
2492                                 OZ and OX directions of the working plane.
2493                 theName Object name; when specified, this parameter is used
2494                         for result publication in the study. Otherwise, if automatic
2495                         publication is switched on, default value is used for result name.
2496
2497             Returns:
2498                 New GEOM.GEOM_Object, containing the created wire.
2499             """
2500             # Example: see GEOM_TestAll.py
2501             theCommand,Parameters = ParseSketcherCommand(theCommand)
2502             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2503             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2504             anObj.SetParameters(Parameters)
2505             self._autoPublish(anObj, theName, "wire")
2506             return anObj
2507
2508         ## Create a sketcher (wire or face), following the textual description,
2509         #  passed through <VAR>theCommand</VAR> argument. \n
2510         #  For format of the description string see MakeSketcher() method.\n
2511         #  @param theCommand String, defining the sketcher in local
2512         #                    coordinates of the working plane.
2513         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2514         #  @param theName Object name; when specified, this parameter is used
2515         #         for result publication in the study. Otherwise, if automatic
2516         #         publication is switched on, default value is used for result name.
2517         #
2518         #  @return New GEOM.GEOM_Object, containing the created wire.
2519         #
2520         #  @ref tui_sketcher_page "Example"
2521         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2522             """
2523             Create a sketcher (wire or face), following the textual description,
2524             passed through theCommand argument.
2525             For format of the description string see geompy.MakeSketcher() method.
2526
2527             Parameters:
2528                 theCommand String, defining the sketcher in local
2529                            coordinates of the working plane.
2530                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2531                 theName Object name; when specified, this parameter is used
2532                         for result publication in the study. Otherwise, if automatic
2533                         publication is switched on, default value is used for result name.
2534
2535             Returns:
2536                 New GEOM.GEOM_Object, containing the created wire.
2537             """
2538             theCommand,Parameters = ParseSketcherCommand(theCommand)
2539             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2540             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2541             anObj.SetParameters(Parameters)
2542             self._autoPublish(anObj, theName, "wire")
2543             return anObj
2544
2545         ## Obtain a 2D sketcher interface
2546         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface      
2547         def Sketcher2D (self):
2548             """
2549             Obtain a 2D sketcher interface.
2550
2551             Example of usage:
2552                sk = geompy.Sketcher2D()
2553                sk.addPoint(20, 20)
2554                sk.addSegmentRelative(15, 70)
2555                sk.addSegmentPerpY(50)
2556                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2557                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2558                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2559                sk.close()
2560                Sketch_1 = sk.wire(geomObj_1)
2561             """
2562             sk = Sketcher2D (self)
2563             return sk
2564         
2565         ## Create a sketcher wire, following the numerical description,
2566         #  passed through <VAR>theCoordinates</VAR> argument. \n
2567         #  @param theCoordinates double values, defining points to create a wire,
2568         #                                                      passing from it.
2569         #  @param theName Object name; when specified, this parameter is used
2570         #         for result publication in the study. Otherwise, if automatic
2571         #         publication is switched on, default value is used for result name.
2572         #
2573         #  @return New GEOM.GEOM_Object, containing the created wire.
2574         #
2575         #  @ref tui_3dsketcher_page "Example"
2576         def Make3DSketcher(self, theCoordinates, theName=None):
2577             """
2578             Create a sketcher wire, following the numerical description,
2579             passed through theCoordinates argument.
2580
2581             Parameters:
2582                 theCoordinates double values, defining points to create a wire,
2583                                passing from it.
2584                 theName Object name; when specified, this parameter is used
2585                         for result publication in the study. Otherwise, if automatic
2586                         publication is switched on, default value is used for result name.
2587
2588             Returns:
2589                 New GEOM_Object, containing the created wire.
2590             """
2591             theCoordinates,Parameters = ParseParameters(theCoordinates)
2592             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2593             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2594             anObj.SetParameters(Parameters)
2595             self._autoPublish(anObj, theName, "wire")
2596             return anObj
2597
2598         ## Obtain a 3D sketcher interface
2599         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2600         #
2601         #  @ref tui_3dsketcher_page "Example"
2602         def Sketcher3D (self):
2603             """
2604             Obtain a 3D sketcher interface.
2605
2606             Example of usage:
2607                 sk = geompy.Sketcher3D()
2608                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2609                 sk.addPointsRelative(0, 0, 130)
2610                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2611                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2612                 sk.close()
2613                 a3D_Sketcher_1 = sk.wire()
2614             """
2615             sk = Sketcher3D (self)
2616             return sk
2617
2618         # end of l3_sketcher
2619         ## @}
2620
2621         ## @addtogroup l3_3d_primitives
2622         ## @{
2623
2624         ## Create a box by coordinates of two opposite vertices.
2625         #
2626         #  @param x1,y1,z1 double values, defining first point it.
2627         #  @param x2,y2,z2 double values, defining first point it.
2628         #  @param theName Object name; when specified, this parameter is used
2629         #         for result publication in the study. Otherwise, if automatic
2630         #         publication is switched on, default value is used for result name.
2631         #
2632         #  @return New GEOM.GEOM_Object, containing the created box.
2633         #
2634         #  @ref tui_creation_box "Example"
2635         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2636             """
2637             Create a box by coordinates of two opposite vertices.
2638             
2639             Parameters:
2640                 x1,y1,z1 double values, defining first point.
2641                 x2,y2,z2 double values, defining second point.
2642                 theName Object name; when specified, this parameter is used
2643                         for result publication in the study. Otherwise, if automatic
2644                         publication is switched on, default value is used for result name.
2645                 
2646             Returns:
2647                 New GEOM.GEOM_Object, containing the created box.
2648             """
2649             # Example: see GEOM_TestAll.py
2650             pnt1 = self.MakeVertex(x1,y1,z1)
2651             pnt2 = self.MakeVertex(x2,y2,z2)
2652             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2653             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2654
2655         ## Create a box with specified dimensions along the coordinate axes
2656         #  and with edges, parallel to the coordinate axes.
2657         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2658         #  @param theDX Length of Box edges, parallel to OX axis.
2659         #  @param theDY Length of Box edges, parallel to OY axis.
2660         #  @param theDZ Length of Box edges, parallel to OZ axis.
2661         #  @param theName Object name; when specified, this parameter is used
2662         #         for result publication in the study. Otherwise, if automatic
2663         #         publication is switched on, default value is used for result name.
2664         #
2665         #  @return New GEOM.GEOM_Object, containing the created box.
2666         #
2667         #  @ref tui_creation_box "Example"
2668         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2669             """
2670             Create a box with specified dimensions along the coordinate axes
2671             and with edges, parallel to the coordinate axes.
2672             Center of the box will be at point (DX/2, DY/2, DZ/2).
2673
2674             Parameters:
2675                 theDX Length of Box edges, parallel to OX axis.
2676                 theDY Length of Box edges, parallel to OY axis.
2677                 theDZ Length of Box edges, parallel to OZ axis.
2678                 theName Object name; when specified, this parameter is used
2679                         for result publication in the study. Otherwise, if automatic
2680                         publication is switched on, default value is used for result name.
2681
2682             Returns:   
2683                 New GEOM.GEOM_Object, containing the created box.
2684             """
2685             # Example: see GEOM_TestAll.py
2686             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2687             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2688             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2689             anObj.SetParameters(Parameters)
2690             self._autoPublish(anObj, theName, "box")
2691             return anObj
2692
2693         ## Create a box with two specified opposite vertices,
2694         #  and with edges, parallel to the coordinate axes
2695         #  @param thePnt1 First of two opposite vertices.
2696         #  @param thePnt2 Second of two opposite vertices.
2697         #  @param theName Object name; when specified, this parameter is used
2698         #         for result publication in the study. Otherwise, if automatic
2699         #         publication is switched on, default value is used for result name.
2700         #
2701         #  @return New GEOM.GEOM_Object, containing the created box.
2702         #
2703         #  @ref tui_creation_box "Example"
2704         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2705             """
2706             Create a box with two specified opposite vertices,
2707             and with edges, parallel to the coordinate axes
2708
2709             Parameters:
2710                 thePnt1 First of two opposite vertices.
2711                 thePnt2 Second of two opposite vertices.
2712                 theName Object name; when specified, this parameter is used
2713                         for result publication in the study. Otherwise, if automatic
2714                         publication is switched on, default value is used for result name.
2715
2716             Returns:
2717                 New GEOM.GEOM_Object, containing the created box.
2718             """
2719             # Example: see GEOM_TestAll.py
2720             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2721             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2722             self._autoPublish(anObj, theName, "box")
2723             return anObj
2724
2725         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2726         #  @param theH height of Face.
2727         #  @param theW width of Face.
2728         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2729         #  @param theName Object name; when specified, this parameter is used
2730         #         for result publication in the study. Otherwise, if automatic
2731         #         publication is switched on, default value is used for result name.
2732         #
2733         #  @return New GEOM.GEOM_Object, containing the created face.
2734         #
2735         #  @ref tui_creation_face "Example"
2736         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2737             """
2738             Create a face with specified dimensions with edges parallel to coordinate axes.
2739
2740             Parameters:
2741                 theH height of Face.
2742                 theW width of Face.
2743                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2744                 theName Object name; when specified, this parameter is used
2745                         for result publication in the study. Otherwise, if automatic
2746                         publication is switched on, default value is used for result name.
2747
2748             Returns:
2749                 New GEOM.GEOM_Object, containing the created face.
2750             """
2751             # Example: see GEOM_TestAll.py
2752             theH,theW,Parameters = ParseParameters(theH, theW)
2753             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2754             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2755             anObj.SetParameters(Parameters)
2756             self._autoPublish(anObj, theName, "rectangle")
2757             return anObj
2758
2759         ## Create a face from another plane and two sizes,
2760         #  vertical size and horisontal size.
2761         #  @param theObj   Normale vector to the creating face or
2762         #  the face object.
2763         #  @param theH     Height (vertical size).
2764         #  @param theW     Width (horisontal size).
2765         #  @param theName Object name; when specified, this parameter is used
2766         #         for result publication in the study. Otherwise, if automatic
2767         #         publication is switched on, default value is used for result name.
2768         #
2769         #  @return New GEOM.GEOM_Object, containing the created face.
2770         #
2771         #  @ref tui_creation_face "Example"
2772         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2773             """
2774             Create a face from another plane and two sizes,
2775             vertical size and horisontal size.
2776
2777             Parameters:
2778                 theObj   Normale vector to the creating face or
2779                          the face object.
2780                 theH     Height (vertical size).
2781                 theW     Width (horisontal size).
2782                 theName Object name; when specified, this parameter is used
2783                         for result publication in the study. Otherwise, if automatic
2784                         publication is switched on, default value is used for result name.
2785
2786             Returns:
2787                 New GEOM_Object, containing the created face.
2788             """
2789             # Example: see GEOM_TestAll.py
2790             theH,theW,Parameters = ParseParameters(theH, theW)
2791             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2792             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2793             anObj.SetParameters(Parameters)
2794             self._autoPublish(anObj, theName, "rectangle")
2795             return anObj
2796
2797         ## Create a disk with given center, normal vector and radius.
2798         #  @param thePnt Disk center.
2799         #  @param theVec Vector, normal to the plane of the disk.
2800         #  @param theR Disk radius.
2801         #  @param theName Object name; when specified, this parameter is used
2802         #         for result publication in the study. Otherwise, if automatic
2803         #         publication is switched on, default value is used for result name.
2804         #
2805         #  @return New GEOM.GEOM_Object, containing the created disk.
2806         #
2807         #  @ref tui_creation_disk "Example"
2808         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2809             """
2810             Create a disk with given center, normal vector and radius.
2811
2812             Parameters:
2813                 thePnt Disk center.
2814                 theVec Vector, normal to the plane of the disk.
2815                 theR Disk radius.
2816                 theName Object name; when specified, this parameter is used
2817                         for result publication in the study. Otherwise, if automatic
2818                         publication is switched on, default value is used for result name.
2819
2820             Returns:    
2821                 New GEOM.GEOM_Object, containing the created disk.
2822             """
2823             # Example: see GEOM_TestAll.py
2824             theR,Parameters = ParseParameters(theR)
2825             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2826             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2827             anObj.SetParameters(Parameters)
2828             self._autoPublish(anObj, theName, "disk")
2829             return anObj
2830
2831         ## Create a disk, passing through three given points
2832         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2833         #  @param theName Object name; when specified, this parameter is used
2834         #         for result publication in the study. Otherwise, if automatic
2835         #         publication is switched on, default value is used for result name.
2836         #
2837         #  @return New GEOM.GEOM_Object, containing the created disk.
2838         #
2839         #  @ref tui_creation_disk "Example"
2840         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2841             """
2842             Create a disk, passing through three given points
2843
2844             Parameters:
2845                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2846                 theName Object name; when specified, this parameter is used
2847                         for result publication in the study. Otherwise, if automatic
2848                         publication is switched on, default value is used for result name.
2849
2850             Returns:    
2851                 New GEOM.GEOM_Object, containing the created disk.
2852             """
2853             # Example: see GEOM_TestAll.py
2854             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2855             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2856             self._autoPublish(anObj, theName, "disk")
2857             return anObj
2858
2859         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2860         #  @param theR Radius of Face.
2861         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2862         #  @param theName Object name; when specified, this parameter is used
2863         #         for result publication in the study. Otherwise, if automatic
2864         #         publication is switched on, default value is used for result name.
2865         #
2866         #  @return New GEOM.GEOM_Object, containing the created disk.
2867         #
2868         #  @ref tui_creation_face "Example"
2869         def MakeDiskR(self, theR, theOrientation, theName=None):
2870             """
2871             Create a disk with specified dimensions along OX-OY coordinate axes.
2872
2873             Parameters:
2874                 theR Radius of Face.
2875                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2876                 theName Object name; when specified, this parameter is used
2877                         for result publication in the study. Otherwise, if automatic
2878                         publication is switched on, default value is used for result name.
2879
2880             Returns: 
2881                 New GEOM.GEOM_Object, containing the created disk.
2882
2883             Example of usage:
2884                 Disk3 = geompy.MakeDiskR(100., 1)
2885             """
2886             # Example: see GEOM_TestAll.py
2887             theR,Parameters = ParseParameters(theR)
2888             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2889             RaiseIfFailed("MakeDiskR", self.PrimOp)
2890             anObj.SetParameters(Parameters)
2891             self._autoPublish(anObj, theName, "disk")
2892             return anObj
2893
2894         ## Create a cylinder with given base point, axis, radius and height.
2895         #  @param thePnt Central point of cylinder base.
2896         #  @param theAxis Cylinder axis.
2897         #  @param theR Cylinder radius.
2898         #  @param theH Cylinder height.
2899         #  @param theName Object name; when specified, this parameter is used
2900         #         for result publication in the study. Otherwise, if automatic
2901         #         publication is switched on, default value is used for result name.
2902         #
2903         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2904         #
2905         #  @ref tui_creation_cylinder "Example"
2906         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2907             """
2908             Create a cylinder with given base point, axis, radius and height.
2909
2910             Parameters:
2911                 thePnt Central point of cylinder base.
2912                 theAxis Cylinder axis.
2913                 theR Cylinder radius.
2914                 theH Cylinder height.
2915                 theName Object name; when specified, this parameter is used
2916                         for result publication in the study. Otherwise, if automatic
2917                         publication is switched on, default value is used for result name.
2918
2919             Returns: 
2920                 New GEOM.GEOM_Object, containing the created cylinder.
2921             """
2922             # Example: see GEOM_TestAll.py
2923             theR,theH,Parameters = ParseParameters(theR, theH)
2924             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
2925             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
2926             anObj.SetParameters(Parameters)
2927             self._autoPublish(anObj, theName, "cylinder")
2928             return anObj
2929
2930         ## Create a cylinder with given radius and height at
2931         #  the origin of coordinate system. Axis of the cylinder
2932         #  will be collinear to the OZ axis of the coordinate system.
2933         #  @param theR Cylinder radius.
2934         #  @param theH Cylinder height.
2935         #  @param theName Object name; when specified, this parameter is used
2936         #         for result publication in the study. Otherwise, if automatic
2937         #         publication is switched on, default value is used for result name.
2938         #
2939         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2940         #
2941         #  @ref tui_creation_cylinder "Example"
2942         def MakeCylinderRH(self, theR, theH, theName=None):
2943             """
2944             Create a cylinder with given radius and height at
2945             the origin of coordinate system. Axis of the cylinder
2946             will be collinear to the OZ axis of the coordinate system.
2947
2948             Parameters:
2949                 theR Cylinder radius.
2950                 theH Cylinder height.
2951                 theName Object name; when specified, this parameter is used
2952                         for result publication in the study. Otherwise, if automatic
2953                         publication is switched on, default value is used for result name.
2954
2955             Returns:    
2956                 New GEOM.GEOM_Object, containing the created cylinder.
2957             """
2958             # Example: see GEOM_TestAll.py
2959             theR,theH,Parameters = ParseParameters(theR, theH)
2960             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
2961             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
2962             anObj.SetParameters(Parameters)
2963             self._autoPublish(anObj, theName, "cylinder")
2964             return anObj
2965
2966         ## Create a sphere with given center and radius.
2967         #  @param thePnt Sphere center.
2968         #  @param theR Sphere radius.
2969         #  @param theName Object name; when specified, this parameter is used
2970         #         for result publication in the study. Otherwise, if automatic
2971         #         publication is switched on, default value is used for result name.
2972         #
2973         #  @return New GEOM.GEOM_Object, containing the created sphere.
2974         #
2975         #  @ref tui_creation_sphere "Example"
2976         def MakeSpherePntR(self, thePnt, theR, theName=None):
2977             """
2978             Create a sphere with given center and radius.
2979
2980             Parameters:
2981                 thePnt Sphere center.
2982                 theR Sphere radius.
2983                 theName Object name; when specified, this parameter is used
2984                         for result publication in the study. Otherwise, if automatic
2985                         publication is switched on, default value is used for result name.
2986
2987             Returns:    
2988                 New GEOM.GEOM_Object, containing the created sphere.            
2989             """
2990             # Example: see GEOM_TestAll.py
2991             theR,Parameters = ParseParameters(theR)
2992             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
2993             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
2994             anObj.SetParameters(Parameters)
2995             self._autoPublish(anObj, theName, "sphere")
2996             return anObj
2997
2998         ## Create a sphere with given center and radius.
2999         #  @param x,y,z Coordinates of sphere center.
3000         #  @param theR Sphere radius.
3001         #  @param theName Object name; when specified, this parameter is used
3002         #         for result publication in the study. Otherwise, if automatic
3003         #         publication is switched on, default value is used for result name.
3004         #
3005         #  @return New GEOM.GEOM_Object, containing the created sphere.
3006         #
3007         #  @ref tui_creation_sphere "Example"
3008         def MakeSphere(self, x, y, z, theR, theName=None):
3009             """
3010             Create a sphere with given center and radius.
3011
3012             Parameters: 
3013                 x,y,z Coordinates of sphere center.
3014                 theR Sphere radius.
3015                 theName Object name; when specified, this parameter is used
3016                         for result publication in the study. Otherwise, if automatic
3017                         publication is switched on, default value is used for result name.
3018
3019             Returns:
3020                 New GEOM.GEOM_Object, containing the created sphere.
3021             """
3022             # Example: see GEOM_TestAll.py
3023             point = self.MakeVertex(x, y, z)
3024             # note: auto-publishing is done in self.MakeSpherePntR()
3025             anObj = self.MakeSpherePntR(point, theR, theName)
3026             return anObj
3027
3028         ## Create a sphere with given radius at the origin of coordinate system.
3029         #  @param theR Sphere radius.
3030         #  @param theName Object name; when specified, this parameter is used
3031         #         for result publication in the study. Otherwise, if automatic
3032         #         publication is switched on, default value is used for result name.
3033         #
3034         #  @return New GEOM.GEOM_Object, containing the created sphere.
3035         #
3036         #  @ref tui_creation_sphere "Example"
3037         def MakeSphereR(self, theR, theName=None):
3038             """
3039             Create a sphere with given radius at the origin of coordinate system.
3040
3041             Parameters: 
3042                 theR Sphere radius.
3043                 theName Object name; when specified, this parameter is used
3044                         for result publication in the study. Otherwise, if automatic
3045                         publication is switched on, default value is used for result name.
3046
3047             Returns:
3048                 New GEOM.GEOM_Object, containing the created sphere.            
3049             """
3050             # Example: see GEOM_TestAll.py
3051             theR,Parameters = ParseParameters(theR)
3052             anObj = self.PrimOp.MakeSphereR(theR)
3053             RaiseIfFailed("MakeSphereR", self.PrimOp)
3054             anObj.SetParameters(Parameters)
3055             self._autoPublish(anObj, theName, "sphere")
3056             return anObj
3057
3058         ## Create a cone with given base point, axis, height and radiuses.
3059         #  @param thePnt Central point of the first cone base.
3060         #  @param theAxis Cone axis.
3061         #  @param theR1 Radius of the first cone base.
3062         #  @param theR2 Radius of the second cone base.
3063         #    \note If both radiuses are non-zero, the cone will be truncated.
3064         #    \note If the radiuses are equal, a cylinder will be created instead.
3065         #  @param theH Cone height.
3066         #  @param theName Object name; when specified, this parameter is used
3067         #         for result publication in the study. Otherwise, if automatic
3068         #         publication is switched on, default value is used for result name.
3069         #
3070         #  @return New GEOM.GEOM_Object, containing the created cone.
3071         #
3072         #  @ref tui_creation_cone "Example"
3073         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3074             """
3075             Create a cone with given base point, axis, height and radiuses.
3076
3077             Parameters: 
3078                 thePnt Central point of the first cone base.
3079                 theAxis Cone axis.
3080                 theR1 Radius of the first cone base.
3081                 theR2 Radius of the second cone base.
3082                 theH Cone height.
3083                 theName Object name; when specified, this parameter is used
3084                         for result publication in the study. Otherwise, if automatic
3085                         publication is switched on, default value is used for result name.
3086
3087             Note:
3088                 If both radiuses are non-zero, the cone will be truncated.
3089                 If the radiuses are equal, a cylinder will be created instead.
3090
3091             Returns:
3092                 New GEOM.GEOM_Object, containing the created cone.
3093             """
3094             # Example: see GEOM_TestAll.py
3095             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3096             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3097             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3098             anObj.SetParameters(Parameters)
3099             self._autoPublish(anObj, theName, "cone")
3100             return anObj
3101
3102         ## Create a cone with given height and radiuses at
3103         #  the origin of coordinate system. Axis of the cone will
3104         #  be collinear to the OZ axis of the coordinate system.
3105         #  @param theR1 Radius of the first cone base.
3106         #  @param theR2 Radius of the second cone base.
3107         #    \note If both radiuses are non-zero, the cone will be truncated.
3108         #    \note If the radiuses are equal, a cylinder will be created instead.
3109         #  @param theH Cone height.
3110         #  @param theName Object name; when specified, this parameter is used
3111         #         for result publication in the study. Otherwise, if automatic
3112         #         publication is switched on, default value is used for result name.
3113         #
3114         #  @return New GEOM.GEOM_Object, containing the created cone.
3115         #
3116         #  @ref tui_creation_cone "Example"
3117         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3118             """
3119             Create a cone with given height and radiuses at
3120             the origin of coordinate system. Axis of the cone will
3121             be collinear to the OZ axis of the coordinate system.
3122
3123             Parameters: 
3124                 theR1 Radius of the first cone base.
3125                 theR2 Radius of the second cone base.
3126                 theH Cone height.
3127                 theName Object name; when specified, this parameter is used
3128                         for result publication in the study. Otherwise, if automatic
3129                         publication is switched on, default value is used for result name.
3130
3131             Note:
3132                 If both radiuses are non-zero, the cone will be truncated.
3133                 If the radiuses are equal, a cylinder will be created instead.
3134
3135             Returns:
3136                 New GEOM.GEOM_Object, containing the created cone.
3137             """
3138             # Example: see GEOM_TestAll.py
3139             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3140             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3141             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3142             anObj.SetParameters(Parameters)
3143             self._autoPublish(anObj, theName, "cone")
3144             return anObj
3145
3146         ## Create a torus with given center, normal vector and radiuses.
3147         #  @param thePnt Torus central point.
3148         #  @param theVec Torus axis of symmetry.
3149         #  @param theRMajor Torus major radius.
3150         #  @param theRMinor Torus minor radius.
3151         #  @param theName Object name; when specified, this parameter is used
3152         #         for result publication in the study. Otherwise, if automatic
3153         #         publication is switched on, default value is used for result name.
3154         #
3155         #  @return New GEOM.GEOM_Object, containing the created torus.
3156         #
3157         #  @ref tui_creation_torus "Example"
3158         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3159             """
3160             Create a torus with given center, normal vector and radiuses.
3161
3162             Parameters: 
3163                 thePnt Torus central point.
3164                 theVec Torus axis of symmetry.
3165                 theRMajor Torus major radius.
3166                 theRMinor Torus minor radius.
3167                 theName Object name; when specified, this parameter is used
3168                         for result publication in the study. Otherwise, if automatic
3169                         publication is switched on, default value is used for result name.
3170
3171            Returns:
3172                 New GEOM.GEOM_Object, containing the created torus.
3173             """
3174             # Example: see GEOM_TestAll.py
3175             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3176             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3177             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3178             anObj.SetParameters(Parameters)
3179             self._autoPublish(anObj, theName, "torus")
3180             return anObj
3181
3182         ## Create a torus with given radiuses at the origin of coordinate system.
3183         #  @param theRMajor Torus major radius.
3184         #  @param theRMinor Torus minor radius.
3185         #  @param theName Object name; when specified, this parameter is used
3186         #         for result publication in the study. Otherwise, if automatic
3187         #         publication is switched on, default value is used for result name.
3188         #
3189         #  @return New GEOM.GEOM_Object, containing the created torus.
3190         #
3191         #  @ref tui_creation_torus "Example"
3192         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3193             """
3194            Create a torus with given radiuses at the origin of coordinate system.
3195
3196            Parameters: 
3197                 theRMajor Torus major radius.
3198                 theRMinor Torus minor radius.
3199                 theName Object name; when specified, this parameter is used
3200                         for result publication in the study. Otherwise, if automatic
3201                         publication is switched on, default value is used for result name.
3202
3203            Returns:
3204                 New GEOM.GEOM_Object, containing the created torus.            
3205             """
3206             # Example: see GEOM_TestAll.py
3207             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3208             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3209             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3210             anObj.SetParameters(Parameters)
3211             self._autoPublish(anObj, theName, "torus")
3212             return anObj
3213
3214         # end of l3_3d_primitives
3215         ## @}
3216
3217         ## @addtogroup l3_complex
3218         ## @{
3219
3220         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3221         #  @param theBase Base shape to be extruded.
3222         #  @param thePoint1 First end of extrusion vector.
3223         #  @param thePoint2 Second end of extrusion vector.
3224         #  @param theScaleFactor Use it to make prism with scaled second base.
3225         #                        Nagative value means not scaled second base.
3226         #  @param theName Object name; when specified, this parameter is used
3227         #         for result publication in the study. Otherwise, if automatic
3228         #         publication is switched on, default value is used for result name.
3229         #
3230         #  @return New GEOM.GEOM_Object, containing the created prism.
3231         #
3232         #  @ref tui_creation_prism "Example"
3233         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3234             """
3235             Create a shape by extrusion of the base shape along a vector, defined by two points.
3236
3237             Parameters: 
3238                 theBase Base shape to be extruded.
3239                 thePoint1 First end of extrusion vector.
3240                 thePoint2 Second end of extrusion vector.
3241                 theScaleFactor Use it to make prism with scaled second base.
3242                                Nagative value means not scaled second base.
3243                 theName Object name; when specified, this parameter is used
3244                         for result publication in the study. Otherwise, if automatic
3245                         publication is switched on, default value is used for result name.
3246
3247             Returns:
3248                 New GEOM.GEOM_Object, containing the created prism.
3249             """
3250             # Example: see GEOM_TestAll.py
3251             anObj = None
3252             Parameters = ""
3253             if theScaleFactor > 0:
3254                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3255                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3256             else:
3257                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3258             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3259             anObj.SetParameters(Parameters)
3260             self._autoPublish(anObj, theName, "prism")
3261             return anObj
3262
3263         ## Create a shape by extrusion of the base shape along a
3264         #  vector, defined by two points, in 2 Ways (forward/backward).
3265         #  @param theBase Base shape to be extruded.
3266         #  @param thePoint1 First end of extrusion vector.
3267         #  @param thePoint2 Second end of extrusion vector.
3268         #  @param theName Object name; when specified, this parameter is used
3269         #         for result publication in the study. Otherwise, if automatic
3270         #         publication is switched on, default value is used for result name.
3271         #
3272         #  @return New GEOM.GEOM_Object, containing the created prism.
3273         #
3274         #  @ref tui_creation_prism "Example"
3275         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3276             """
3277             Create a shape by extrusion of the base shape along a
3278             vector, defined by two points, in 2 Ways (forward/backward).
3279
3280             Parameters: 
3281                 theBase Base shape to be extruded.
3282                 thePoint1 First end of extrusion vector.
3283                 thePoint2 Second end of extrusion vector.
3284                 theName Object name; when specified, this parameter is used
3285                         for result publication in the study. Otherwise, if automatic
3286                         publication is switched on, default value is used for result name.
3287
3288             Returns:
3289                 New GEOM.GEOM_Object, containing the created prism.
3290             """
3291             # Example: see GEOM_TestAll.py
3292             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3293             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3294             self._autoPublish(anObj, theName, "prism")
3295             return anObj
3296
3297         ## Create a shape by extrusion of the base shape along the vector,
3298         #  i.e. all the space, transfixed by the base shape during its translation
3299         #  along the vector on the given distance.
3300         #  @param theBase Base shape to be extruded.
3301         #  @param theVec Direction of extrusion.
3302         #  @param theH Prism dimension along theVec.
3303         #  @param theScaleFactor Use it to make prism with scaled second base.
3304         #                        Negative value means not scaled second base.
3305         #  @param theName Object name; when specified, this parameter is used
3306         #         for result publication in the study. Otherwise, if automatic
3307         #         publication is switched on, default value is used for result name.
3308         #
3309         #  @return New GEOM.GEOM_Object, containing the created prism.
3310         #
3311         #  @ref tui_creation_prism "Example"
3312         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3313             """
3314             Create a shape by extrusion of the base shape along the vector,
3315             i.e. all the space, transfixed by the base shape during its translation
3316             along the vector on the given distance.
3317
3318             Parameters: 
3319                 theBase Base shape to be extruded.
3320                 theVec Direction of extrusion.
3321                 theH Prism dimension along theVec.
3322                 theScaleFactor Use it to make prism with scaled second base.
3323                                Negative value means not scaled second base.
3324                 theName Object name; when specified, this parameter is used
3325                         for result publication in the study. Otherwise, if automatic
3326                         publication is switched on, default value is used for result name.
3327
3328             Returns:
3329                 New GEOM.GEOM_Object, containing the created prism.
3330             """
3331             # Example: see GEOM_TestAll.py
3332             anObj = None
3333             Parameters = ""
3334             if theScaleFactor > 0:
3335                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3336                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3337             else:
3338                 theH,Parameters = ParseParameters(theH)
3339                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3340             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3341             anObj.SetParameters(Parameters)
3342             self._autoPublish(anObj, theName, "prism")
3343             return anObj
3344
3345         ## Create a shape by extrusion of the base shape along the vector,
3346         #  i.e. all the space, transfixed by the base shape during its translation
3347         #  along the vector on the given distance in 2 Ways (forward/backward).
3348         #  @param theBase Base shape to be extruded.
3349         #  @param theVec Direction of extrusion.
3350         #  @param theH Prism dimension along theVec in forward direction.
3351         #  @param theName Object name; when specified, this parameter is used
3352         #         for result publication in the study. Otherwise, if automatic
3353         #         publication is switched on, default value is used for result name.
3354         #
3355         #  @return New GEOM.GEOM_Object, containing the created prism.
3356         #
3357         #  @ref tui_creation_prism "Example"
3358         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3359             """
3360             Create a shape by extrusion of the base shape along the vector,
3361             i.e. all the space, transfixed by the base shape during its translation
3362             along the vector on the given distance in 2 Ways (forward/backward).
3363
3364             Parameters:
3365                 theBase Base shape to be extruded.
3366                 theVec Direction of extrusion.
3367                 theH Prism dimension along theVec in forward direction.
3368                 theName Object name; when specified, this parameter is used
3369                         for result publication in the study. Otherwise, if automatic
3370                         publication is switched on, default value is used for result name.
3371
3372             Returns:
3373                 New GEOM.GEOM_Object, containing the created prism.
3374             """
3375             # Example: see GEOM_TestAll.py
3376             theH,Parameters = ParseParameters(theH)
3377             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3378             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3379             anObj.SetParameters(Parameters)
3380             self._autoPublish(anObj, theName, "prism")
3381             return anObj
3382
3383         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3384         #  @param theBase Base shape to be extruded.
3385         #  @param theDX, theDY, theDZ Directions of extrusion.
3386         #  @param theScaleFactor Use it to make prism with scaled second base.
3387         #                        Nagative value means not scaled second base.
3388         #  @param theName Object name; when specified, this parameter is used
3389         #         for result publication in the study. Otherwise, if automatic
3390         #         publication is switched on, default value is used for result name.
3391         #
3392         #  @return New GEOM.GEOM_Object, containing the created prism.
3393         #
3394         #  @ref tui_creation_prism "Example"
3395         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3396             """
3397             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3398
3399             Parameters:
3400                 theBase Base shape to be extruded.
3401                 theDX, theDY, theDZ Directions of extrusion.
3402                 theScaleFactor Use it to make prism with scaled second base.
3403                                Nagative value means not scaled second base.
3404                 theName Object name; when specified, this parameter is used
3405                         for result publication in the study. Otherwise, if automatic
3406                         publication is switched on, default value is used for result name.
3407
3408             Returns: 
3409                 New GEOM.GEOM_Object, containing the created prism.
3410             """
3411             # Example: see GEOM_TestAll.py
3412             anObj = None
3413             Parameters = ""
3414             if theScaleFactor > 0:
3415                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3416                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3417             else:
3418                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3419                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3420             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3421             anObj.SetParameters(Parameters)
3422             self._autoPublish(anObj, theName, "prism")
3423             return anObj
3424
3425         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3426         #  i.e. all the space, transfixed by the base shape during its translation
3427         #  along the vector on the given distance in 2 Ways (forward/backward).
3428         #  @param theBase Base shape to be extruded.
3429         #  @param theDX, theDY, theDZ Directions of extrusion.
3430         #  @param theName Object name; when specified, this parameter is used
3431         #         for result publication in the study. Otherwise, if automatic
3432         #         publication is switched on, default value is used for result name.
3433         #
3434         #  @return New GEOM.GEOM_Object, containing the created prism.
3435         #
3436         #  @ref tui_creation_prism "Example"
3437         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3438             """
3439             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3440             i.e. all the space, transfixed by the base shape during its translation
3441             along the vector on the given distance in 2 Ways (forward/backward).
3442
3443             Parameters:
3444                 theBase Base shape to be extruded.
3445                 theDX, theDY, theDZ Directions of extrusion.
3446                 theName Object name; when specified, this parameter is used
3447                         for result publication in the study. Otherwise, if automatic
3448                         publication is switched on, default value is used for result name.
3449
3450             Returns:
3451                 New GEOM.GEOM_Object, containing the created prism.
3452             """
3453             # Example: see GEOM_TestAll.py
3454             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3455             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3456             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3457             anObj.SetParameters(Parameters)
3458             self._autoPublish(anObj, theName, "prism")
3459             return anObj
3460
3461         ## Create a shape by revolution of the base shape around the axis
3462         #  on the given angle, i.e. all the space, transfixed by the base
3463         #  shape during its rotation around the axis on the given angle.
3464         #  @param theBase Base shape to be rotated.
3465         #  @param theAxis Rotation axis.
3466         #  @param theAngle Rotation angle in radians.
3467         #  @param theName Object name; when specified, this parameter is used
3468         #         for result publication in the study. Otherwise, if automatic
3469         #         publication is switched on, default value is used for result name.
3470         #
3471         #  @return New GEOM.GEOM_Object, containing the created revolution.
3472         #
3473         #  @ref tui_creation_revolution "Example"
3474         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3475             """
3476             Create a shape by revolution of the base shape around the axis
3477             on the given angle, i.e. all the space, transfixed by the base
3478             shape during its rotation around the axis on the given angle.
3479
3480             Parameters:
3481                 theBase Base shape to be rotated.
3482                 theAxis Rotation axis.
3483                 theAngle Rotation angle in radians.
3484                 theName Object name; when specified, this parameter is used
3485                         for result publication in the study. Otherwise, if automatic
3486                         publication is switched on, default value is used for result name.
3487
3488             Returns: 
3489                 New GEOM.GEOM_Object, containing the created revolution.
3490             """
3491             # Example: see GEOM_TestAll.py
3492             theAngle,Parameters = ParseParameters(theAngle)
3493             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3494             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3495             anObj.SetParameters(Parameters)
3496             self._autoPublish(anObj, theName, "revolution")
3497             return anObj
3498
3499         ## Create a shape by revolution of the base shape around the axis
3500         #  on the given angle, i.e. all the space, transfixed by the base
3501         #  shape during its rotation around the axis on the given angle in
3502         #  both directions (forward/backward)
3503         #  @param theBase Base shape to be rotated.
3504         #  @param theAxis Rotation axis.
3505         #  @param theAngle Rotation angle in radians.
3506         #  @param theName Object name; when specified, this parameter is used
3507         #         for result publication in the study. Otherwise, if automatic
3508         #         publication is switched on, default value is used for result name.
3509         #
3510         #  @return New GEOM.GEOM_Object, containing the created revolution.
3511         #
3512         #  @ref tui_creation_revolution "Example"
3513         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3514             """
3515             Create a shape by revolution of the base shape around the axis
3516             on the given angle, i.e. all the space, transfixed by the base
3517             shape during its rotation around the axis on the given angle in
3518             both directions (forward/backward).
3519
3520             Parameters:
3521                 theBase Base shape to be rotated.
3522                 theAxis Rotation axis.
3523                 theAngle Rotation angle in radians.
3524                 theName Object name; when specified, this parameter is used
3525                         for result publication in the study. Otherwise, if automatic
3526                         publication is switched on, default value is used for result name.
3527
3528             Returns: 
3529                 New GEOM.GEOM_Object, containing the created revolution.
3530             """
3531             theAngle,Parameters = ParseParameters(theAngle)
3532             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3533             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3534             anObj.SetParameters(Parameters)
3535             self._autoPublish(anObj, theName, "revolution")
3536             return anObj
3537
3538         ## Create a filling from the given compound of contours.
3539         #  @param theShape the compound of contours
3540         #  @param theMinDeg a minimal degree of BSpline surface to create
3541         #  @param theMaxDeg a maximal degree of BSpline surface to create
3542         #  @param theTol2D a 2d tolerance to be reached
3543         #  @param theTol3D a 3d tolerance to be reached
3544         #  @param theNbIter a number of iteration of approximation algorithm
3545         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3546         #  @param isApprox if True, BSpline curves are generated in the process
3547         #                  of surface construction. By default it is False, that means
3548         #                  the surface is created using given curves. The usage of
3549         #                  Approximation makes the algorithm work slower, but allows
3550         #                  building the surface for rather complex cases.
3551         #  @param theName Object name; when specified, this parameter is used
3552         #         for result publication in the study. Otherwise, if automatic
3553         #         publication is switched on, default value is used for result name.
3554         #
3555         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3556         #
3557         #  @ref tui_creation_filling "Example"
3558         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3559                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3560             """
3561             Create a filling from the given compound of contours.
3562
3563             Parameters:
3564                 theShape the compound of contours
3565                 theMinDeg a minimal degree of BSpline surface to create
3566                 theMaxDeg a maximal degree of BSpline surface to create
3567                 theTol2D a 2d tolerance to be reached
3568                 theTol3D a 3d tolerance to be reached
3569                 theNbIter a number of iteration of approximation algorithm
3570                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3571                 isApprox if True, BSpline curves are generated in the process
3572                          of surface construction. By default it is False, that means
3573                          the surface is created using given curves. The usage of
3574                          Approximation makes the algorithm work slower, but allows
3575                          building the surface for rather complex cases
3576                 theName Object name; when specified, this parameter is used
3577                         for result publication in the study. Otherwise, if automatic
3578                         publication is switched on, default value is used for result name.
3579
3580             Returns: 
3581                 New GEOM.GEOM_Object, containing the created filling surface.
3582
3583             Example of usage:
3584                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3585             """
3586             # Example: see GEOM_TestAll.py
3587             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3588             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3589                                             theTol2D, theTol3D, theNbIter,
3590                                             theMethod, isApprox)
3591             RaiseIfFailed("MakeFilling", self.PrimOp)
3592             anObj.SetParameters(Parameters)
3593             self._autoPublish(anObj, theName, "filling")
3594             return anObj
3595
3596
3597         ## Create a filling from the given compound of contours.
3598         #  This method corresponds to MakeFilling with isApprox=True
3599         #  @param theShape the compound of contours
3600         #  @param theMinDeg a minimal degree of BSpline surface to create
3601         #  @param theMaxDeg a maximal degree of BSpline surface to create
3602         #  @param theTol3D a 3d tolerance to be reached
3603         #  @param theName Object name; when specified, this parameter is used
3604         #         for result publication in the study. Otherwise, if automatic
3605         #         publication is switched on, default value is used for result name.
3606         #
3607         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3608         #
3609         #  @ref tui_creation_filling "Example"
3610         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3611             """
3612             Create a filling from the given compound of contours.
3613             This method corresponds to MakeFilling with isApprox=True
3614
3615             Parameters:
3616                 theShape the compound of contours
3617                 theMinDeg a minimal degree of BSpline surface to create
3618                 theMaxDeg a maximal degree of BSpline surface to create
3619                 theTol3D a 3d tolerance to be reached
3620                 theName Object name; when specified, this parameter is used
3621                         for result publication in the study. Otherwise, if automatic
3622                         publication is switched on, default value is used for result name.
3623
3624             Returns: 
3625                 New GEOM.GEOM_Object, containing the created filling surface.
3626
3627             Example of usage:
3628                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3629             """
3630             # Example: see GEOM_TestAll.py
3631             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3632             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3633                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3634             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3635             anObj.SetParameters(Parameters)
3636             self._autoPublish(anObj, theName, "filling")
3637             return anObj
3638
3639         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3640         #  @param theSeqSections - set of specified sections.
3641         #  @param theModeSolid - mode defining building solid or shell
3642         #  @param thePreci - precision 3D used for smoothing
3643         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3644         #  @param theName Object name; when specified, this parameter is used
3645         #         for result publication in the study. Otherwise, if automatic
3646         #         publication is switched on, default value is used for result name.
3647         #
3648         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3649         #
3650         #  @ref swig_todo "Example"
3651         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3652             """
3653             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3654
3655             Parameters:
3656                 theSeqSections - set of specified sections.
3657                 theModeSolid - mode defining building solid or shell
3658                 thePreci - precision 3D used for smoothing
3659                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3660                 theName Object name; when specified, this parameter is used
3661                         for result publication in the study. Otherwise, if automatic
3662                         publication is switched on, default value is used for result name.
3663
3664             Returns:
3665                 New GEOM.GEOM_Object, containing the created shell or solid.
3666             """
3667             # Example: see GEOM_TestAll.py
3668             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3669             RaiseIfFailed("MakeThruSections", self.PrimOp)
3670             self._autoPublish(anObj, theName, "filling")
3671             return anObj
3672
3673         ## Create a shape by extrusion of the base shape along
3674         #  the path shape. The path shape can be a wire or an edge.
3675         #  @param theBase Base shape to be extruded.
3676         #  @param thePath Path shape to extrude the base shape along it.
3677         #  @param theName Object name; when specified, this parameter is used
3678         #         for result publication in the study. Otherwise, if automatic
3679         #         publication is switched on, default value is used for result name.
3680         #
3681         #  @return New GEOM.GEOM_Object, containing the created pipe.
3682         #
3683         #  @ref tui_creation_pipe "Example"
3684         def MakePipe(self, theBase, thePath, theName=None):
3685             """
3686             Create a shape by extrusion of the base shape along
3687             the path shape. The path shape can be a wire or an edge.
3688
3689             Parameters:
3690                 theBase Base shape to be extruded.
3691                 thePath Path shape to extrude the base shape along it.
3692                 theName Object name; when specified, this parameter is used
3693                         for result publication in the study. Otherwise, if automatic
3694                         publication is switched on, default value is used for result name.
3695
3696             Returns:
3697                 New GEOM.GEOM_Object, containing the created pipe.
3698             """
3699             # Example: see GEOM_TestAll.py
3700             anObj = self.PrimOp.MakePipe(theBase, thePath)
3701             RaiseIfFailed("MakePipe", self.PrimOp)
3702             self._autoPublish(anObj, theName, "pipe")
3703             return anObj
3704
3705         ## Create a shape by extrusion of the profile shape along
3706         #  the path shape. The path shape can be a wire or an edge.
3707         #  the several profiles can be specified in the several locations of path.
3708         #  @param theSeqBases - list of  Bases shape to be extruded.
3709         #  @param theLocations - list of locations on the path corresponding
3710         #                        specified list of the Bases shapes. Number of locations
3711         #                        should be equal to number of bases or list of locations can be empty.
3712         #  @param thePath - Path shape to extrude the base shape along it.
3713         #  @param theWithContact - the mode defining that the section is translated to be in
3714         #                          contact with the spine.
3715         #  @param theWithCorrection - defining that the section is rotated to be
3716         #                             orthogonal to the spine tangent in the correspondent point
3717         #  @param theName Object name; when specified, this parameter is used
3718         #         for result publication in the study. Otherwise, if automatic
3719         #         publication is switched on, default value is used for result name.
3720         #
3721         #  @return New GEOM.GEOM_Object, containing the created pipe.
3722         #
3723         #  @ref tui_creation_pipe_with_diff_sec "Example"
3724         def MakePipeWithDifferentSections(self, theSeqBases,
3725                                           theLocations, thePath,
3726                                           theWithContact, theWithCorrection, theName=None):
3727             """
3728             Create a shape by extrusion of the profile shape along
3729             the path shape. The path shape can be a wire or an edge.
3730             the several profiles can be specified in the several locations of path.
3731
3732             Parameters:
3733                 theSeqBases - list of  Bases shape to be extruded.
3734                 theLocations - list of locations on the path corresponding
3735                                specified list of the Bases shapes. Number of locations
3736                                should be equal to number of bases or list of locations can be empty.
3737                 thePath - Path shape to extrude the base shape along it.
3738                 theWithContact - the mode defining that the section is translated to be in
3739                                  contact with the spine(0/1)
3740                 theWithCorrection - defining that the section is rotated to be
3741                                     orthogonal to the spine tangent in the correspondent point (0/1)
3742                 theName Object name; when specified, this parameter is used
3743                         for result publication in the study. Otherwise, if automatic
3744                         publication is switched on, default value is used for result name.
3745
3746             Returns:
3747                 New GEOM.GEOM_Object, containing the created pipe.
3748             """
3749             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3750                                                               theLocations, thePath,
3751                                                               theWithContact, theWithCorrection)
3752             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3753             self._autoPublish(anObj, theName, "pipe")
3754             return anObj
3755
3756         ## Create a shape by extrusion of the profile shape along
3757         #  the path shape. The path shape can be a wire or a edge.
3758         #  the several profiles can be specified in the several locations of path.
3759         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3760         #                       shell or face. If number of faces in neighbour sections
3761         #                       aren't coincided result solid between such sections will
3762         #                       be created using external boundaries of this shells.
3763         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3764         #                          This list is used for searching correspondences between
3765         #                          faces in the sections. Size of this list must be equal
3766         #                          to size of list of base shapes.
3767         #  @param theLocations - list of locations on the path corresponding
3768         #                        specified list of the Bases shapes. Number of locations
3769         #                        should be equal to number of bases. First and last
3770         #                        locations must be coincided with first and last vertexes
3771         #                        of path correspondingly.
3772         #  @param thePath - Path shape to extrude the base shape along it.
3773         #  @param theWithContact - the mode defining that the section is translated to be in
3774         #                          contact with the spine.
3775         #  @param theWithCorrection - defining that the section is rotated to be
3776         #                             orthogonal to the spine tangent in the correspondent point
3777         #  @param theName Object name; when specified, this parameter is used
3778         #         for result publication in the study. Otherwise, if automatic
3779         #         publication is switched on, default value is used for result name.
3780         #
3781         #  @return New GEOM.GEOM_Object, containing the created solids.
3782         #
3783         #  @ref tui_creation_pipe_with_shell_sec "Example"
3784         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3785                                       theLocations, thePath,
3786                                       theWithContact, theWithCorrection, theName=None):
3787             """
3788             Create a shape by extrusion of the profile shape along
3789             the path shape. The path shape can be a wire or a edge.
3790             the several profiles can be specified in the several locations of path.
3791
3792             Parameters:
3793                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3794                               shell or face. If number of faces in neighbour sections
3795                               aren't coincided result solid between such sections will
3796                               be created using external boundaries of this shells.
3797                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3798                                  This list is used for searching correspondences between
3799                                  faces in the sections. Size of this list must be equal
3800                                  to size of list of base shapes.
3801                 theLocations - list of locations on the path corresponding
3802                                specified list of the Bases shapes. Number of locations
3803                                should be equal to number of bases. First and last
3804                                locations must be coincided with first and last vertexes
3805                                of path correspondingly.
3806                 thePath - Path shape to extrude the base shape along it.
3807                 theWithContact - the mode defining that the section is translated to be in
3808                                  contact with the spine (0/1)
3809                 theWithCorrection - defining that the section is rotated to be
3810                                     orthogonal to the spine tangent in the correspondent point (0/1)
3811                 theName Object name; when specified, this parameter is used
3812                         for result publication in the study. Otherwise, if automatic
3813                         publication is switched on, default value is used for result name.
3814
3815             Returns:                           
3816                 New GEOM.GEOM_Object, containing the created solids.
3817             """
3818             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
3819                                                           theLocations, thePath,
3820                                                           theWithContact, theWithCorrection)
3821             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3822             self._autoPublish(anObj, theName, "pipe")
3823             return anObj
3824
3825         ## Create a shape by extrusion of the profile shape along
3826         #  the path shape. This function is used only for debug pipe
3827         #  functionality - it is a version of function MakePipeWithShellSections()
3828         #  which give a possibility to recieve information about
3829         #  creating pipe between each pair of sections step by step.
3830         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
3831                                              theLocations, thePath,
3832                                              theWithContact, theWithCorrection, theName=None):
3833             """
3834             Create a shape by extrusion of the profile shape along
3835             the path shape. This function is used only for debug pipe
3836             functionality - it is a version of previous function
3837             geompy.MakePipeWithShellSections() which give a possibility to
3838             recieve information about creating pipe between each pair of
3839             sections step by step.
3840             """
3841             res = []
3842             nbsect = len(theSeqBases)
3843             nbsubsect = len(theSeqSubBases)
3844             #print "nbsect = ",nbsect
3845             for i in range(1,nbsect):
3846                 #print "  i = ",i
3847                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
3848                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
3849                 tmpSeqSubBases = []
3850                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
3851                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
3852                                                               tmpLocations, thePath,
3853                                                               theWithContact, theWithCorrection)
3854                 if self.PrimOp.IsDone() == 0:
3855                     print "Problems with pipe creation between ",i," and ",i+1," sections"
3856                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3857                     break
3858                 else:
3859                     print "Pipe between ",i," and ",i+1," sections is OK"
3860                     res.append(anObj)
3861                     pass
3862                 pass
3863
3864             resc = self.MakeCompound(res)
3865             #resc = self.MakeSewing(res, 0.001)
3866             #print "resc: ",resc
3867             self._autoPublish(resc, theName, "pipe")
3868             return resc
3869
3870         ## Create solids between given sections
3871         #  @param theSeqBases - list of sections (shell or face).
3872         #  @param theLocations - list of corresponding vertexes
3873         #  @param theName Object name; when specified, this parameter is used
3874         #         for result publication in the study. Otherwise, if automatic
3875         #         publication is switched on, default value is used for result name.
3876         #
3877         #  @return New GEOM.GEOM_Object, containing the created solids.
3878         #
3879         #  @ref tui_creation_pipe_without_path "Example"
3880         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
3881             """
3882             Create solids between given sections
3883
3884             Parameters:
3885                 theSeqBases - list of sections (shell or face).
3886                 theLocations - list of corresponding vertexes
3887                 theName Object name; when specified, this parameter is used
3888                         for result publication in the study. Otherwise, if automatic
3889                         publication is switched on, default value is used for result name.
3890
3891             Returns:
3892                 New GEOM.GEOM_Object, containing the created solids.
3893             """
3894             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
3895             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
3896             self._autoPublish(anObj, theName, "pipe")
3897             return anObj
3898
3899         ## Create a shape by extrusion of the base shape along
3900         #  the path shape with constant bi-normal direction along the given vector.
3901         #  The path shape can be a wire or an edge.
3902         #  @param theBase Base shape to be extruded.
3903         #  @param thePath Path shape to extrude the base shape along it.
3904         #  @param theVec Vector defines a constant binormal direction to keep the
3905         #                same angle beetween the direction and the sections
3906         #                along the sweep surface.
3907         #  @param theName Object name; when specified, this parameter is used
3908         #         for result publication in the study. Otherwise, if automatic
3909         #         publication is switched on, default value is used for result name.
3910         #
3911         #  @return New GEOM.GEOM_Object, containing the created pipe.
3912         #
3913         #  @ref tui_creation_pipe "Example"
3914         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
3915             """
3916             Create a shape by extrusion of the base shape along
3917             the path shape with constant bi-normal direction along the given vector.
3918             The path shape can be a wire or an edge.
3919
3920             Parameters:
3921                 theBase Base shape to be extruded.
3922                 thePath Path shape to extrude the base shape along it.
3923                 theVec Vector defines a constant binormal direction to keep the
3924                        same angle beetween the direction and the sections
3925                        along the sweep surface.
3926                 theName Object name; when specified, this parameter is used
3927                         for result publication in the study. Otherwise, if automatic
3928                         publication is switched on, default value is used for result name.
3929
3930             Returns:              
3931                 New GEOM.GEOM_Object, containing the created pipe.
3932             """
3933             # Example: see GEOM_TestAll.py
3934             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
3935             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
3936             self._autoPublish(anObj, theName, "pipe")
3937             return anObj
3938               
3939         ## Makes a thick solid from a face or a shell
3940         #  @param theShape Face or Shell to be thicken
3941         #  @param theThickness Thickness of the resulting solid
3942         #  @param theName Object name; when specified, this parameter is used
3943         #         for result publication in the study. Otherwise, if automatic
3944         #         publication is switched on, default value is used for result name.
3945         #
3946         #  @return New GEOM.GEOM_Object, containing the created solid
3947         #
3948         def MakeThickSolid(self, theShape, theThickness, theName=None):
3949             """
3950             Make a thick solid from a face or a shell
3951
3952             Parameters:
3953                  theShape Face or Shell to be thicken
3954                  theThickness Thickness of the resulting solid
3955                  theName Object name; when specified, this parameter is used
3956                  for result publication in the study. Otherwise, if automatic
3957                  publication is switched on, default value is used for result name.
3958                  
3959             Returns:
3960                 New GEOM.GEOM_Object, containing the created solid
3961             """
3962             # Example: see GEOM_TestAll.py
3963             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
3964             RaiseIfFailed("MakeThickening", self.PrimOp)
3965             self._autoPublish(anObj, theName, "pipe")
3966             return anObj
3967             
3968
3969         ## Modifies a face or a shell to make it a thick solid
3970         #  @param theShape Face or Shell to be thicken
3971         #  @param theThickness Thickness of the resulting solid
3972         #
3973         #  @return The modified shape
3974         #
3975         def Thicken(self, theShape, theThickness):
3976             """
3977             Modifies a face or a shell to make it a thick solid
3978
3979             Parameters:
3980                 theBase Base shape to be extruded.
3981                 thePath Path shape to extrude the base shape along it.
3982                 theName Object name; when specified, this parameter is used
3983                         for result publication in the study. Otherwise, if automatic
3984                         publication is switched on, default value is used for result name.
3985
3986             Returns:
3987                 The modified shape
3988             """
3989             # Example: see GEOM_TestAll.py
3990             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
3991             RaiseIfFailed("MakeThickening", self.PrimOp)
3992             return anObj
3993
3994         ## Build a middle path of a pipe-like shape.
3995         #  The path shape can be a wire or an edge.
3996         #  @param theShape It can be closed or unclosed pipe-like shell
3997         #                  or a pipe-like solid.
3998         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
3999         #                            should be wires or faces of theShape.
4000         #  @param theName Object name; when specified, this parameter is used
4001         #         for result publication in the study. Otherwise, if automatic
4002         #         publication is switched on, default value is used for result name.
4003         #
4004         #  @note It is not assumed that exact or approximate copy of theShape
4005         #        can be obtained by applying existing Pipe operation on the
4006         #        resulting "Path" wire taking theBase1 as the base - it is not
4007         #        always possible; though in some particular cases it might work
4008         #        it is not guaranteed. Thus, RestorePath function should not be
4009         #        considered as an exact reverse operation of the Pipe.
4010         #
4011         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4012         #                                source pipe's "path".
4013         #
4014         #  @ref tui_creation_pipe_path "Example"
4015         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4016             """
4017             Build a middle path of a pipe-like shape.
4018             The path shape can be a wire or an edge.
4019
4020             Parameters:
4021                 theShape It can be closed or unclosed pipe-like shell
4022                          or a pipe-like solid.
4023                 theBase1, theBase2 Two bases of the supposed pipe. This
4024                                    should be wires or faces of theShape.
4025                 theName Object name; when specified, this parameter is used
4026                         for result publication in the study. Otherwise, if automatic
4027                         publication is switched on, default value is used for result name.
4028
4029             Returns:
4030                 New GEOM_Object, containing an edge or wire that represent
4031                                  source pipe's path.
4032             """
4033             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4034             RaiseIfFailed("RestorePath", self.PrimOp)
4035             self._autoPublish(anObj, theName, "path")
4036             return anObj
4037
4038         ## Build a middle path of a pipe-like shape.
4039         #  The path shape can be a wire or an edge.
4040         #  @param theShape It can be closed or unclosed pipe-like shell
4041         #                  or a pipe-like solid.
4042         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4043         #                                should be lists of edges of theShape.
4044         #  @param theName Object name; when specified, this parameter is used
4045         #         for result publication in the study. Otherwise, if automatic
4046         #         publication is switched on, default value is used for result name.
4047         #
4048         #  @note It is not assumed that exact or approximate copy of theShape
4049         #        can be obtained by applying existing Pipe operation on the
4050         #        resulting "Path" wire taking theBase1 as the base - it is not
4051         #        always possible; though in some particular cases it might work
4052         #        it is not guaranteed. Thus, RestorePath function should not be
4053         #        considered as an exact reverse operation of the Pipe.
4054         #
4055         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4056         #                                source pipe's "path".
4057         #
4058         #  @ref tui_creation_pipe_path "Example"
4059         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4060             """
4061             Build a middle path of a pipe-like shape.
4062             The path shape can be a wire or an edge.
4063
4064             Parameters:
4065                 theShape It can be closed or unclosed pipe-like shell
4066                          or a pipe-like solid.
4067                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4068                                        should be lists of edges of theShape.
4069                 theName Object name; when specified, this parameter is used
4070                         for result publication in the study. Otherwise, if automatic
4071                         publication is switched on, default value is used for result name.
4072
4073             Returns:
4074                 New GEOM_Object, containing an edge or wire that represent
4075                                  source pipe's path.
4076             """
4077             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4078             RaiseIfFailed("RestorePath", self.PrimOp)
4079             self._autoPublish(anObj, theName, "path")
4080             return anObj
4081
4082         # end of l3_complex
4083         ## @}
4084
4085         ## @addtogroup l3_advanced
4086         ## @{
4087
4088         ## Create a linear edge with specified ends.
4089         #  @param thePnt1 Point for the first end of edge.
4090         #  @param thePnt2 Point for the second end of edge.
4091         #  @param theName Object name; when specified, this parameter is used
4092         #         for result publication in the study. Otherwise, if automatic
4093         #         publication is switched on, default value is used for result name.
4094         #
4095         #  @return New GEOM.GEOM_Object, containing the created edge.
4096         #
4097         #  @ref tui_creation_edge "Example"
4098         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4099             """
4100             Create a linear edge with specified ends.
4101
4102             Parameters:
4103                 thePnt1 Point for the first end of edge.
4104                 thePnt2 Point for the second end of edge.
4105                 theName Object name; when specified, this parameter is used
4106                         for result publication in the study. Otherwise, if automatic
4107                         publication is switched on, default value is used for result name.
4108
4109             Returns:           
4110                 New GEOM.GEOM_Object, containing the created edge.
4111             """
4112             # Example: see GEOM_TestAll.py
4113             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4114             RaiseIfFailed("MakeEdge", self.ShapesOp)
4115             self._autoPublish(anObj, theName, "edge")
4116             return anObj
4117
4118         ## Create a new edge, corresponding to the given length on the given curve.
4119         #  @param theRefCurve The referenced curve (edge).
4120         #  @param theLength Length on the referenced curve. It can be negative.
4121         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4122         #                       at the end of \a theRefCurve, close to the selected point.
4123         #                       If None, start from the first point of \a theRefCurve.
4124         #  @param theName Object name; when specified, this parameter is used
4125         #         for result publication in the study. Otherwise, if automatic
4126         #         publication is switched on, default value is used for result name.
4127         #
4128         #  @return New GEOM.GEOM_Object, containing the created edge.
4129         #
4130         #  @ref tui_creation_edge "Example"
4131         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4132             """
4133             Create a new edge, corresponding to the given length on the given curve.
4134
4135             Parameters:
4136                 theRefCurve The referenced curve (edge).
4137                 theLength Length on the referenced curve. It can be negative.
4138                 theStartPoint Any point can be selected for it, the new edge will begin
4139                               at the end of theRefCurve, close to the selected point.
4140                               If None, start from the first point of theRefCurve.
4141                 theName Object name; when specified, this parameter is used
4142                         for result publication in the study. Otherwise, if automatic
4143                         publication is switched on, default value is used for result name.
4144
4145             Returns:              
4146                 New GEOM.GEOM_Object, containing the created edge.
4147             """
4148             # Example: see GEOM_TestAll.py
4149             theLength, Parameters = ParseParameters(theLength)
4150             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4151             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4152             anObj.SetParameters(Parameters)
4153             self._autoPublish(anObj, theName, "edge")
4154             return anObj
4155
4156         ## Create an edge from specified wire.
4157         #  @param theWire source Wire
4158         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4159         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4160         #  @param theName Object name; when specified, this parameter is used
4161         #         for result publication in the study. Otherwise, if automatic
4162         #         publication is switched on, default value is used for result name.
4163         #
4164         #  @return New GEOM.GEOM_Object, containing the created edge.
4165         #
4166         #  @ref tui_creation_edge "Example"
4167         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4168             """
4169             Create an edge from specified wire.
4170
4171             Parameters:
4172                 theWire source Wire
4173                 theLinearTolerance linear tolerance value (default = 1e-07)
4174                 theAngularTolerance angular tolerance value (default = 1e-12)
4175                 theName Object name; when specified, this parameter is used
4176                         for result publication in the study. Otherwise, if automatic
4177                         publication is switched on, default value is used for result name.
4178
4179             Returns:
4180                 New GEOM.GEOM_Object, containing the created edge.
4181             """
4182             # Example: see GEOM_TestAll.py
4183             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4184             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4185             self._autoPublish(anObj, theName, "edge")
4186             return anObj
4187
4188         ## Create a wire from the set of edges and wires.
4189         #  @param theEdgesAndWires List of edges and/or wires.
4190         #  @param theTolerance Maximum distance between vertices, that will be merged.
4191         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4192         #  @param theName Object name; when specified, this parameter is used
4193         #         for result publication in the study. Otherwise, if automatic
4194         #         publication is switched on, default value is used for result name.
4195         #
4196         #  @return New GEOM.GEOM_Object, containing the created wire.
4197         #
4198         #  @ref tui_creation_wire "Example"
4199         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4200             """
4201             Create a wire from the set of edges and wires.
4202
4203             Parameters:
4204                 theEdgesAndWires List of edges and/or wires.
4205                 theTolerance Maximum distance between vertices, that will be merged.
4206                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4207                 theName Object name; when specified, this parameter is used
4208                         for result publication in the study. Otherwise, if automatic
4209                         publication is switched on, default value is used for result name.
4210
4211             Returns:                    
4212                 New GEOM.GEOM_Object, containing the created wire.
4213             """
4214             # Example: see GEOM_TestAll.py
4215             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4216             RaiseIfFailed("MakeWire", self.ShapesOp)
4217             self._autoPublish(anObj, theName, "wire")
4218             return anObj
4219
4220         ## Create a face on the given wire.
4221         #  @param theWire closed Wire or Edge to build the face on.
4222         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4223         #                        If the tolerance of the obtained planar face is less
4224         #                        than 1e-06, this face will be returned, otherwise the
4225         #                        algorithm tries to build any suitable face on the given
4226         #                        wire and prints a warning message.
4227         #  @param theName Object name; when specified, this parameter is used
4228         #         for result publication in the study. Otherwise, if automatic
4229         #         publication is switched on, default value is used for result name.
4230         #
4231         #  @return New GEOM.GEOM_Object, containing the created face.
4232         #
4233         #  @ref tui_creation_face "Example"
4234         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4235             """
4236             Create a face on the given wire.
4237
4238             Parameters:
4239                 theWire closed Wire or Edge to build the face on.
4240                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4241                                If the tolerance of the obtained planar face is less
4242                                than 1e-06, this face will be returned, otherwise the
4243                                algorithm tries to build any suitable face on the given
4244                                wire and prints a warning message.
4245                 theName Object name; when specified, this parameter is used
4246                         for result publication in the study. Otherwise, if automatic
4247                         publication is switched on, default value is used for result name.
4248
4249             Returns:
4250                 New GEOM.GEOM_Object, containing the created face.
4251             """
4252             # Example: see GEOM_TestAll.py
4253             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4254             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4255                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4256             else:
4257                 RaiseIfFailed("MakeFace", self.ShapesOp)
4258             self._autoPublish(anObj, theName, "face")
4259             return anObj
4260
4261         ## Create a face on the given wires set.
4262         #  @param theWires List of closed wires or edges to build the face on.
4263         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4264         #                        If the tolerance of the obtained planar face is less
4265         #                        than 1e-06, this face will be returned, otherwise the
4266         #                        algorithm tries to build any suitable face on the given
4267         #                        wire and prints a warning message.
4268         #  @param theName Object name; when specified, this parameter is used
4269         #         for result publication in the study. Otherwise, if automatic
4270         #         publication is switched on, default value is used for result name.
4271         #
4272         #  @return New GEOM.GEOM_Object, containing the created face.
4273         #
4274         #  @ref tui_creation_face "Example"
4275         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4276             """
4277             Create a face on the given wires set.
4278
4279             Parameters:
4280                 theWires List of closed wires or edges to build the face on.
4281                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4282                                If the tolerance of the obtained planar face is less
4283                                than 1e-06, this face will be returned, otherwise the
4284                                algorithm tries to build any suitable face on the given
4285                                wire and prints a warning message.
4286                 theName Object name; when specified, this parameter is used
4287                         for result publication in the study. Otherwise, if automatic
4288                         publication is switched on, default value is used for result name.
4289
4290             Returns: 
4291                 New GEOM.GEOM_Object, containing the created face.
4292             """
4293             # Example: see GEOM_TestAll.py
4294             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4295             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4296                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4297             else:
4298                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4299             self._autoPublish(anObj, theName, "face")
4300             return anObj
4301
4302         ## See MakeFaceWires() method for details.
4303         #
4304         #  @ref tui_creation_face "Example 1"
4305         #  \n @ref swig_MakeFaces  "Example 2"
4306         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4307             """
4308             See geompy.MakeFaceWires() method for details.
4309             """
4310             # Example: see GEOM_TestOthers.py
4311             # note: auto-publishing is done in self.MakeFaceWires()
4312             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4313             return anObj
4314
4315         ## Create a shell from the set of faces and shells.
4316         #  @param theFacesAndShells List of faces and/or shells.
4317         #  @param theName Object name; when specified, this parameter is used
4318         #         for result publication in the study. Otherwise, if automatic
4319         #         publication is switched on, default value is used for result name.
4320         #
4321         #  @return New GEOM.GEOM_Object, containing the created shell.
4322         #
4323         #  @ref tui_creation_shell "Example"
4324         def MakeShell(self, theFacesAndShells, theName=None):
4325             """
4326             Create a shell from the set of faces and shells.
4327
4328             Parameters:
4329                 theFacesAndShells List of faces and/or shells.
4330                 theName Object name; when specified, this parameter is used
4331                         for result publication in the study. Otherwise, if automatic
4332                         publication is switched on, default value is used for result name.
4333
4334             Returns:
4335                 New GEOM.GEOM_Object, containing the created shell.
4336             """
4337             # Example: see GEOM_TestAll.py
4338             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4339             RaiseIfFailed("MakeShell", self.ShapesOp)
4340             self._autoPublish(anObj, theName, "shell")
4341             return anObj
4342
4343         ## Create a solid, bounded by the given shells.
4344         #  @param theShells Sequence of bounding shells.
4345         #  @param theName Object name; when specified, this parameter is used
4346         #         for result publication in the study. Otherwise, if automatic
4347         #         publication is switched on, default value is used for result name.
4348         #
4349         #  @return New GEOM.GEOM_Object, containing the created solid.
4350         #
4351         #  @ref tui_creation_solid "Example"
4352         def MakeSolid(self, theShells, theName=None):
4353             """
4354             Create a solid, bounded by the given shells.
4355
4356             Parameters:
4357                 theShells Sequence of bounding shells.
4358                 theName Object name; when specified, this parameter is used
4359                         for result publication in the study. Otherwise, if automatic
4360                         publication is switched on, default value is used for result name.
4361
4362             Returns:
4363                 New GEOM.GEOM_Object, containing the created solid.
4364             """
4365             # Example: see GEOM_TestAll.py
4366             if len(theShells) == 1:
4367                 descr = self.MeasuOp.IsGoodForSolid(theShells[0])
4368                 #if len(descr) > 0:
4369                 #    raise RuntimeError, "MakeSolidShells : " + descr
4370                 if descr == "WRN_SHAPE_UNCLOSED":
4371                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4372             anObj = self.ShapesOp.MakeSolidShells(theShells)
4373             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4374             self._autoPublish(anObj, theName, "solid")
4375             return anObj
4376
4377         ## Create a compound of the given shapes.
4378         #  @param theShapes List of shapes to put in compound.
4379         #  @param theName Object name; when specified, this parameter is used
4380         #         for result publication in the study. Otherwise, if automatic
4381         #         publication is switched on, default value is used for result name.
4382         #
4383         #  @return New GEOM.GEOM_Object, containing the created compound.
4384         #
4385         #  @ref tui_creation_compound "Example"
4386         def MakeCompound(self, theShapes, theName=None):
4387             """
4388             Create a compound of the given shapes.
4389
4390             Parameters:
4391                 theShapes List of shapes to put in compound.
4392                 theName Object name; when specified, this parameter is used
4393                         for result publication in the study. Otherwise, if automatic
4394                         publication is switched on, default value is used for result name.
4395
4396             Returns:
4397                 New GEOM.GEOM_Object, containing the created compound.
4398             """
4399             # Example: see GEOM_TestAll.py
4400             self.ShapesOp.StartOperation()
4401             anObj = self.ShapesOp.MakeCompound(theShapes)
4402             RaiseIfFailed("MakeCompound", self.ShapesOp)
4403             self._autoPublish(anObj, theName, "compound")
4404             return anObj
4405
4406         # end of l3_advanced
4407         ## @}
4408
4409         ## @addtogroup l2_measure
4410         ## @{
4411
4412         ## Gives quantity of faces in the given shape.
4413         #  @param theShape Shape to count faces of.
4414         #  @return Quantity of faces.
4415         #
4416         #  @ref swig_NumberOf "Example"
4417         def NumberOfFaces(self, theShape):
4418             """
4419             Gives quantity of faces in the given shape.
4420
4421             Parameters:
4422                 theShape Shape to count faces of.
4423
4424             Returns:    
4425                 Quantity of faces.
4426             """
4427             # Example: see GEOM_TestOthers.py
4428             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4429             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4430             return nb_faces
4431
4432         ## Gives quantity of edges in the given shape.
4433         #  @param theShape Shape to count edges of.
4434         #  @return Quantity of edges.
4435         #
4436         #  @ref swig_NumberOf "Example"
4437         def NumberOfEdges(self, theShape):
4438             """
4439             Gives quantity of edges in the given shape.
4440
4441             Parameters:
4442                 theShape Shape to count edges of.
4443
4444             Returns:    
4445                 Quantity of edges.
4446             """
4447             # Example: see GEOM_TestOthers.py
4448             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4449             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4450             return nb_edges
4451
4452         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4453         #  @param theShape Shape to count sub-shapes of.
4454         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4455         #  @return Quantity of sub-shapes of given type.
4456         #
4457         #  @ref swig_NumberOf "Example"
4458         def NumberOfSubShapes(self, theShape, theShapeType):
4459             """
4460             Gives quantity of sub-shapes of type theShapeType in the given shape.
4461
4462             Parameters:
4463                 theShape Shape to count sub-shapes of.
4464                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4465
4466             Returns:
4467                 Quantity of sub-shapes of given type.
4468             """
4469             # Example: see GEOM_TestOthers.py
4470             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4471             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4472             return nb_ss
4473
4474         ## Gives quantity of solids in the given shape.
4475         #  @param theShape Shape to count solids in.
4476         #  @return Quantity of solids.
4477         #
4478         #  @ref swig_NumberOf "Example"
4479         def NumberOfSolids(self, theShape):
4480             """
4481             Gives quantity of solids in the given shape.
4482
4483             Parameters:
4484                 theShape Shape to count solids in.
4485
4486             Returns:
4487                 Quantity of solids.
4488             """
4489             # Example: see GEOM_TestOthers.py
4490             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4491             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4492             return nb_solids
4493
4494         # end of l2_measure
4495         ## @}
4496
4497         ## @addtogroup l3_healing
4498         ## @{
4499
4500         ## Reverses an orientation the given shape.
4501         #  @param theShape Shape to be reversed.
4502         #  @param theName Object name; when specified, this parameter is used
4503         #         for result publication in the study. Otherwise, if automatic
4504         #         publication is switched on, default value is used for result name.
4505         #
4506         #  @return The reversed copy of theShape.
4507         #
4508         #  @ref swig_ChangeOrientation "Example"
4509         def ChangeOrientation(self, theShape, theName=None):
4510             """
4511             Reverses an orientation the given shape.
4512
4513             Parameters:
4514                 theShape Shape to be reversed.
4515                 theName Object name; when specified, this parameter is used
4516                         for result publication in the study. Otherwise, if automatic
4517                         publication is switched on, default value is used for result name.
4518
4519             Returns:   
4520                 The reversed copy of theShape.
4521             """
4522             # Example: see GEOM_TestAll.py
4523             anObj = self.ShapesOp.ChangeOrientation(theShape)
4524             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4525             self._autoPublish(anObj, theName, "reversed")
4526             return anObj
4527
4528         ## See ChangeOrientation() method for details.
4529         #
4530         #  @ref swig_OrientationChange "Example"
4531         def OrientationChange(self, theShape, theName=None):
4532             """
4533             See geompy.ChangeOrientation method for details.
4534             """
4535             # Example: see GEOM_TestOthers.py
4536             # note: auto-publishing is done in self.ChangeOrientation()
4537             anObj = self.ChangeOrientation(theShape, theName)
4538             return anObj
4539
4540         # end of l3_healing
4541         ## @}
4542
4543         ## @addtogroup l4_obtain
4544         ## @{
4545
4546         ## Retrieve all free faces from the given shape.
4547         #  Free face is a face, which is not shared between two shells of the shape.
4548         #  @param theShape Shape to find free faces in.
4549         #  @return List of IDs of all free faces, contained in theShape.
4550         #
4551         #  @ref tui_measurement_tools_page "Example"
4552         def GetFreeFacesIDs(self,theShape):
4553             """
4554             Retrieve all free faces from the given shape.
4555             Free face is a face, which is not shared between two shells of the shape.
4556
4557             Parameters:
4558                 theShape Shape to find free faces in.
4559
4560             Returns:
4561                 List of IDs of all free faces, contained in theShape.
4562             """
4563             # Example: see GEOM_TestOthers.py
4564             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4565             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4566             return anIDs
4567
4568         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4569         #  @param theShape1 Shape to find sub-shapes in.
4570         #  @param theShape2 Shape to find shared sub-shapes with.
4571         #  @param theShapeType Type of sub-shapes to be retrieved.
4572         #  @param theName Object name; when specified, this parameter is used
4573         #         for result publication in the study. Otherwise, if automatic
4574         #         publication is switched on, default value is used for result name.
4575         #
4576         #  @return List of sub-shapes of theShape1, shared with theShape2.
4577         #
4578         #  @ref swig_GetSharedShapes "Example"
4579         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4580             """
4581             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4582
4583             Parameters:
4584                 theShape1 Shape to find sub-shapes in.
4585                 theShape2 Shape to find shared sub-shapes with.
4586                 theShapeType Type of sub-shapes to be retrieved.
4587                 theName Object name; when specified, this parameter is used
4588                         for result publication in the study. Otherwise, if automatic
4589                         publication is switched on, default value is used for result name.
4590
4591             Returns:
4592                 List of sub-shapes of theShape1, shared with theShape2.
4593             """
4594             # Example: see GEOM_TestOthers.py
4595             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4596             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4597             self._autoPublish(aList, theName, "shared")
4598             return aList
4599
4600         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4601         #  @param theShapes Shapes to find common sub-shapes of.
4602         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4603         #  @param theName Object name; when specified, this parameter is used
4604         #         for result publication in the study. Otherwise, if automatic
4605         #         publication is switched on, default value is used for result name.
4606         #
4607         #  @return List of objects, that are sub-shapes of all given shapes.
4608         #
4609         #  @ref swig_GetSharedShapes "Example"
4610         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4611             """
4612             Get all sub-shapes, shared by all shapes in the list theShapes.
4613
4614             Parameters:
4615                 theShapes Shapes to find common sub-shapes of.
4616                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4617                 theName Object name; when specified, this parameter is used
4618                         for result publication in the study. Otherwise, if automatic
4619                         publication is switched on, default value is used for result name.
4620
4621             Returns:    
4622                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4623             """
4624             # Example: see GEOM_TestOthers.py
4625             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4626             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4627             self._autoPublish(aList, theName, "shared")
4628             return aList
4629
4630         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4631         #  situated relatively the specified plane by the certain way,
4632         #  defined through <VAR>theState</VAR> parameter.
4633         #  @param theShape Shape to find sub-shapes of.
4634         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4635         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4636         #                direction and location of the plane to find shapes on.
4637         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4638         #  @param theName Object name; when specified, this parameter is used
4639         #         for result publication in the study. Otherwise, if automatic
4640         #         publication is switched on, default value is used for result name.
4641         #
4642         #  @return List of all found sub-shapes.
4643         #
4644         #  @ref swig_GetShapesOnPlane "Example"
4645         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4646             """
4647             Find in theShape all sub-shapes of type theShapeType,
4648             situated relatively the specified plane by the certain way,
4649             defined through theState parameter.
4650
4651             Parameters:
4652                 theShape Shape to find sub-shapes of.
4653                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4654                 theAx1 Vector (or line, or linear edge), specifying normal
4655                        direction and location of the plane to find shapes on.
4656                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4657                 theName Object name; when specified, this parameter is used
4658                         for result publication in the study. Otherwise, if automatic
4659                         publication is switched on, default value is used for result name.
4660
4661             Returns:
4662                 List of all found sub-shapes.
4663             """
4664             # Example: see GEOM_TestOthers.py
4665             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4666             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4667             self._autoPublish(aList, theName, "shapeOnPlane")
4668             return aList
4669
4670         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4671         #  situated relatively the specified plane by the certain way,
4672         #  defined through <VAR>theState</VAR> parameter.
4673         #  @param theShape Shape to find sub-shapes of.
4674         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4675         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4676         #                direction and location of the plane to find shapes on.
4677         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4678         #
4679         #  @return List of all found sub-shapes indices.
4680         #
4681         #  @ref swig_GetShapesOnPlaneIDs "Example"
4682         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4683             """
4684             Find in theShape all sub-shapes of type theShapeType,
4685             situated relatively the specified plane by the certain way,
4686             defined through theState parameter.
4687
4688             Parameters:
4689                 theShape Shape to find sub-shapes of.
4690                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4691                 theAx1 Vector (or line, or linear edge), specifying normal
4692                        direction and location of the plane to find shapes on.
4693                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4694
4695             Returns:
4696                 List of all found sub-shapes indices.
4697             """
4698             # Example: see GEOM_TestOthers.py
4699             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4700             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4701             return aList
4702
4703         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4704         #  situated relatively the specified plane by the certain way,
4705         #  defined through <VAR>theState</VAR> parameter.
4706         #  @param theShape Shape to find sub-shapes of.
4707         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4708         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4709         #                direction of the plane to find shapes on.
4710         #  @param thePnt Point specifying location of the plane to find shapes on.
4711         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4712         #  @param theName Object name; when specified, this parameter is used
4713         #         for result publication in the study. Otherwise, if automatic
4714         #         publication is switched on, default value is used for result name.
4715         #
4716         #  @return List of all found sub-shapes.
4717         #
4718         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4719         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4720             """
4721             Find in theShape all sub-shapes of type theShapeType,
4722             situated relatively the specified plane by the certain way,
4723             defined through theState parameter.
4724
4725             Parameters:
4726                 theShape Shape to find sub-shapes of.
4727                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4728                 theAx1 Vector (or line, or linear edge), specifying normal
4729                        direction and location of the plane to find shapes on.
4730                 thePnt Point specifying location of the plane to find shapes on.
4731                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4732                 theName Object name; when specified, this parameter is used
4733                         for result publication in the study. Otherwise, if automatic
4734                         publication is switched on, default value is used for result name.
4735
4736             Returns:
4737                 List of all found sub-shapes.
4738             """
4739             # Example: see GEOM_TestOthers.py
4740             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4741                                                                theAx1, thePnt, theState)
4742             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4743             self._autoPublish(aList, theName, "shapeOnPlane")
4744             return aList
4745
4746         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4747         #  situated relatively the specified plane by the certain way,
4748         #  defined through <VAR>theState</VAR> parameter.
4749         #  @param theShape Shape to find sub-shapes of.
4750         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4751         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4752         #                direction of the plane to find shapes on.
4753         #  @param thePnt Point specifying location of the plane to find shapes on.
4754         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4755         #
4756         #  @return List of all found sub-shapes indices.
4757         #
4758         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4759         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4760             """
4761             Find in theShape all sub-shapes of type theShapeType,
4762             situated relatively the specified plane by the certain way,
4763             defined through theState parameter.
4764
4765             Parameters:
4766                 theShape Shape to find sub-shapes of.
4767                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4768                 theAx1 Vector (or line, or linear edge), specifying normal
4769                        direction and location of the plane to find shapes on.
4770                 thePnt Point specifying location of the plane to find shapes on.
4771                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4772
4773             Returns:
4774                 List of all found sub-shapes indices.
4775             """
4776             # Example: see GEOM_TestOthers.py
4777             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4778                                                                   theAx1, thePnt, theState)
4779             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4780             return aList
4781
4782         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4783         #  the specified cylinder by the certain way, defined through \a theState parameter.
4784         #  @param theShape Shape to find sub-shapes of.
4785         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4786         #  @param theAxis Vector (or line, or linear edge), specifying
4787         #                 axis of the cylinder to find shapes on.
4788         #  @param theRadius Radius of the cylinder to find shapes on.
4789         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4790         #  @param theName Object name; when specified, this parameter is used
4791         #         for result publication in the study. Otherwise, if automatic
4792         #         publication is switched on, default value is used for result name.
4793         #
4794         #  @return List of all found sub-shapes.
4795         #
4796         #  @ref swig_GetShapesOnCylinder "Example"
4797         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
4798             """
4799             Find in theShape all sub-shapes of type theShapeType, situated relatively
4800             the specified cylinder by the certain way, defined through theState parameter.
4801
4802             Parameters:
4803                 theShape Shape to find sub-shapes of.
4804                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4805                 theAxis Vector (or line, or linear edge), specifying
4806                         axis of the cylinder to find shapes on.
4807                 theRadius Radius of the cylinder to find shapes on.
4808                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4809                 theName Object name; when specified, this parameter is used
4810                         for result publication in the study. Otherwise, if automatic
4811                         publication is switched on, default value is used for result name.
4812
4813             Returns:
4814                 List of all found sub-shapes.
4815             """
4816             # Example: see GEOM_TestOthers.py
4817             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
4818             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
4819             self._autoPublish(aList, theName, "shapeOnCylinder")
4820             return aList
4821
4822         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4823         #  the specified cylinder by the certain way, defined through \a theState parameter.
4824         #  @param theShape Shape to find sub-shapes of.
4825         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4826         #  @param theAxis Vector (or line, or linear edge), specifying
4827         #                 axis of the cylinder to find shapes on.
4828         #  @param theRadius Radius of the cylinder to find shapes on.
4829         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4830         #
4831         #  @return List of all found sub-shapes indices.
4832         #
4833         #  @ref swig_GetShapesOnCylinderIDs "Example"
4834         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
4835             """
4836             Find in theShape all sub-shapes of type theShapeType, situated relatively
4837             the specified cylinder by the certain way, defined through theState parameter.
4838
4839             Parameters:
4840                 theShape Shape to find sub-shapes of.
4841                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4842                 theAxis Vector (or line, or linear edge), specifying
4843                         axis of the cylinder to find shapes on.
4844                 theRadius Radius of the cylinder to find shapes on.
4845                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4846
4847             Returns:
4848                 List of all found sub-shapes indices.
4849             """
4850             # Example: see GEOM_TestOthers.py
4851             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
4852             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
4853             return aList
4854
4855         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4856         #  the specified cylinder by the certain way, defined through \a theState parameter.
4857         #  @param theShape Shape to find sub-shapes of.
4858         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4859         #  @param theAxis Vector (or line, or linear edge), specifying
4860         #                 axis of the cylinder to find shapes on.
4861         #  @param thePnt Point specifying location of the bottom of the cylinder.
4862         #  @param theRadius Radius of the cylinder to find shapes on.
4863         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4864         #  @param theName Object name; when specified, this parameter is used
4865         #         for result publication in the study. Otherwise, if automatic
4866         #         publication is switched on, default value is used for result name.
4867         #
4868         #  @return List of all found sub-shapes.
4869         #
4870         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
4871         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
4872             """
4873             Find in theShape all sub-shapes of type theShapeType, situated relatively
4874             the specified cylinder by the certain way, defined through theState parameter.
4875
4876             Parameters:
4877                 theShape Shape to find sub-shapes of.
4878                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4879                 theAxis Vector (or line, or linear edge), specifying
4880                         axis of the cylinder to find shapes on.
4881                 theRadius Radius of the cylinder to find shapes on.
4882                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4883                 theName Object name; when specified, this parameter is used
4884                         for result publication in the study. Otherwise, if automatic
4885                         publication is switched on, default value is used for result name.
4886
4887             Returns:
4888                 List of all found sub-shapes.
4889             """
4890             # Example: see GEOM_TestOthers.py
4891             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4892             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
4893             self._autoPublish(aList, theName, "shapeOnCylinder")
4894             return aList
4895
4896         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4897         #  the specified cylinder by the certain way, defined through \a theState parameter.
4898         #  @param theShape Shape to find sub-shapes of.
4899         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4900         #  @param theAxis Vector (or line, or linear edge), specifying
4901         #                 axis of the cylinder to find shapes on.
4902         #  @param thePnt Point specifying location of the bottom of the cylinder.
4903         #  @param theRadius Radius of the cylinder to find shapes on.
4904         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4905         #
4906         #  @return List of all found sub-shapes indices
4907         #
4908         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
4909         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
4910             """
4911             Find in theShape all sub-shapes of type theShapeType, situated relatively
4912             the specified cylinder by the certain way, defined through theState parameter.
4913
4914             Parameters:
4915                 theShape Shape to find sub-shapes of.
4916                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4917                 theAxis Vector (or line, or linear edge), specifying
4918                         axis of the cylinder to find shapes on.
4919                 theRadius Radius of the cylinder to find shapes on.
4920                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4921
4922             Returns:
4923                 List of all found sub-shapes indices.            
4924             """
4925             # Example: see GEOM_TestOthers.py
4926             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4927             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
4928             return aList
4929
4930         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4931         #  the specified sphere by the certain way, defined through \a theState parameter.
4932         #  @param theShape Shape to find sub-shapes of.
4933         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4934         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4935         #  @param theRadius Radius of the sphere to find shapes on.
4936         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4937         #  @param theName Object name; when specified, this parameter is used
4938         #         for result publication in the study. Otherwise, if automatic
4939         #         publication is switched on, default value is used for result name.
4940         #
4941         #  @return List of all found sub-shapes.
4942         #
4943         #  @ref swig_GetShapesOnSphere "Example"
4944         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
4945             """
4946             Find in theShape all sub-shapes of type theShapeType, situated relatively
4947             the specified sphere by the certain way, defined through theState parameter.
4948
4949             Parameters:
4950                 theShape Shape to find sub-shapes of.
4951                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4952                 theCenter Point, specifying center of the sphere to find shapes on.
4953                 theRadius Radius of the sphere to find shapes on.
4954                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4955                 theName Object name; when specified, this parameter is used
4956                         for result publication in the study. Otherwise, if automatic
4957                         publication is switched on, default value is used for result name.
4958
4959             Returns:
4960                 List of all found sub-shapes.
4961             """
4962             # Example: see GEOM_TestOthers.py
4963             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
4964             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
4965             self._autoPublish(aList, theName, "shapeOnSphere")
4966             return aList
4967
4968         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4969         #  the specified sphere by the certain way, defined through \a theState parameter.
4970         #  @param theShape Shape to find sub-shapes of.
4971         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4972         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4973         #  @param theRadius Radius of the sphere to find shapes on.
4974         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4975         #
4976         #  @return List of all found sub-shapes indices.
4977         #
4978         #  @ref swig_GetShapesOnSphereIDs "Example"
4979         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
4980             """
4981             Find in theShape all sub-shapes of type theShapeType, situated relatively
4982             the specified sphere by the certain way, defined through theState parameter.
4983
4984             Parameters:
4985                 theShape Shape to find sub-shapes of.
4986                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4987                 theCenter Point, specifying center of the sphere to find shapes on.
4988                 theRadius Radius of the sphere to find shapes on.
4989                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4990
4991             Returns:
4992                 List of all found sub-shapes indices.
4993             """
4994             # Example: see GEOM_TestOthers.py
4995             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
4996             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
4997             return aList
4998
4999         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5000         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5001         #  @param theShape Shape to find sub-shapes of.
5002         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5003         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5004         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5005         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5006         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5007         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5008         #  @param theName Object name; when specified, this parameter is used
5009         #         for result publication in the study. Otherwise, if automatic
5010         #         publication is switched on, default value is used for result name.
5011         #
5012         #  @return List of all found sub-shapes.
5013         #
5014         #  @ref swig_GetShapesOnQuadrangle "Example"
5015         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5016                                   theTopLeftPoint, theTopRigthPoint,
5017                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
5018             """
5019             Find in theShape all sub-shapes of type theShapeType, situated relatively
5020             the specified quadrangle by the certain way, defined through theState parameter.
5021
5022             Parameters:
5023                 theShape Shape to find sub-shapes of.
5024                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5025                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5026                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5027                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5028                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5029                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5030                 theName Object name; when specified, this parameter is used
5031                         for result publication in the study. Otherwise, if automatic
5032                         publication is switched on, default value is used for result name.
5033
5034             Returns:
5035                 List of all found sub-shapes.
5036             """
5037             # Example: see GEOM_TestOthers.py
5038             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5039                                                         theTopLeftPoint, theTopRigthPoint,
5040                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
5041             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5042             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5043             return aList
5044
5045         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5046         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5047         #  @param theShape Shape to find sub-shapes of.
5048         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5049         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5050         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5051         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5052         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5053         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5054         #
5055         #  @return List of all found sub-shapes indices.
5056         #
5057         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5058         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5059                                      theTopLeftPoint, theTopRigthPoint,
5060                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5061             """
5062             Find in theShape all sub-shapes of type theShapeType, situated relatively
5063             the specified quadrangle by the certain way, defined through theState parameter.
5064
5065             Parameters:
5066                 theShape Shape to find sub-shapes of.
5067                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5068                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5069                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5070                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5071                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5072                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5073
5074             Returns:
5075                 List of all found sub-shapes indices.
5076             """
5077
5078             # Example: see GEOM_TestOthers.py
5079             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5080                                                            theTopLeftPoint, theTopRigthPoint,
5081                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5082             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5083             return aList
5084
5085         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5086         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5087         #  @param theBox Shape for relative comparing.
5088         #  @param theShape Shape to find sub-shapes of.
5089         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5090         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5091         #  @param theName Object name; when specified, this parameter is used
5092         #         for result publication in the study. Otherwise, if automatic
5093         #         publication is switched on, default value is used for result name.
5094         #
5095         #  @return List of all found sub-shapes.
5096         #
5097         #  @ref swig_GetShapesOnBox "Example"
5098         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5099             """
5100             Find in theShape all sub-shapes of type theShapeType, situated relatively
5101             the specified theBox by the certain way, defined through theState parameter.
5102
5103             Parameters:
5104                 theBox Shape for relative comparing.
5105                 theShape Shape to find sub-shapes of.
5106                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5107                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5108                 theName Object name; when specified, this parameter is used
5109                         for result publication in the study. Otherwise, if automatic
5110                         publication is switched on, default value is used for result name.
5111
5112             Returns:
5113                 List of all found sub-shapes.
5114             """
5115             # Example: see GEOM_TestOthers.py
5116             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5117             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5118             self._autoPublish(aList, theName, "shapeOnBox")
5119             return aList
5120
5121         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5122         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5123         #  @param theBox Shape for relative comparing.
5124         #  @param theShape Shape to find sub-shapes of.
5125         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5126         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5127         #
5128         #  @return List of all found sub-shapes indices.
5129         #
5130         #  @ref swig_GetShapesOnBoxIDs "Example"
5131         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5132             """
5133             Find in theShape all sub-shapes of type theShapeType, situated relatively
5134             the specified theBox by the certain way, defined through theState parameter.
5135
5136             Parameters:
5137                 theBox Shape for relative comparing.
5138                 theShape Shape to find sub-shapes of.
5139                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5140                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5141
5142             Returns:
5143                 List of all found sub-shapes indices.
5144             """
5145             # Example: see GEOM_TestOthers.py
5146             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5147             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5148             return aList
5149
5150         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5151         #  situated relatively the specified \a theCheckShape by the
5152         #  certain way, defined through \a theState parameter.
5153         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5154         #  @param theShape Shape to find sub-shapes of.
5155         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
5156         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5157         #  @param theName Object name; when specified, this parameter is used
5158         #         for result publication in the study. Otherwise, if automatic
5159         #         publication is switched on, default value is used for result name.
5160         #
5161         #  @return List of all found sub-shapes.
5162         #
5163         #  @ref swig_GetShapesOnShape "Example"
5164         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5165             """
5166             Find in theShape all sub-shapes of type theShapeType,
5167             situated relatively the specified theCheckShape by the
5168             certain way, defined through theState parameter.
5169
5170             Parameters:
5171                 theCheckShape Shape for relative comparing. It must be a solid.
5172                 theShape Shape to find sub-shapes of.
5173                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5174                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5175                 theName Object name; when specified, this parameter is used
5176                         for result publication in the study. Otherwise, if automatic
5177                         publication is switched on, default value is used for result name.
5178
5179             Returns:
5180                 List of all found sub-shapes.
5181             """
5182             # Example: see GEOM_TestOthers.py
5183             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5184                                                    theShapeType, theState)
5185             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5186             self._autoPublish(aList, theName, "shapeOnShape")
5187             return aList
5188
5189         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5190         #  situated relatively the specified \a theCheckShape by the
5191         #  certain way, defined through \a theState parameter.
5192         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5193         #  @param theShape Shape to find sub-shapes of.
5194         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5195         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5196         #  @param theName Object name; when specified, this parameter is used
5197         #         for result publication in the study. Otherwise, if automatic
5198         #         publication is switched on, default value is used for result name.
5199         #
5200         #  @return All found sub-shapes as compound.
5201         #
5202         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5203         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5204             """
5205             Find in theShape all sub-shapes of type theShapeType,
5206             situated relatively the specified theCheckShape by the
5207             certain way, defined through theState parameter.
5208
5209             Parameters:
5210                 theCheckShape Shape for relative comparing. It must be a solid.
5211                 theShape Shape to find sub-shapes of.
5212                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5213                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5214                 theName Object name; when specified, this parameter is used
5215                         for result publication in the study. Otherwise, if automatic
5216                         publication is switched on, default value is used for result name.
5217
5218             Returns:
5219                 All found sub-shapes as compound.
5220             """
5221             # Example: see GEOM_TestOthers.py
5222             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5223                                                              theShapeType, theState)
5224             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5225             self._autoPublish(anObj, theName, "shapeOnShape")
5226             return anObj
5227
5228         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5229         #  situated relatively the specified \a theCheckShape by the
5230         #  certain way, defined through \a theState parameter.
5231         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5232         #  @param theShape Shape to find sub-shapes of.
5233         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5234         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5235         #
5236         #  @return List of all found sub-shapes indices.
5237         #
5238         #  @ref swig_GetShapesOnShapeIDs "Example"
5239         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5240             """
5241             Find in theShape all sub-shapes of type theShapeType,
5242             situated relatively the specified theCheckShape by the
5243             certain way, defined through theState parameter.
5244
5245             Parameters:
5246                 theCheckShape Shape for relative comparing. It must be a solid.
5247                 theShape Shape to find sub-shapes of.
5248                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5249                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5250
5251             Returns:
5252                 List of all found sub-shapes indices.
5253             """
5254             # Example: see GEOM_TestOthers.py
5255             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5256                                                       theShapeType, theState)
5257             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5258             return aList
5259
5260         ## Get sub-shape(s) of theShapeWhere, which are
5261         #  coincident with \a theShapeWhat or could be a part of it.
5262         #  @param theShapeWhere Shape to find sub-shapes of.
5263         #  @param theShapeWhat Shape, specifying what to find.
5264         #  @param isNewImplementation implementation of GetInPlace functionality
5265         #             (default = False, old alghorithm based on shape properties)
5266         #  @param theName Object name; when specified, this parameter is used
5267         #         for result publication in the study. Otherwise, if automatic
5268         #         publication is switched on, default value is used for result name.
5269         #
5270         #  @return Group of all found sub-shapes or a single found sub-shape.
5271         #
5272         #  @note This function has a restriction on argument shapes.
5273         #        If \a theShapeWhere has curved parts with significantly
5274         #        outstanding centres (i.e. the mass centre of a part is closer to
5275         #        \a theShapeWhat than to the part), such parts will not be found.
5276         #        @image html get_in_place_lost_part.png
5277         #
5278         #  @ref swig_GetInPlace "Example"
5279         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5280             """
5281             Get sub-shape(s) of theShapeWhere, which are
5282             coincident with  theShapeWhat or could be a part of it.
5283
5284             Parameters:
5285                 theShapeWhere Shape to find sub-shapes of.
5286                 theShapeWhat Shape, specifying what to find.
5287                 isNewImplementation Implementation of GetInPlace functionality
5288                                     (default = False, old alghorithm based on shape properties)
5289                 theName Object name; when specified, this parameter is used
5290                         for result publication in the study. Otherwise, if automatic
5291                         publication is switched on, default value is used for result name.
5292
5293             Returns:
5294                 Group of all found sub-shapes or a single found sub-shape.
5295
5296                 
5297             Note:
5298                 This function has a restriction on argument shapes.
5299                 If theShapeWhere has curved parts with significantly
5300                 outstanding centres (i.e. the mass centre of a part is closer to
5301                 theShapeWhat than to the part), such parts will not be found.
5302             """
5303             # Example: see GEOM_TestOthers.py
5304             anObj = None
5305             if isNewImplementation:
5306                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5307             else:
5308                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5309                 pass
5310             RaiseIfFailed("GetInPlace", self.ShapesOp)
5311             self._autoPublish(anObj, theName, "inplace")
5312             return anObj
5313
5314         ## Get sub-shape(s) of \a theShapeWhere, which are
5315         #  coincident with \a theShapeWhat or could be a part of it.
5316         #
5317         #  Implementation of this method is based on a saved history of an operation,
5318         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5319         #  arguments (an argument shape or a sub-shape of an argument shape).
5320         #  The operation could be the Partition or one of boolean operations,
5321         #  performed on simple shapes (not on compounds).
5322         #
5323         #  @param theShapeWhere Shape to find sub-shapes of.
5324         #  @param theShapeWhat Shape, specifying what to find (must be in the
5325         #                      building history of the ShapeWhere).
5326         #  @param theName Object name; when specified, this parameter is used
5327         #         for result publication in the study. Otherwise, if automatic
5328         #         publication is switched on, default value is used for result name.
5329         #
5330         #  @return Group of all found sub-shapes or a single found sub-shape.
5331         #
5332         #  @ref swig_GetInPlace "Example"
5333         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5334             """
5335             Implementation of this method is based on a saved history of an operation,
5336             produced theShapeWhere. The theShapeWhat must be among this operation's
5337             arguments (an argument shape or a sub-shape of an argument shape).
5338             The operation could be the Partition or one of boolean operations,
5339             performed on simple shapes (not on compounds).
5340
5341             Parameters:
5342                 theShapeWhere Shape to find sub-shapes of.
5343                 theShapeWhat Shape, specifying what to find (must be in the
5344                                 building history of the ShapeWhere).
5345                 theName Object name; when specified, this parameter is used
5346                         for result publication in the study. Otherwise, if automatic
5347                         publication is switched on, default value is used for result name.
5348
5349             Returns:
5350                 Group of all found sub-shapes or a single found sub-shape.
5351             """
5352             # Example: see GEOM_TestOthers.py
5353             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5354             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5355             self._autoPublish(anObj, theName, "inplace")
5356             return anObj
5357
5358         ## Get sub-shape of theShapeWhere, which is
5359         #  equal to \a theShapeWhat.
5360         #  @param theShapeWhere Shape to find sub-shape of.
5361         #  @param theShapeWhat Shape, specifying what to find.
5362         #  @param theName Object name; when specified, this parameter is used
5363         #         for result publication in the study. Otherwise, if automatic
5364         #         publication is switched on, default value is used for result name.
5365         #
5366         #  @return New GEOM.GEOM_Object for found sub-shape.
5367         #
5368         #  @ref swig_GetSame "Example"
5369         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5370             """
5371             Get sub-shape of theShapeWhere, which is
5372             equal to theShapeWhat.
5373
5374             Parameters:
5375                 theShapeWhere Shape to find sub-shape of.
5376                 theShapeWhat Shape, specifying what to find.
5377                 theName Object name; when specified, this parameter is used
5378                         for result publication in the study. Otherwise, if automatic
5379                         publication is switched on, default value is used for result name.
5380
5381             Returns:
5382                 New GEOM.GEOM_Object for found sub-shape.
5383             """
5384             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5385             RaiseIfFailed("GetSame", self.ShapesOp)
5386             self._autoPublish(anObj, theName, "sameShape")
5387             return anObj
5388
5389
5390         ## Get sub-shape indices of theShapeWhere, which is
5391         #  equal to \a theShapeWhat.
5392         #  @param theShapeWhere Shape to find sub-shape of.
5393         #  @param theShapeWhat Shape, specifying what to find.
5394         #  @return List of all found sub-shapes indices. 
5395         #
5396         #  @ref swig_GetSame "Example"
5397         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5398             """
5399             Get sub-shape indices of theShapeWhere, which is
5400             equal to theShapeWhat.
5401
5402             Parameters:
5403                 theShapeWhere Shape to find sub-shape of.
5404                 theShapeWhat Shape, specifying what to find.
5405
5406             Returns:
5407                 List of all found sub-shapes indices.
5408             """
5409             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5410             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5411             return anObj
5412
5413
5414         # end of l4_obtain
5415         ## @}
5416
5417         ## @addtogroup l4_access
5418         ## @{
5419
5420         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5421         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5422         #  @param aShape Shape to get sub-shape of.
5423         #  @param ListOfID List of sub-shapes indices.
5424         #  @param theName Object name; when specified, this parameter is used
5425         #         for result publication in the study. Otherwise, if automatic
5426         #         publication is switched on, default value is used for result name.
5427         #
5428         #  @return Found sub-shape.
5429         #
5430         #  @ref swig_all_decompose "Example"
5431         def GetSubShape(self, aShape, ListOfID, theName=None):
5432             """
5433             Obtain a composite sub-shape of aShape, composed from sub-shapes
5434             of aShape, selected by their unique IDs inside aShape
5435
5436             Parameters:
5437                 aShape Shape to get sub-shape of.
5438                 ListOfID List of sub-shapes indices.
5439                 theName Object name; when specified, this parameter is used
5440                         for result publication in the study. Otherwise, if automatic
5441                         publication is switched on, default value is used for result name.
5442
5443             Returns:
5444                 Found sub-shape.
5445             """
5446             # Example: see GEOM_TestAll.py
5447             anObj = self.AddSubShape(aShape,ListOfID)
5448             self._autoPublish(anObj, theName, "subshape")
5449             return anObj
5450
5451         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5452         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5453         #  @param aShape Shape to get sub-shape of.
5454         #  @param aSubShape Sub-shapes of aShape.
5455         #  @return ID of found sub-shape.
5456         #
5457         #  @ref swig_all_decompose "Example"
5458         def GetSubShapeID(self, aShape, aSubShape):
5459             """
5460             Obtain unique ID of sub-shape aSubShape inside aShape
5461             of aShape, selected by their unique IDs inside aShape
5462
5463             Parameters:
5464                aShape Shape to get sub-shape of.
5465                aSubShape Sub-shapes of aShape.
5466
5467             Returns:
5468                ID of found sub-shape.
5469             """
5470             # Example: see GEOM_TestAll.py
5471             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5472             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5473             return anID
5474             
5475         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5476         #  This function is provided for performance purpose. The complexity is O(n) with n
5477         #  the number of subobjects of aShape
5478         #  @param aShape Shape to get sub-shape of.
5479         #  @param aSubShapes Sub-shapes of aShape.
5480         #  @return list of IDs of found sub-shapes.
5481         #
5482         #  @ref swig_all_decompose "Example"
5483         def GetSubShapesIDs(self, aShape, aSubShapes):
5484             """
5485             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5486             This function is provided for performance purpose. The complexity is O(n) with n
5487             the number of subobjects of aShape
5488
5489             Parameters:
5490                aShape Shape to get sub-shape of.
5491                aSubShapes Sub-shapes of aShape.
5492
5493             Returns:
5494                List of IDs of found sub-shape.
5495             """
5496             # Example: see GEOM_TestAll.py
5497             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5498             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5499             return anIDs
5500
5501         # end of l4_access
5502         ## @}
5503
5504         ## @addtogroup l4_decompose
5505         ## @{
5506
5507         ## Get all sub-shapes and groups of \a theShape,
5508         #  that were created already by any other methods.
5509         #  @param theShape Any shape.
5510         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5511         #                       returned, else all found sub-shapes and groups.
5512         #  @return List of existing sub-objects of \a theShape.
5513         #
5514         #  @ref swig_all_decompose "Example"
5515         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5516             """
5517             Get all sub-shapes and groups of theShape,
5518             that were created already by any other methods.
5519
5520             Parameters:
5521                 theShape Any shape.
5522                 theGroupsOnly If this parameter is TRUE, only groups will be
5523                                  returned, else all found sub-shapes and groups.
5524
5525             Returns:
5526                 List of existing sub-objects of theShape.
5527             """
5528             # Example: see GEOM_TestAll.py
5529             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5530             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5531             return ListObj
5532
5533         ## Get all groups of \a theShape,
5534         #  that were created already by any other methods.
5535         #  @param theShape Any shape.
5536         #  @return List of existing groups of \a theShape.
5537         #
5538         #  @ref swig_all_decompose "Example"
5539         def GetGroups(self, theShape):
5540             """
5541             Get all groups of theShape,
5542             that were created already by any other methods.
5543
5544             Parameters:
5545                 theShape Any shape.
5546
5547             Returns:
5548                 List of existing groups of theShape.
5549             """
5550             # Example: see GEOM_TestAll.py
5551             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5552             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5553             return ListObj
5554
5555         ## Explode a shape on sub-shapes of a given type.
5556         #  If the shape itself matches the type, it is also returned.
5557         #  @param aShape Shape to be exploded.
5558         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
5559         #  @param theName Object name; when specified, this parameter is used
5560         #         for result publication in the study. Otherwise, if automatic
5561         #         publication is switched on, default value is used for result name.
5562         #
5563         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5564         #
5565         #  @ref swig_all_decompose "Example"
5566         def SubShapeAll(self, aShape, aType, theName=None):
5567             """
5568             Explode a shape on sub-shapes of a given type.
5569             If the shape itself matches the type, it is also returned.
5570
5571             Parameters:
5572                 aShape Shape to be exploded.
5573                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
5574                 theName Object name; when specified, this parameter is used
5575                         for result publication in the study. Otherwise, if automatic
5576                         publication is switched on, default value is used for result name.
5577
5578             Returns:
5579                 List of sub-shapes of type theShapeType, contained in theShape.
5580             """
5581             # Example: see GEOM_TestAll.py
5582             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5583             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5584             self._autoPublish(ListObj, theName, "subshape")
5585             return ListObj
5586
5587         ## Explode a shape on sub-shapes of a given type.
5588         #  @param aShape Shape to be exploded.
5589         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5590         #  @return List of IDs of sub-shapes.
5591         #
5592         #  @ref swig_all_decompose "Example"
5593         def SubShapeAllIDs(self, aShape, aType):
5594             """
5595             Explode a shape on sub-shapes of a given type.
5596
5597             Parameters:
5598                 aShape Shape to be exploded (see geompy.ShapeType)
5599                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5600
5601             Returns:
5602                 List of IDs of sub-shapes.
5603             """
5604             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5605             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5606             return ListObj
5607
5608         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5609         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
5610         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5611         #  @param aShape Shape to get sub-shape of.
5612         #  @param ListOfInd List of sub-shapes indices.
5613         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5614         #  @param theName Object name; when specified, this parameter is used
5615         #         for result publication in the study. Otherwise, if automatic
5616         #         publication is switched on, default value is used for result name.
5617         #
5618         #  @return A compound of sub-shapes of aShape.
5619         #
5620         #  @ref swig_all_decompose "Example"
5621         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5622             """
5623             Obtain a compound of sub-shapes of aShape,
5624             selected by their indices in list of all sub-shapes of type aType.
5625             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5626             
5627             Parameters:
5628                 aShape Shape to get sub-shape of.
5629                 ListOfID List of sub-shapes indices.
5630                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5631                 theName Object name; when specified, this parameter is used
5632                         for result publication in the study. Otherwise, if automatic
5633                         publication is switched on, default value is used for result name.
5634
5635             Returns:
5636                 A compound of sub-shapes of aShape.
5637             """
5638             # Example: see GEOM_TestAll.py
5639             ListOfIDs = []
5640             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5641             for ind in ListOfInd:
5642                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5643             # note: auto-publishing is done in self.GetSubShape()
5644             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5645             return anObj
5646
5647         ## Explode a shape on sub-shapes of a given type.
5648         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5649         #  If the shape itself matches the type, it is also returned.
5650         #  @param aShape Shape to be exploded.
5651         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5652         #  @param theName Object name; when specified, this parameter is used
5653         #         for result publication in the study. Otherwise, if automatic
5654         #         publication is switched on, default value is used for result name.
5655         #
5656         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5657         #
5658         #  @ref swig_SubShapeAllSorted "Example"
5659         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5660             """
5661             Explode a shape on sub-shapes of a given type.
5662             Sub-shapes will be sorted by coordinates of their gravity centers.
5663             If the shape itself matches the type, it is also returned.
5664
5665             Parameters: 
5666                 aShape Shape to be exploded.
5667                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5668                 theName Object name; when specified, this parameter is used
5669                         for result publication in the study. Otherwise, if automatic
5670                         publication is switched on, default value is used for result name.
5671
5672             Returns: 
5673                 List of sub-shapes of type theShapeType, contained in theShape.
5674             """
5675             # Example: see GEOM_TestAll.py
5676             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5677             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5678             self._autoPublish(ListObj, theName, "subshape")
5679             return ListObj
5680
5681         ## Explode a shape on sub-shapes of a given type.
5682         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5683         #  @param aShape Shape to be exploded.
5684         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5685         #  @return List of IDs of sub-shapes.
5686         #
5687         #  @ref swig_all_decompose "Example"
5688         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5689             """
5690             Explode a shape on sub-shapes of a given type.
5691             Sub-shapes will be sorted by coordinates of their gravity centers.
5692
5693             Parameters: 
5694                 aShape Shape to be exploded.
5695                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5696
5697             Returns: 
5698                 List of IDs of sub-shapes.
5699             """
5700             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5701             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5702             return ListIDs
5703
5704         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5705         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5706         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5707         #  @param aShape Shape to get sub-shape of.
5708         #  @param ListOfInd List of sub-shapes indices.
5709         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5710         #  @param theName Object name; when specified, this parameter is used
5711         #         for result publication in the study. Otherwise, if automatic
5712         #         publication is switched on, default value is used for result name.
5713         #
5714         #  @return A compound of sub-shapes of aShape.
5715         #
5716         #  @ref swig_all_decompose "Example"
5717         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5718             """
5719             Obtain a compound of sub-shapes of aShape,
5720             selected by they indices in sorted list of all sub-shapes of type aType.
5721             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5722
5723             Parameters:
5724                 aShape Shape to get sub-shape of.
5725                 ListOfID List of sub-shapes indices.
5726                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5727                 theName Object name; when specified, this parameter is used
5728                         for result publication in the study. Otherwise, if automatic
5729                         publication is switched on, default value is used for result name.
5730
5731             Returns:
5732                 A compound of sub-shapes of aShape.
5733             """
5734             # Example: see GEOM_TestAll.py
5735             ListOfIDs = []
5736             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5737             for ind in ListOfInd:
5738                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5739             # note: auto-publishing is done in self.GetSubShape()
5740             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5741             return anObj
5742
5743         ## Extract shapes (excluding the main shape) of given type.
5744         #  @param aShape The shape.
5745         #  @param aType  The shape type (see ShapeType())
5746         #  @param isSorted Boolean flag to switch sorting on/off.
5747         #  @param theName Object name; when specified, this parameter is used
5748         #         for result publication in the study. Otherwise, if automatic
5749         #         publication is switched on, default value is used for result name.
5750         #
5751         #  @return List of sub-shapes of type aType, contained in aShape.
5752         #
5753         #  @ref swig_FilletChamfer "Example"
5754         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
5755             """
5756             Extract shapes (excluding the main shape) of given type.
5757
5758             Parameters:
5759                 aShape The shape.
5760                 aType  The shape type (see geompy.ShapeType)
5761                 isSorted Boolean flag to switch sorting on/off.
5762                 theName Object name; when specified, this parameter is used
5763                         for result publication in the study. Otherwise, if automatic
5764                         publication is switched on, default value is used for result name.
5765
5766             Returns:     
5767                 List of sub-shapes of type aType, contained in aShape.
5768             """
5769             # Example: see GEOM_TestAll.py
5770             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
5771             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
5772             self._autoPublish(ListObj, theName, "subshape")
5773             return ListObj
5774
5775         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
5776         #  @param aShape Main shape.
5777         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
5778         #  @param theName Object name; when specified, this parameter is used
5779         #         for result publication in the study. Otherwise, if automatic
5780         #         publication is switched on, default value is used for result name.
5781         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5782         #
5783         #  @ref swig_all_decompose "Example"
5784         def SubShapes(self, aShape, anIDs, theName=None):
5785             """
5786             Get a set of sub-shapes defined by their unique IDs inside theMainShape
5787
5788             Parameters:
5789                 aShape Main shape.
5790                 anIDs List of unique IDs of sub-shapes inside theMainShape.
5791                 theName Object name; when specified, this parameter is used
5792                         for result publication in the study. Otherwise, if automatic
5793                         publication is switched on, default value is used for result name.
5794
5795             Returns:      
5796                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5797             """
5798             # Example: see GEOM_TestAll.py
5799             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
5800             RaiseIfFailed("SubShapes", self.ShapesOp)
5801             self._autoPublish(ListObj, theName, "subshape")
5802             return ListObj
5803
5804         # end of l4_decompose
5805         ## @}
5806
5807         ## @addtogroup l4_decompose_d
5808         ## @{
5809
5810         ## Deprecated method
5811         #  It works like SubShapeAllSortedCentres(), but wrongly
5812         #  defines centres of faces, shells and solids.
5813         def SubShapeAllSorted(self, aShape, aType, theName=None):
5814             """
5815             Deprecated method
5816             It works like geompy.SubShapeAllSortedCentres, but wrongly
5817             defines centres of faces, shells and solids.
5818             """
5819             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
5820             RaiseIfFailed("MakeExplode", self.ShapesOp)
5821             self._autoPublish(ListObj, theName, "subshape")
5822             return ListObj
5823
5824         ## Deprecated method
5825         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
5826         #  defines centres of faces, shells and solids.
5827         def SubShapeAllSortedIDs(self, aShape, aType):
5828             """
5829             Deprecated method
5830             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
5831             defines centres of faces, shells and solids.
5832             """
5833             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
5834             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5835             return ListIDs
5836
5837         ## Deprecated method
5838         #  It works like SubShapeSortedCentres(), but has a bug
5839         #  (wrongly defines centres of faces, shells and solids).
5840         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
5841             """
5842             Deprecated method
5843             It works like geompy.SubShapeSortedCentres, but has a bug
5844             (wrongly defines centres of faces, shells and solids).
5845             """
5846             ListOfIDs = []
5847             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
5848             for ind in ListOfInd:
5849                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5850             # note: auto-publishing is done in self.GetSubShape()
5851             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5852             return anObj
5853
5854         # end of l4_decompose_d
5855         ## @}
5856
5857         ## @addtogroup l3_healing
5858         ## @{
5859
5860         ## Apply a sequence of Shape Healing operators to the given object.
5861         #  @param theShape Shape to be processed.
5862         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5863         #  @param theParameters List of names of parameters
5864         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5865         #  @param theValues List of values of parameters, in the same order
5866         #                    as parameters are listed in <VAR>theParameters</VAR> list.
5867         #  @param theName Object name; when specified, this parameter is used
5868         #         for result publication in the study. Otherwise, if automatic
5869         #         publication is switched on, default value is used for result name.
5870         #
5871         #  <b> Operators and Parameters: </b> \n
5872         #
5873         #  * \b FixShape - corrects invalid shapes. \n
5874         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
5875         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
5876         #
5877         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
5878         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
5879         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
5880         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
5881         #
5882         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
5883         #    surfaces in segments using a certain angle. \n
5884         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5885         #    if Angle=180, four if Angle=90, etc). \n
5886         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
5887         #
5888         #  * \b SplitClosedFaces - splits closed faces in segments.
5889         #    The number of segments depends on the number of splitting points.\n
5890         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
5891         #
5892         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
5893         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
5894         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
5895         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
5896         #   This and the previous parameters can take the following values:\n
5897         #   \b Parametric \b Continuity \n
5898         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
5899         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
5900         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
5901         #    ruling out sharp edges).\n
5902         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
5903         #       are of the same magnitude).\n
5904         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
5905         #    or surfaces (d/du C(u)) are the same at junction. \n
5906         #   \b Geometric \b Continuity \n
5907         #   \b G1: first derivatives are proportional at junction.\n
5908         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
5909         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
5910         #   \b G2: first and second derivatives are proportional at junction.
5911         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
5912         #    continuity requires that the underlying parameterization was continuous as well.
5913         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
5914         #
5915         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
5916         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
5917         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
5918         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
5919         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
5920         #       with the specified parameters.\n
5921         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
5922         #       with the specified parameters.\n
5923         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
5924         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
5925         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
5926         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
5927         #
5928         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
5929         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
5930         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
5931         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
5932         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
5933         #
5934         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
5935         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
5936         #
5937         #
5938         #  @return New GEOM.GEOM_Object, containing processed shape.
5939         #
5940         #  \n @ref tui_shape_processing "Example"
5941         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
5942             """
5943             Apply a sequence of Shape Healing operators to the given object.
5944
5945             Parameters:
5946                 theShape Shape to be processed.
5947                 theValues List of values of parameters, in the same order
5948                           as parameters are listed in theParameters list.
5949                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5950                 theParameters List of names of parameters
5951                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5952                 theName Object name; when specified, this parameter is used
5953                         for result publication in the study. Otherwise, if automatic
5954                         publication is switched on, default value is used for result name.
5955
5956                 Operators and Parameters:
5957
5958                  * FixShape - corrects invalid shapes.
5959                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
5960                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
5961                  * FixFaceSize - removes small faces, such as spots and strips.
5962                      * FixFaceSize.Tolerance - defines minimum possible face size.
5963                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
5964                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
5965                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
5966                                 in segments using a certain angle.
5967                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5968                                           if Angle=180, four if Angle=90, etc).
5969                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
5970                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
5971                                       splitting points.
5972                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
5973                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
5974                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
5975                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
5976                      * SplitContinuity.CurveContinuity - required continuity for curves.
5977                        This and the previous parameters can take the following values:
5978                        
5979                        Parametric Continuity:
5980                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
5981                                                    coincidental. The curves or surfaces may still meet at an angle,
5982                                                    giving rise to a sharp corner or edge).
5983                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
5984                                                    are parallel, ruling out sharp edges).
5985                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
5986                                                   or surfaces are of the same magnitude).
5987                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
5988                           curves or surfaces (d/du C(u)) are the same at junction.
5989                           
5990                        Geometric Continuity:
5991                        G1: first derivatives are proportional at junction.
5992                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
5993                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
5994                        G2: first and second derivatives are proportional at junction. As the names imply,
5995                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
5996                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
5997                            geometric continuity of order n, but not vice-versa.
5998                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
5999                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
6000                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
6001                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
6002                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
6003                                                         the specified parameters.
6004                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
6005                                                         the specified parameters.
6006                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
6007                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
6008                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
6009                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
6010                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
6011                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
6012                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
6013                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
6014                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
6015                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
6016                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
6017
6018             Returns:
6019                 New GEOM.GEOM_Object, containing processed shape.
6020
6021             Note: For more information look through SALOME Geometry User's Guide->
6022                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
6023             """
6024             # Example: see GEOM_TestHealing.py
6025             theValues,Parameters = ParseList(theValues)
6026             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
6027             # To avoid script failure in case of good argument shape
6028             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6029                 return theShape
6030             RaiseIfFailed("ProcessShape", self.HealOp)
6031             for string in (theOperators + theParameters):
6032                 Parameters = ":" + Parameters
6033                 pass
6034             anObj.SetParameters(Parameters)
6035             self._autoPublish(anObj, theName, "healed")
6036             return anObj
6037
6038         ## Remove faces from the given object (shape).
6039         #  @param theObject Shape to be processed.
6040         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
6041         #                  removes ALL faces of the given object.
6042         #  @param theName Object name; when specified, this parameter is used
6043         #         for result publication in the study. Otherwise, if automatic
6044         #         publication is switched on, default value is used for result name.
6045         #
6046         #  @return New GEOM.GEOM_Object, containing processed shape.
6047         #
6048         #  @ref tui_suppress_faces "Example"
6049         def SuppressFaces(self, theObject, theFaces, theName=None):
6050             """
6051             Remove faces from the given object (shape).
6052
6053             Parameters:
6054                 theObject Shape to be processed.
6055                 theFaces Indices of faces to be removed, if EMPTY then the method
6056                          removes ALL faces of the given object.
6057                 theName Object name; when specified, this parameter is used
6058                         for result publication in the study. Otherwise, if automatic
6059                         publication is switched on, default value is used for result name.
6060
6061             Returns:
6062                 New GEOM.GEOM_Object, containing processed shape.
6063             """
6064             # Example: see GEOM_TestHealing.py
6065             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
6066             RaiseIfFailed("SuppressFaces", self.HealOp)
6067             self._autoPublish(anObj, theName, "suppressFaces")
6068             return anObj
6069
6070         ## Sewing of some shapes into single shape.
6071         #  @param ListShape Shapes to be processed.
6072         #  @param theTolerance Required tolerance value.
6073         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6074         #  @param theName Object name; when specified, this parameter is used
6075         #         for result publication in the study. Otherwise, if automatic
6076         #         publication is switched on, default value is used for result name.
6077         #
6078         #  @return New GEOM.GEOM_Object, containing processed shape.
6079         #
6080         #  @ref tui_sewing "Example"
6081         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6082             """
6083             Sewing of some shapes into single shape.
6084
6085             Parameters:
6086                 ListShape Shapes to be processed.
6087                 theTolerance Required tolerance value.
6088                 AllowNonManifold Flag that allows non-manifold sewing.
6089                 theName Object name; when specified, this parameter is used
6090                         for result publication in the study. Otherwise, if automatic
6091                         publication is switched on, default value is used for result name.
6092
6093             Returns:
6094                 New GEOM.GEOM_Object, containing processed shape.
6095             """
6096             # Example: see GEOM_TestHealing.py
6097             comp = self.MakeCompound(ListShape)
6098             # note: auto-publishing is done in self.Sew()
6099             anObj = self.Sew(comp, theTolerance, AllowNonManifold, theName)
6100             return anObj
6101
6102         ## Sewing of the given object.
6103         #  @param theObject Shape to be processed.
6104         #  @param theTolerance Required tolerance value.
6105         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6106         #  @param theName Object name; when specified, this parameter is used
6107         #         for result publication in the study. Otherwise, if automatic
6108         #         publication is switched on, default value is used for result name.
6109         #
6110         #  @return New GEOM.GEOM_Object, containing processed shape.
6111         def Sew(self, theObject, theTolerance, AllowNonManifold=False, theName=None):
6112             """
6113             Sewing of the given object.
6114
6115             Parameters:
6116                 theObject Shape to be processed.
6117                 theTolerance Required tolerance value.
6118                 AllowNonManifold Flag that allows non-manifold sewing.
6119                 theName Object name; when specified, this parameter is used
6120                         for result publication in the study. Otherwise, if automatic
6121                         publication is switched on, default value is used for result name.
6122
6123             Returns:
6124                 New GEOM.GEOM_Object, containing processed shape.
6125             """
6126             # Example: see MakeSewing() above
6127             theTolerance,Parameters = ParseParameters(theTolerance)
6128             if AllowNonManifold:
6129                 anObj = self.HealOp.SewAllowNonManifold(theObject, theTolerance)
6130             else:
6131                 anObj = self.HealOp.Sew(theObject, theTolerance)
6132             # To avoid script failure in case of good argument shape
6133             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6134                 return theObject
6135             RaiseIfFailed("Sew", self.HealOp)
6136             anObj.SetParameters(Parameters)
6137             self._autoPublish(anObj, theName, "sewed")
6138             return anObj
6139
6140         ## Rebuild the topology of theCompound of solids by removing
6141         #  of the faces that are shared by several solids.
6142         #  @param theCompound Shape to be processed.
6143         #  @param theName Object name; when specified, this parameter is used
6144         #         for result publication in the study. Otherwise, if automatic
6145         #         publication is switched on, default value is used for result name.
6146         #
6147         #  @return New GEOM.GEOM_Object, containing processed shape.
6148         #
6149         #  @ref tui_remove_webs "Example"
6150         def RemoveInternalFaces (self, theCompound, theName=None):
6151             """
6152             Rebuild the topology of theCompound of solids by removing
6153             of the faces that are shared by several solids.
6154
6155             Parameters:
6156                 theCompound Shape to be processed.
6157                 theName Object name; when specified, this parameter is used
6158                         for result publication in the study. Otherwise, if automatic
6159                         publication is switched on, default value is used for result name.
6160
6161             Returns:
6162                 New GEOM.GEOM_Object, containing processed shape.
6163             """
6164             # Example: see GEOM_TestHealing.py
6165             anObj = self.HealOp.RemoveInternalFaces(theCompound)
6166             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6167             self._autoPublish(anObj, theName, "removeWebs")
6168             return anObj
6169
6170         ## Remove internal wires and edges from the given object (face).
6171         #  @param theObject Shape to be processed.
6172         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6173         #                  removes ALL internal wires of the given object.
6174         #  @param theName Object name; when specified, this parameter is used
6175         #         for result publication in the study. Otherwise, if automatic
6176         #         publication is switched on, default value is used for result name.
6177         #
6178         #  @return New GEOM.GEOM_Object, containing processed shape.
6179         #
6180         #  @ref tui_suppress_internal_wires "Example"
6181         def SuppressInternalWires(self, theObject, theWires, theName=None):
6182             """
6183             Remove internal wires and edges from the given object (face).
6184
6185             Parameters:
6186                 theObject Shape to be processed.
6187                 theWires Indices of wires to be removed, if EMPTY then the method
6188                          removes ALL internal wires of the given object.
6189                 theName Object name; when specified, this parameter is used
6190                         for result publication in the study. Otherwise, if automatic
6191                         publication is switched on, default value is used for result name.
6192
6193             Returns:                
6194                 New GEOM.GEOM_Object, containing processed shape.
6195             """
6196             # Example: see GEOM_TestHealing.py
6197             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6198             RaiseIfFailed("RemoveIntWires", self.HealOp)
6199             self._autoPublish(anObj, theName, "suppressWires")
6200             return anObj
6201
6202         ## Remove internal closed contours (holes) from the given object.
6203         #  @param theObject Shape to be processed.
6204         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6205         #                  removes ALL internal holes of the given object
6206         #  @param theName Object name; when specified, this parameter is used
6207         #         for result publication in the study. Otherwise, if automatic
6208         #         publication is switched on, default value is used for result name.
6209         #
6210         #  @return New GEOM.GEOM_Object, containing processed shape.
6211         #
6212         #  @ref tui_suppress_holes "Example"
6213         def SuppressHoles(self, theObject, theWires, theName=None):
6214             """
6215             Remove internal closed contours (holes) from the given object.
6216
6217             Parameters:
6218                 theObject Shape to be processed.
6219                 theWires Indices of wires to be removed, if EMPTY then the method
6220                          removes ALL internal holes of the given object
6221                 theName Object name; when specified, this parameter is used
6222                         for result publication in the study. Otherwise, if automatic
6223                         publication is switched on, default value is used for result name.
6224
6225             Returns:    
6226                 New GEOM.GEOM_Object, containing processed shape.
6227             """
6228             # Example: see GEOM_TestHealing.py
6229             anObj = self.HealOp.FillHoles(theObject, theWires)
6230             RaiseIfFailed("FillHoles", self.HealOp)
6231             self._autoPublish(anObj, theName, "suppressHoles")
6232             return anObj
6233
6234         ## Close an open wire.
6235         #  @param theObject Shape to be processed.
6236         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6237         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6238         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6239         #                        If False : closure by creation of an edge between ends.
6240         #  @param theName Object name; when specified, this parameter is used
6241         #         for result publication in the study. Otherwise, if automatic
6242         #         publication is switched on, default value is used for result name.
6243         #
6244         #  @return New GEOM.GEOM_Object, containing processed shape.
6245         #
6246         #  @ref tui_close_contour "Example"
6247         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6248             """
6249             Close an open wire.
6250
6251             Parameters: 
6252                 theObject Shape to be processed.
6253                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6254                          if [ ], then theObject itself is a wire.
6255                 isCommonVertex If True  : closure by creation of a common vertex,
6256                                If False : closure by creation of an edge between ends.
6257                 theName Object name; when specified, this parameter is used
6258                         for result publication in the study. Otherwise, if automatic
6259                         publication is switched on, default value is used for result name.
6260
6261             Returns:                      
6262                 New GEOM.GEOM_Object, containing processed shape. 
6263             """
6264             # Example: see GEOM_TestHealing.py
6265             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6266             RaiseIfFailed("CloseContour", self.HealOp)
6267             self._autoPublish(anObj, theName, "closeContour")
6268             return anObj
6269
6270         ## Addition of a point to a given edge object.
6271         #  @param theObject Shape to be processed.
6272         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6273         #                      if -1, then theObject itself is the edge.
6274         #  @param theValue Value of parameter on edge or length parameter,
6275         #                  depending on \a isByParameter.
6276         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6277         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6278         #  @param theName Object name; when specified, this parameter is used
6279         #         for result publication in the study. Otherwise, if automatic
6280         #         publication is switched on, default value is used for result name.
6281         #
6282         #  @return New GEOM.GEOM_Object, containing processed shape.
6283         #
6284         #  @ref tui_add_point_on_edge "Example"
6285         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6286             """
6287             Addition of a point to a given edge object.
6288
6289             Parameters: 
6290                 theObject Shape to be processed.
6291                 theEdgeIndex Index of edge to be divided within theObject's shape,
6292                              if -1, then theObject itself is the edge.
6293                 theValue Value of parameter on edge or length parameter,
6294                          depending on isByParameter.
6295                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6296                               if FALSE : theValue is treated as a length parameter [0..1]
6297                 theName Object name; when specified, this parameter is used
6298                         for result publication in the study. Otherwise, if automatic
6299                         publication is switched on, default value is used for result name.
6300
6301             Returns:  
6302                 New GEOM.GEOM_Object, containing processed shape.
6303             """
6304             # Example: see GEOM_TestHealing.py
6305             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6306             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6307             RaiseIfFailed("DivideEdge", self.HealOp)
6308             anObj.SetParameters(Parameters)
6309             self._autoPublish(anObj, theName, "divideEdge")
6310             return anObj
6311
6312         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6313         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6314         #  @param theVertices A list of vertices to suppress. If the list
6315         #                     is empty, all vertices in a wire will be assumed.
6316         #  @param theName Object name; when specified, this parameter is used
6317         #         for result publication in the study. Otherwise, if automatic
6318         #         publication is switched on, default value is used for result name.
6319         #
6320         #  @return New GEOM.GEOM_Object with modified wire.
6321         #
6322         #  @ref tui_fuse_collinear_edges "Example"
6323         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6324             """
6325             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6326
6327             Parameters: 
6328                 theWire Wire to minimize the number of C1 continuous edges in.
6329                 theVertices A list of vertices to suppress. If the list
6330                             is empty, all vertices in a wire will be assumed.
6331                 theName Object name; when specified, this parameter is used
6332                         for result publication in the study. Otherwise, if automatic
6333                         publication is switched on, default value is used for result name.
6334
6335             Returns:  
6336                 New GEOM.GEOM_Object with modified wire.
6337             """
6338             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6339             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6340             self._autoPublish(anObj, theName, "fuseEdges")
6341             return anObj
6342
6343         ## Change orientation of the given object. Updates given shape.
6344         #  @param theObject Shape to be processed.
6345         #  @return Updated <var>theObject</var>
6346         #
6347         #  @ref swig_todo "Example"
6348         def ChangeOrientationShell(self,theObject):
6349             """
6350             Change orientation of the given object. Updates given shape.
6351
6352             Parameters: 
6353                 theObject Shape to be processed.
6354
6355             Returns:  
6356                 Updated theObject
6357             """
6358             theObject = self.HealOp.ChangeOrientation(theObject)
6359             RaiseIfFailed("ChangeOrientation", self.HealOp)
6360             pass
6361
6362         ## Change orientation of the given object.
6363         #  @param theObject Shape to be processed.
6364         #  @param theName Object name; when specified, this parameter is used
6365         #         for result publication in the study. Otherwise, if automatic
6366         #         publication is switched on, default value is used for result name.
6367         #
6368         #  @return New GEOM.GEOM_Object, containing processed shape.
6369         #
6370         #  @ref swig_todo "Example"
6371         def ChangeOrientationShellCopy(self, theObject, theName=None):
6372             """
6373             Change orientation of the given object.
6374
6375             Parameters:
6376                 theObject Shape to be processed.
6377                 theName Object name; when specified, this parameter is used
6378                         for result publication in the study. Otherwise, if automatic
6379                         publication is switched on, default value is used for result name.
6380
6381             Returns:   
6382                 New GEOM.GEOM_Object, containing processed shape.
6383             """
6384             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6385             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6386             self._autoPublish(anObj, theName, "reversed")
6387             return anObj
6388
6389         ## Try to limit tolerance of the given object by value \a theTolerance.
6390         #  @param theObject Shape to be processed.
6391         #  @param theTolerance Required tolerance value.
6392         #  @param theName Object name; when specified, this parameter is used
6393         #         for result publication in the study. Otherwise, if automatic
6394         #         publication is switched on, default value is used for result name.
6395         #
6396         #  @return New GEOM.GEOM_Object, containing processed shape.
6397         #
6398         #  @ref tui_limit_tolerance "Example"
6399         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6400             """
6401             Try to limit tolerance of the given object by value theTolerance.
6402
6403             Parameters:
6404                 theObject Shape to be processed.
6405                 theTolerance Required tolerance value.
6406                 theName Object name; when specified, this parameter is used
6407                         for result publication in the study. Otherwise, if automatic
6408                         publication is switched on, default value is used for result name.
6409
6410             Returns:   
6411                 New GEOM.GEOM_Object, containing processed shape.
6412             """
6413             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6414             RaiseIfFailed("LimitTolerance", self.HealOp)
6415             self._autoPublish(anObj, theName, "limitTolerance")
6416             return anObj
6417
6418         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6419         #  that constitute a free boundary of the given shape.
6420         #  @param theObject Shape to get free boundary of.
6421         #  @param theName Object name; when specified, this parameter is used
6422         #         for result publication in the study. Otherwise, if automatic
6423         #         publication is switched on, default value is used for result name.
6424         #
6425         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6426         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6427         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6428         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6429         #
6430         #  @ref tui_measurement_tools_page "Example"
6431         def GetFreeBoundary(self, theObject, theName=None):
6432             """
6433             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6434             that constitute a free boundary of the given shape.
6435
6436             Parameters:
6437                 theObject Shape to get free boundary of.
6438                 theName Object name; when specified, this parameter is used
6439                         for result publication in the study. Otherwise, if automatic
6440                         publication is switched on, default value is used for result name.
6441
6442             Returns: 
6443                 [status, theClosedWires, theOpenWires]
6444                  status: FALSE, if an error(s) occured during the method execution.
6445                  theClosedWires: Closed wires on the free boundary of the given shape.
6446                  theOpenWires: Open wires on the free boundary of the given shape.
6447             """
6448             # Example: see GEOM_TestHealing.py
6449             anObj = self.HealOp.GetFreeBoundary(theObject)
6450             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6451             self._autoPublish(anObj[1], theName, "closedWire")
6452             self._autoPublish(anObj[2], theName, "openWire")
6453             return anObj
6454
6455         ## Replace coincident faces in theShape by one face.
6456         #  @param theShape Initial shape.
6457         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6458         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6459         #                         otherwise all initial shapes.
6460         #  @param theName Object name; when specified, this parameter is used
6461         #         for result publication in the study. Otherwise, if automatic
6462         #         publication is switched on, default value is used for result name.
6463         #
6464         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6465         #
6466         #  @ref tui_glue_faces "Example"
6467         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6468             """
6469             Replace coincident faces in theShape by one face.
6470
6471             Parameters:
6472                 theShape Initial shape.
6473                 theTolerance Maximum distance between faces, which can be considered as coincident.
6474                 doKeepNonSolids If FALSE, only solids will present in the result,
6475                                 otherwise all initial shapes.
6476                 theName Object name; when specified, this parameter is used
6477                         for result publication in the study. Otherwise, if automatic
6478                         publication is switched on, default value is used for result name.
6479
6480             Returns:
6481                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6482             """
6483             # Example: see GEOM_Spanner.py
6484             theTolerance,Parameters = ParseParameters(theTolerance)
6485             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6486             if anObj is None:
6487                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6488             anObj.SetParameters(Parameters)
6489             self._autoPublish(anObj, theName, "glueFaces")
6490             return anObj
6491
6492         ## Find coincident faces in theShape for possible gluing.
6493         #  @param theShape Initial shape.
6494         #  @param theTolerance Maximum distance between faces,
6495         #                      which can be considered as coincident.
6496         #  @param theName Object name; when specified, this parameter is used
6497         #         for result publication in the study. Otherwise, if automatic
6498         #         publication is switched on, default value is used for result name.
6499         #
6500         #  @return GEOM.ListOfGO
6501         #
6502         #  @ref tui_glue_faces "Example"
6503         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6504             """
6505             Find coincident faces in theShape for possible gluing.
6506
6507             Parameters:
6508                 theShape Initial shape.
6509                 theTolerance Maximum distance between faces,
6510                              which can be considered as coincident.
6511                 theName Object name; when specified, this parameter is used
6512                         for result publication in the study. Otherwise, if automatic
6513                         publication is switched on, default value is used for result name.
6514
6515             Returns:                    
6516                 GEOM.ListOfGO
6517             """
6518             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6519             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6520             self._autoPublish(anObj, theName, "facesToGlue")
6521             return anObj
6522
6523         ## Replace coincident faces in theShape by one face
6524         #  in compliance with given list of faces
6525         #  @param theShape Initial shape.
6526         #  @param theTolerance Maximum distance between faces,
6527         #                      which can be considered as coincident.
6528         #  @param theFaces List of faces for gluing.
6529         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6530         #                         otherwise all initial shapes.
6531         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6532         #                        will be glued, otherwise only the edges,
6533         #                        belonging to <VAR>theFaces</VAR>.
6534         #  @param theName Object name; when specified, this parameter is used
6535         #         for result publication in the study. Otherwise, if automatic
6536         #         publication is switched on, default value is used for result name.
6537         #
6538         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6539         #          without some faces.
6540         #
6541         #  @ref tui_glue_faces "Example"
6542         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6543                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6544             """
6545             Replace coincident faces in theShape by one face
6546             in compliance with given list of faces
6547
6548             Parameters:
6549                 theShape Initial shape.
6550                 theTolerance Maximum distance between faces,
6551                              which can be considered as coincident.
6552                 theFaces List of faces for gluing.
6553                 doKeepNonSolids If FALSE, only solids will present in the result,
6554                                 otherwise all initial shapes.
6555                 doGlueAllEdges If TRUE, all coincident edges of theShape
6556                                will be glued, otherwise only the edges,
6557                                belonging to theFaces.
6558                 theName Object name; when specified, this parameter is used
6559                         for result publication in the study. Otherwise, if automatic
6560                         publication is switched on, default value is used for result name.
6561
6562             Returns:
6563                 New GEOM.GEOM_Object, containing a copy of theShape
6564                     without some faces.
6565             """
6566             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6567                                                       doKeepNonSolids, doGlueAllEdges)
6568             if anObj is None:
6569                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6570             self._autoPublish(anObj, theName, "glueFaces")
6571             return anObj
6572
6573         ## Replace coincident edges in theShape by one edge.
6574         #  @param theShape Initial shape.
6575         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6576         #  @param theName Object name; when specified, this parameter is used
6577         #         for result publication in the study. Otherwise, if automatic
6578         #         publication is switched on, default value is used for result name.
6579         #
6580         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6581         #
6582         #  @ref tui_glue_edges "Example"
6583         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6584             """
6585             Replace coincident edges in theShape by one edge.
6586
6587             Parameters:
6588                 theShape Initial shape.
6589                 theTolerance Maximum distance between edges, which can be considered as coincident.
6590                 theName Object name; when specified, this parameter is used
6591                         for result publication in the study. Otherwise, if automatic
6592                         publication is switched on, default value is used for result name.
6593
6594             Returns:    
6595                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6596             """
6597             theTolerance,Parameters = ParseParameters(theTolerance)
6598             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6599             if anObj is None:
6600                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6601             anObj.SetParameters(Parameters)
6602             self._autoPublish(anObj, theName, "glueEdges")
6603             return anObj
6604
6605         ## Find coincident edges in theShape for possible gluing.
6606         #  @param theShape Initial shape.
6607         #  @param theTolerance Maximum distance between edges,
6608         #                      which can be considered as coincident.
6609         #  @param theName Object name; when specified, this parameter is used
6610         #         for result publication in the study. Otherwise, if automatic
6611         #         publication is switched on, default value is used for result name.
6612         #
6613         #  @return GEOM.ListOfGO
6614         #
6615         #  @ref tui_glue_edges "Example"
6616         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6617             """
6618             Find coincident edges in theShape for possible gluing.
6619
6620             Parameters:
6621                 theShape Initial shape.
6622                 theTolerance Maximum distance between edges,
6623                              which can be considered as coincident.
6624                 theName Object name; when specified, this parameter is used
6625                         for result publication in the study. Otherwise, if automatic
6626                         publication is switched on, default value is used for result name.
6627
6628             Returns:                         
6629                 GEOM.ListOfGO
6630             """
6631             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6632             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6633             self._autoPublish(anObj, theName, "edgesToGlue")
6634             return anObj
6635
6636         ## Replace coincident edges in theShape by one edge
6637         #  in compliance with given list of edges.
6638         #  @param theShape Initial shape.
6639         #  @param theTolerance Maximum distance between edges,
6640         #                      which can be considered as coincident.
6641         #  @param theEdges List of edges for gluing.
6642         #  @param theName Object name; when specified, this parameter is used
6643         #         for result publication in the study. Otherwise, if automatic
6644         #         publication is switched on, default value is used for result name.
6645         #
6646         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6647         #          without some edges.
6648         #
6649         #  @ref tui_glue_edges "Example"
6650         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6651             """
6652             Replace coincident edges in theShape by one edge
6653             in compliance with given list of edges.
6654
6655             Parameters:
6656                 theShape Initial shape.
6657                 theTolerance Maximum distance between edges,
6658                              which can be considered as coincident.
6659                 theEdges List of edges for gluing.
6660                 theName Object name; when specified, this parameter is used
6661                         for result publication in the study. Otherwise, if automatic
6662                         publication is switched on, default value is used for result name.
6663
6664             Returns:  
6665                 New GEOM.GEOM_Object, containing a copy of theShape
6666                 without some edges.
6667             """
6668             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6669             if anObj is None:
6670                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6671             self._autoPublish(anObj, theName, "glueEdges")
6672             return anObj
6673
6674         # end of l3_healing
6675         ## @}
6676
6677         ## @addtogroup l3_boolean Boolean Operations
6678         ## @{
6679
6680         # -----------------------------------------------------------------------------
6681         # Boolean (Common, Cut, Fuse, Section)
6682         # -----------------------------------------------------------------------------
6683
6684         ## Perform one of boolean operations on two given shapes.
6685         #  @param theShape1 First argument for boolean operation.
6686         #  @param theShape2 Second argument for boolean operation.
6687         #  @param theOperation Indicates the operation to be done:\n
6688         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6689         #  @param checkSelfInte The flag that tells if the arguments should
6690         #         be checked for self-intersection prior to the operation.
6691         #  @param theName Object name; when specified, this parameter is used
6692         #         for result publication in the study. Otherwise, if automatic
6693         #         publication is switched on, default value is used for result name.
6694         #
6695         #  @note This algorithm doesn't find all types of self-intersections.
6696         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6697         #        vertex/face and edge/face intersections. Face/face
6698         #        intersections detection is switched off as it is a
6699         #        time-consuming operation that gives an impact on performance.
6700         #        To find all self-intersections please use
6701         #        CheckSelfIntersections() method.
6702         #
6703         #  @return New GEOM.GEOM_Object, containing the result shape.
6704         #
6705         #  @ref tui_fuse "Example"
6706         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
6707             """
6708             Perform one of boolean operations on two given shapes.
6709
6710             Parameters: 
6711                 theShape1 First argument for boolean operation.
6712                 theShape2 Second argument for boolean operation.
6713                 theOperation Indicates the operation to be done:
6714                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6715                 checkSelfInte The flag that tells if the arguments should
6716                               be checked for self-intersection prior to
6717                               the operation.
6718                 theName Object name; when specified, this parameter is used
6719                         for result publication in the study. Otherwise, if automatic
6720                         publication is switched on, default value is used for result name.
6721
6722             Note:
6723                     This algorithm doesn't find all types of self-intersections.
6724                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6725                     vertex/face and edge/face intersections. Face/face
6726                     intersections detection is switched off as it is a
6727                     time-consuming operation that gives an impact on performance.
6728                     To find all self-intersections please use
6729                     CheckSelfIntersections() method.
6730
6731             Returns:   
6732                 New GEOM.GEOM_Object, containing the result shape.
6733             """
6734             # Example: see GEOM_TestAll.py
6735             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
6736             RaiseIfFailed("MakeBoolean", self.BoolOp)
6737             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
6738             self._autoPublish(anObj, theName, def_names[theOperation])
6739             return anObj
6740
6741         ## Perform Common boolean operation on two given shapes.
6742         #  @param theShape1 First argument for boolean operation.
6743         #  @param theShape2 Second argument for boolean operation.
6744         #  @param checkSelfInte The flag that tells if the arguments should
6745         #         be checked for self-intersection prior to the operation.
6746         #  @param theName Object name; when specified, this parameter is used
6747         #         for result publication in the study. Otherwise, if automatic
6748         #         publication is switched on, default value is used for result name.
6749         #
6750         #  @note This algorithm doesn't find all types of self-intersections.
6751         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6752         #        vertex/face and edge/face intersections. Face/face
6753         #        intersections detection is switched off as it is a
6754         #        time-consuming operation that gives an impact on performance.
6755         #        To find all self-intersections please use
6756         #        CheckSelfIntersections() method.
6757         #
6758         #  @return New GEOM.GEOM_Object, containing the result shape.
6759         #
6760         #  @ref tui_common "Example 1"
6761         #  \n @ref swig_MakeCommon "Example 2"
6762         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6763             """
6764             Perform Common boolean operation on two given shapes.
6765
6766             Parameters: 
6767                 theShape1 First argument for boolean operation.
6768                 theShape2 Second argument for boolean operation.
6769                 checkSelfInte The flag that tells if the arguments should
6770                               be checked for self-intersection prior to
6771                               the operation.
6772                 theName Object name; when specified, this parameter is used
6773                         for result publication in the study. Otherwise, if automatic
6774                         publication is switched on, default value is used for result name.
6775
6776             Note:
6777                     This algorithm doesn't find all types of self-intersections.
6778                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6779                     vertex/face and edge/face intersections. Face/face
6780                     intersections detection is switched off as it is a
6781                     time-consuming operation that gives an impact on performance.
6782                     To find all self-intersections please use
6783                     CheckSelfIntersections() method.
6784
6785             Returns:   
6786                 New GEOM.GEOM_Object, containing the result shape.
6787             """
6788             # Example: see GEOM_TestOthers.py
6789             # note: auto-publishing is done in self.MakeBoolean()
6790             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
6791
6792         ## Perform Cut boolean operation on two given shapes.
6793         #  @param theShape1 First argument for boolean operation.
6794         #  @param theShape2 Second argument for boolean operation.
6795         #  @param checkSelfInte The flag that tells if the arguments should
6796         #         be checked for self-intersection prior to the operation.
6797         #  @param theName Object name; when specified, this parameter is used
6798         #         for result publication in the study. Otherwise, if automatic
6799         #         publication is switched on, default value is used for result name.
6800         #
6801         #  @note This algorithm doesn't find all types of self-intersections.
6802         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6803         #        vertex/face and edge/face intersections. Face/face
6804         #        intersections detection is switched off as it is a
6805         #        time-consuming operation that gives an impact on performance.
6806         #        To find all self-intersections please use
6807         #        CheckSelfIntersections() method.
6808         #
6809         #  @return New GEOM.GEOM_Object, containing the result shape.
6810         #
6811         #  @ref tui_cut "Example 1"
6812         #  \n @ref swig_MakeCommon "Example 2"
6813         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6814             """
6815             Perform Cut boolean operation on two given shapes.
6816
6817             Parameters: 
6818                 theShape1 First argument for boolean operation.
6819                 theShape2 Second argument for boolean operation.
6820                 checkSelfInte The flag that tells if the arguments should
6821                               be checked for self-intersection prior to
6822                               the operation.
6823                 theName Object name; when specified, this parameter is used
6824                         for result publication in the study. Otherwise, if automatic
6825                         publication is switched on, default value is used for result name.
6826
6827             Note:
6828                     This algorithm doesn't find all types of self-intersections.
6829                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6830                     vertex/face and edge/face intersections. Face/face
6831                     intersections detection is switched off as it is a
6832                     time-consuming operation that gives an impact on performance.
6833                     To find all self-intersections please use
6834                     CheckSelfIntersections() method.
6835
6836             Returns:   
6837                 New GEOM.GEOM_Object, containing the result shape.
6838             
6839             """
6840             # Example: see GEOM_TestOthers.py
6841             # note: auto-publishing is done in self.MakeBoolean()
6842             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
6843
6844         ## Perform Fuse boolean operation on two given shapes.
6845         #  @param theShape1 First argument for boolean operation.
6846         #  @param theShape2 Second argument for boolean operation.
6847         #  @param checkSelfInte The flag that tells if the arguments should
6848         #         be checked for self-intersection prior to the operation.
6849         #  @param theName Object name; when specified, this parameter is used
6850         #         for result publication in the study. Otherwise, if automatic
6851         #         publication is switched on, default value is used for result name.
6852         #
6853         #  @note This algorithm doesn't find all types of self-intersections.
6854         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6855         #        vertex/face and edge/face intersections. Face/face
6856         #        intersections detection is switched off as it is a
6857         #        time-consuming operation that gives an impact on performance.
6858         #        To find all self-intersections please use
6859         #        CheckSelfIntersections() method.
6860         #
6861         #  @return New GEOM.GEOM_Object, containing the result shape.
6862         #
6863         #  @ref tui_fuse "Example 1"
6864         #  \n @ref swig_MakeCommon "Example 2"
6865         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6866             """
6867             Perform Fuse boolean operation on two given shapes.
6868
6869             Parameters: 
6870                 theShape1 First argument for boolean operation.
6871                 theShape2 Second argument for boolean operation.
6872                 checkSelfInte The flag that tells if the arguments should
6873                               be checked for self-intersection prior to
6874                               the operation.
6875                 theName Object name; when specified, this parameter is used
6876                         for result publication in the study. Otherwise, if automatic
6877                         publication is switched on, default value is used for result name.
6878
6879             Note:
6880                     This algorithm doesn't find all types of self-intersections.
6881                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6882                     vertex/face and edge/face intersections. Face/face
6883                     intersections detection is switched off as it is a
6884                     time-consuming operation that gives an impact on performance.
6885                     To find all self-intersections please use
6886                     CheckSelfIntersections() method.
6887
6888             Returns:   
6889                 New GEOM.GEOM_Object, containing the result shape.
6890             
6891             """
6892             # Example: see GEOM_TestOthers.py
6893             # note: auto-publishing is done in self.MakeBoolean()
6894             return self.MakeBoolean(theShape1, theShape2, 3, checkSelfInte, theName)
6895
6896         ## Perform Section boolean operation on two given shapes.
6897         #  @param theShape1 First argument for boolean operation.
6898         #  @param theShape2 Second argument for boolean operation.
6899         #  @param checkSelfInte The flag that tells if the arguments should
6900         #         be checked for self-intersection prior to the operation.
6901         #  @param theName Object name; when specified, this parameter is used
6902         #         for result publication in the study. Otherwise, if automatic
6903         #         publication is switched on, default value is used for result name.
6904         #
6905         #  @note This algorithm doesn't find all types of self-intersections.
6906         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6907         #        vertex/face and edge/face intersections. Face/face
6908         #        intersections detection is switched off as it is a
6909         #        time-consuming operation that gives an impact on performance.
6910         #        To find all self-intersections please use
6911         #        CheckSelfIntersections() method.
6912         #
6913         #  @return New GEOM.GEOM_Object, containing the result shape.
6914         #
6915         #  @ref tui_section "Example 1"
6916         #  \n @ref swig_MakeCommon "Example 2"
6917         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6918             """
6919             Perform Section boolean operation on two given shapes.
6920
6921             Parameters: 
6922                 theShape1 First argument for boolean operation.
6923                 theShape2 Second argument for boolean operation.
6924                 checkSelfInte The flag that tells if the arguments should
6925                               be checked for self-intersection prior to
6926                               the operation.
6927                 theName Object name; when specified, this parameter is used
6928                         for result publication in the study. Otherwise, if automatic
6929                         publication is switched on, default value is used for result name.
6930
6931             Note:
6932                     This algorithm doesn't find all types of self-intersections.
6933                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6934                     vertex/face and edge/face intersections. Face/face
6935                     intersections detection is switched off as it is a
6936                     time-consuming operation that gives an impact on performance.
6937                     To find all self-intersections please use
6938                     CheckSelfIntersections() method.
6939
6940             Returns:   
6941                 New GEOM.GEOM_Object, containing the result shape.
6942             
6943             """
6944             # Example: see GEOM_TestOthers.py
6945             # note: auto-publishing is done in self.MakeBoolean()
6946             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
6947
6948         ## Perform Fuse boolean operation on the list of shapes.
6949         #  @param theShapesList Shapes to be fused.
6950         #  @param checkSelfInte The flag that tells if the arguments should
6951         #         be checked for self-intersection prior to the operation.
6952         #  @param theName Object name; when specified, this parameter is used
6953         #         for result publication in the study. Otherwise, if automatic
6954         #         publication is switched on, default value is used for result name.
6955         #
6956         #  @note This algorithm doesn't find all types of self-intersections.
6957         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6958         #        vertex/face and edge/face intersections. Face/face
6959         #        intersections detection is switched off as it is a
6960         #        time-consuming operation that gives an impact on performance.
6961         #        To find all self-intersections please use
6962         #        CheckSelfIntersections() method.
6963         #
6964         #  @return New GEOM.GEOM_Object, containing the result shape.
6965         #
6966         #  @ref tui_fuse "Example 1"
6967         #  \n @ref swig_MakeCommon "Example 2"
6968         def MakeFuseList(self, theShapesList, checkSelfInte=False, theName=None):
6969             """
6970             Perform Fuse boolean operation on the list of shapes.
6971
6972             Parameters: 
6973                 theShapesList Shapes to be fused.
6974                 checkSelfInte The flag that tells if the arguments should
6975                               be checked for self-intersection prior to
6976                               the operation.
6977                 theName Object name; when specified, this parameter is used
6978                         for result publication in the study. Otherwise, if automatic
6979                         publication is switched on, default value is used for result name.
6980
6981             Note:
6982                     This algorithm doesn't find all types of self-intersections.
6983                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6984                     vertex/face and edge/face intersections. Face/face
6985                     intersections detection is switched off as it is a
6986                     time-consuming operation that gives an impact on performance.
6987                     To find all self-intersections please use
6988                     CheckSelfIntersections() method.
6989
6990             Returns:   
6991                 New GEOM.GEOM_Object, containing the result shape.
6992             
6993             """
6994             # Example: see GEOM_TestOthers.py
6995             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte)
6996             RaiseIfFailed("MakeFuseList", self.BoolOp)
6997             self._autoPublish(anObj, theName, "fuse")
6998             return anObj
6999
7000         ## Perform Common boolean operation on the list of shapes.
7001         #  @param theShapesList Shapes for Common operation.
7002         #  @param checkSelfInte The flag that tells if the arguments should
7003         #         be checked for self-intersection prior to the operation.
7004         #  @param theName Object name; when specified, this parameter is used
7005         #         for result publication in the study. Otherwise, if automatic
7006         #         publication is switched on, default value is used for result name.
7007         #
7008         #  @note This algorithm doesn't find all types of self-intersections.
7009         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7010         #        vertex/face and edge/face intersections. Face/face
7011         #        intersections detection is switched off as it is a
7012         #        time-consuming operation that gives an impact on performance.
7013         #        To find all self-intersections please use
7014         #        CheckSelfIntersections() method.
7015         #
7016         #  @return New GEOM.GEOM_Object, containing the result shape.
7017         #
7018         #  @ref tui_common "Example 1"
7019         #  \n @ref swig_MakeCommon "Example 2"
7020         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
7021             """
7022             Perform Common boolean operation on the list of shapes.
7023
7024             Parameters: 
7025                 theShapesList Shapes for Common operation.
7026                 checkSelfInte The flag that tells if the arguments should
7027                               be checked for self-intersection prior to
7028                               the operation.
7029                 theName Object name; when specified, this parameter is used
7030                         for result publication in the study. Otherwise, if automatic
7031                         publication is switched on, default value is used for result name.
7032
7033             Note:
7034                     This algorithm doesn't find all types of self-intersections.
7035                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7036                     vertex/face and edge/face intersections. Face/face
7037                     intersections detection is switched off as it is a
7038                     time-consuming operation that gives an impact on performance.
7039                     To find all self-intersections please use
7040                     CheckSelfIntersections() method.
7041
7042             Returns:   
7043                 New GEOM.GEOM_Object, containing the result shape.
7044             
7045             """
7046             # Example: see GEOM_TestOthers.py
7047             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
7048             RaiseIfFailed("MakeCommonList", self.BoolOp)
7049             self._autoPublish(anObj, theName, "common")
7050             return anObj
7051
7052         ## Perform Cut boolean operation on one object and the list of tools.
7053         #  @param theMainShape The object of the operation.
7054         #  @param theShapesList The list of tools of the operation.
7055         #  @param checkSelfInte The flag that tells if the arguments should
7056         #         be checked for self-intersection prior to the operation.
7057         #  @param theName Object name; when specified, this parameter is used
7058         #         for result publication in the study. Otherwise, if automatic
7059         #         publication is switched on, default value is used for result name.
7060         #
7061         #  @note This algorithm doesn't find all types of self-intersections.
7062         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7063         #        vertex/face and edge/face intersections. Face/face
7064         #        intersections detection is switched off as it is a
7065         #        time-consuming operation that gives an impact on performance.
7066         #        To find all self-intersections please use
7067         #        CheckSelfIntersections() method.
7068         #
7069         #  @return New GEOM.GEOM_Object, containing the result shape.
7070         #
7071         #  @ref tui_cut "Example 1"
7072         #  \n @ref swig_MakeCommon "Example 2"
7073         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
7074             """
7075             Perform Cut boolean operation on one object and the list of tools.
7076
7077             Parameters: 
7078                 theMainShape The object of the operation.
7079                 theShapesList The list of tools of the operation.
7080                 checkSelfInte The flag that tells if the arguments should
7081                               be checked for self-intersection prior to
7082                               the operation.
7083                 theName Object name; when specified, this parameter is used
7084                         for result publication in the study. Otherwise, if automatic
7085                         publication is switched on, default value is used for result name.
7086
7087             Note:
7088                     This algorithm doesn't find all types of self-intersections.
7089                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7090                     vertex/face and edge/face intersections. Face/face
7091                     intersections detection is switched off as it is a
7092                     time-consuming operation that gives an impact on performance.
7093                     To find all self-intersections please use
7094                     CheckSelfIntersections() method.
7095
7096             Returns:   
7097                 New GEOM.GEOM_Object, containing the result shape.
7098             
7099             """
7100             # Example: see GEOM_TestOthers.py
7101             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
7102             RaiseIfFailed("MakeCutList", self.BoolOp)
7103             self._autoPublish(anObj, theName, "cut")
7104             return anObj
7105
7106         # end of l3_boolean
7107         ## @}
7108
7109         ## @addtogroup l3_basic_op
7110         ## @{
7111
7112         ## Perform partition operation.
7113         #  @param ListShapes Shapes to be intersected.
7114         #  @param ListTools Shapes to intersect theShapes.
7115         #  @param Limit Type of resulting shapes (see ShapeType()).\n
7116         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
7117         #         type will be detected automatically.
7118         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
7119         #                             target type (equal to Limit) are kept in the result,
7120         #                             else standalone shapes of lower dimension
7121         #                             are kept also (if they exist).
7122         #
7123         #  @param theName Object name; when specified, this parameter is used
7124         #         for result publication in the study. Otherwise, if automatic
7125         #         publication is switched on, default value is used for result name.
7126         #
7127         #  @note Each compound from ListShapes and ListTools will be exploded
7128         #        in order to avoid possible intersection between shapes from this compound.
7129         #
7130         #  After implementation new version of PartitionAlgo (October 2006)
7131         #  other parameters are ignored by current functionality. They are kept
7132         #  in this function only for support old versions.
7133         #      @param ListKeepInside Shapes, outside which the results will be deleted.
7134         #         Each shape from theKeepInside must belong to theShapes also.
7135         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
7136         #         Each shape from theRemoveInside must belong to theShapes also.
7137         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
7138         #      @param ListMaterials Material indices for each shape. Make sence,
7139         #         only if theRemoveWebs is TRUE.
7140         #
7141         #  @return New GEOM.GEOM_Object, containing the result shapes.
7142         #
7143         #  @ref tui_partition "Example"
7144         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7145                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7146                           KeepNonlimitShapes=0, theName=None):
7147             """
7148             Perform partition operation.
7149
7150             Parameters: 
7151                 ListShapes Shapes to be intersected.
7152                 ListTools Shapes to intersect theShapes.
7153                 Limit Type of resulting shapes (see geompy.ShapeType)
7154                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
7155                       type will be detected automatically.
7156                 KeepNonlimitShapes if this parameter == 0, then only shapes of
7157                                     target type (equal to Limit) are kept in the result,
7158                                     else standalone shapes of lower dimension
7159                                     are kept also (if they exist).
7160
7161                 theName Object name; when specified, this parameter is used
7162                         for result publication in the study. Otherwise, if automatic
7163                         publication is switched on, default value is used for result name.
7164             Note:
7165                     Each compound from ListShapes and ListTools will be exploded
7166                     in order to avoid possible intersection between shapes from
7167                     this compound.
7168                     
7169             After implementation new version of PartitionAlgo (October 2006) other
7170             parameters are ignored by current functionality. They are kept in this
7171             function only for support old versions.
7172             
7173             Ignored parameters:
7174                 ListKeepInside Shapes, outside which the results will be deleted.
7175                                Each shape from theKeepInside must belong to theShapes also.
7176                 ListRemoveInside Shapes, inside which the results will be deleted.
7177                                  Each shape from theRemoveInside must belong to theShapes also.
7178                 RemoveWebs If TRUE, perform Glue 3D algorithm.
7179                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
7180
7181             Returns:   
7182                 New GEOM.GEOM_Object, containing the result shapes.
7183             """
7184             # Example: see GEOM_TestAll.py
7185             if Limit == self.ShapeType["AUTO"]:
7186                 # automatic detection of the most appropriate shape limit type
7187                 lim = GEOM.SHAPE
7188                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7189                 Limit = EnumToLong(lim)
7190                 pass
7191             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
7192                                               ListKeepInside, ListRemoveInside,
7193                                               Limit, RemoveWebs, ListMaterials,
7194                                               KeepNonlimitShapes);
7195             RaiseIfFailed("MakePartition", self.BoolOp)
7196             self._autoPublish(anObj, theName, "partition")
7197             return anObj
7198
7199         ## Perform partition operation.
7200         #  This method may be useful if it is needed to make a partition for
7201         #  compound contains nonintersected shapes. Performance will be better
7202         #  since intersection between shapes from compound is not performed.
7203         #
7204         #  Description of all parameters as in previous method MakePartition().
7205         #  One additional parameter is provided:
7206         #  @param checkSelfInte The flag that tells if the arguments should
7207         #         be checked for self-intersection prior to the operation.
7208         #
7209         #  @note This algorithm doesn't find all types of self-intersections.
7210         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7211         #        vertex/face and edge/face intersections. Face/face
7212         #        intersections detection is switched off as it is a
7213         #        time-consuming operation that gives an impact on performance.
7214         #        To find all self-intersections please use
7215         #        CheckSelfIntersections() method.
7216         #
7217         #  @note Passed compounds (via ListShapes or via ListTools)
7218         #           have to consist of nonintersecting shapes.
7219         #
7220         #  @return New GEOM.GEOM_Object, containing the result shapes.
7221         #
7222         #  @ref swig_todo "Example"
7223         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
7224                                                  ListKeepInside=[], ListRemoveInside=[],
7225                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
7226                                                  ListMaterials=[], KeepNonlimitShapes=0,
7227                                                  checkSelfInte=False, theName=None):
7228             """
7229             Perform partition operation.
7230             This method may be useful if it is needed to make a partition for
7231             compound contains nonintersected shapes. Performance will be better
7232             since intersection between shapes from compound is not performed.
7233
7234             Parameters: 
7235                 Description of all parameters as in method geompy.MakePartition.
7236                 One additional parameter is provided:
7237                 checkSelfInte The flag that tells if the arguments should
7238                               be checked for self-intersection prior to
7239                               the operation.
7240
7241             Note:
7242                     This algorithm doesn't find all types of self-intersections.
7243                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7244                     vertex/face and edge/face intersections. Face/face
7245                     intersections detection is switched off as it is a
7246                     time-consuming operation that gives an impact on performance.
7247                     To find all self-intersections please use
7248                     CheckSelfIntersections() method.
7249         
7250             NOTE:
7251                 Passed compounds (via ListShapes or via ListTools)
7252                 have to consist of nonintersecting shapes.
7253
7254             Returns:   
7255                 New GEOM.GEOM_Object, containing the result shapes.
7256             """
7257             if Limit == self.ShapeType["AUTO"]:
7258                 # automatic detection of the most appropriate shape limit type
7259                 lim = GEOM.SHAPE
7260                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7261                 Limit = EnumToLong(lim)
7262                 pass
7263             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
7264                                                                      ListKeepInside, ListRemoveInside,
7265                                                                      Limit, RemoveWebs, ListMaterials,
7266                                                                      KeepNonlimitShapes, checkSelfInte);
7267             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
7268             self._autoPublish(anObj, theName, "partition")
7269             return anObj
7270
7271         ## See method MakePartition() for more information.
7272         #
7273         #  @ref tui_partition "Example 1"
7274         #  \n @ref swig_Partition "Example 2"
7275         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7276                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7277                       KeepNonlimitShapes=0, theName=None):
7278             """
7279             See method geompy.MakePartition for more information.
7280             """
7281             # Example: see GEOM_TestOthers.py
7282             # note: auto-publishing is done in self.MakePartition()
7283             anObj = self.MakePartition(ListShapes, ListTools,
7284                                        ListKeepInside, ListRemoveInside,
7285                                        Limit, RemoveWebs, ListMaterials,
7286                                        KeepNonlimitShapes, theName);
7287             return anObj
7288
7289         ## Perform partition of the Shape with the Plane
7290         #  @param theShape Shape to be intersected.
7291         #  @param thePlane Tool shape, to intersect theShape.
7292         #  @param theName Object name; when specified, this parameter is used
7293         #         for result publication in the study. Otherwise, if automatic
7294         #         publication is switched on, default value is used for result name.
7295         #
7296         #  @return New GEOM.GEOM_Object, containing the result shape.
7297         #
7298         #  @ref tui_partition "Example"
7299         def MakeHalfPartition(self, theShape, thePlane, theName=None):
7300             """
7301             Perform partition of the Shape with the Plane
7302
7303             Parameters: 
7304                 theShape Shape to be intersected.
7305                 thePlane Tool shape, to intersect theShape.
7306                 theName Object name; when specified, this parameter is used
7307                         for result publication in the study. Otherwise, if automatic
7308                         publication is switched on, default value is used for result name.
7309
7310             Returns:  
7311                 New GEOM.GEOM_Object, containing the result shape.
7312             """
7313             # Example: see GEOM_TestAll.py
7314             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
7315             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7316             self._autoPublish(anObj, theName, "partition")
7317             return anObj
7318
7319         # end of l3_basic_op
7320         ## @}
7321
7322         ## @addtogroup l3_transform
7323         ## @{
7324
7325         ## Translate the given object along the vector, specified
7326         #  by its end points.
7327         #  @param theObject The object to be translated.
7328         #  @param thePoint1 Start point of translation vector.
7329         #  @param thePoint2 End point of translation vector.
7330         #  @param theCopy Flag used to translate object itself or create a copy.
7331         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7332         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7333         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7334             """
7335             Translate the given object along the vector, specified by its end points.
7336
7337             Parameters: 
7338                 theObject The object to be translated.
7339                 thePoint1 Start point of translation vector.
7340                 thePoint2 End point of translation vector.
7341                 theCopy Flag used to translate object itself or create a copy.
7342
7343             Returns: 
7344                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7345                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7346             """
7347             if theCopy:
7348                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7349             else:
7350                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7351             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7352             return anObj
7353
7354         ## Translate the given object along the vector, specified
7355         #  by its end points, creating its copy before the translation.
7356         #  @param theObject The object to be translated.
7357         #  @param thePoint1 Start point of translation vector.
7358         #  @param thePoint2 End point of translation vector.
7359         #  @param theName Object name; when specified, this parameter is used
7360         #         for result publication in the study. Otherwise, if automatic
7361         #         publication is switched on, default value is used for result name.
7362         #
7363         #  @return New GEOM.GEOM_Object, containing the translated object.
7364         #
7365         #  @ref tui_translation "Example 1"
7366         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7367         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7368             """
7369             Translate the given object along the vector, specified
7370             by its end points, creating its copy before the translation.
7371
7372             Parameters: 
7373                 theObject The object to be translated.
7374                 thePoint1 Start point of translation vector.
7375                 thePoint2 End point of translation vector.
7376                 theName Object name; when specified, this parameter is used
7377                         for result publication in the study. Otherwise, if automatic
7378                         publication is switched on, default value is used for result name.
7379
7380             Returns:  
7381                 New GEOM.GEOM_Object, containing the translated object.
7382             """
7383             # Example: see GEOM_TestAll.py
7384             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7385             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7386             self._autoPublish(anObj, theName, "translated")
7387             return anObj
7388
7389         ## Translate the given object along the vector, specified by its components.
7390         #  @param theObject The object to be translated.
7391         #  @param theDX,theDY,theDZ Components of translation vector.
7392         #  @param theCopy Flag used to translate object itself or create a copy.
7393         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7394         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7395         #
7396         #  @ref tui_translation "Example"
7397         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7398             """
7399             Translate the given object along the vector, specified by its components.
7400
7401             Parameters: 
7402                 theObject The object to be translated.
7403                 theDX,theDY,theDZ Components of translation vector.
7404                 theCopy Flag used to translate object itself or create a copy.
7405
7406             Returns: 
7407                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7408                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7409             """
7410             # Example: see GEOM_TestAll.py
7411             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7412             if theCopy:
7413                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7414             else:
7415                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7416             anObj.SetParameters(Parameters)
7417             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7418             return anObj
7419
7420         ## Translate the given object along the vector, specified
7421         #  by its components, creating its copy before the translation.
7422         #  @param theObject The object to be translated.
7423         #  @param theDX,theDY,theDZ Components of translation vector.
7424         #  @param theName Object name; when specified, this parameter is used
7425         #         for result publication in the study. Otherwise, if automatic
7426         #         publication is switched on, default value is used for result name.
7427         #
7428         #  @return New GEOM.GEOM_Object, containing the translated object.
7429         #
7430         #  @ref tui_translation "Example"
7431         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7432             """
7433             Translate the given object along the vector, specified
7434             by its components, creating its copy before the translation.
7435
7436             Parameters: 
7437                 theObject The object to be translated.
7438                 theDX,theDY,theDZ Components of translation vector.
7439                 theName Object name; when specified, this parameter is used
7440                         for result publication in the study. Otherwise, if automatic
7441                         publication is switched on, default value is used for result name.
7442
7443             Returns: 
7444                 New GEOM.GEOM_Object, containing the translated object.
7445             """
7446             # Example: see GEOM_TestAll.py
7447             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7448             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7449             anObj.SetParameters(Parameters)
7450             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7451             self._autoPublish(anObj, theName, "translated")
7452             return anObj
7453
7454         ## Translate the given object along the given vector.
7455         #  @param theObject The object to be translated.
7456         #  @param theVector The translation vector.
7457         #  @param theCopy Flag used to translate object itself or create a copy.
7458         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7459         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7460         def TranslateVector(self, theObject, theVector, theCopy=False):
7461             """
7462             Translate the given object along the given vector.
7463
7464             Parameters: 
7465                 theObject The object to be translated.
7466                 theVector The translation vector.
7467                 theCopy Flag used to translate object itself or create a copy.
7468
7469             Returns: 
7470                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7471                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7472             """
7473             if theCopy:
7474                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7475             else:
7476                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7477             RaiseIfFailed("TranslateVector", self.TrsfOp)
7478             return anObj
7479
7480         ## Translate the given object along the given vector,
7481         #  creating its copy before the translation.
7482         #  @param theObject The object to be translated.
7483         #  @param theVector The translation vector.
7484         #  @param theName Object name; when specified, this parameter is used
7485         #         for result publication in the study. Otherwise, if automatic
7486         #         publication is switched on, default value is used for result name.
7487         #
7488         #  @return New GEOM.GEOM_Object, containing the translated object.
7489         #
7490         #  @ref tui_translation "Example"
7491         def MakeTranslationVector(self, theObject, theVector, theName=None):
7492             """
7493             Translate the given object along the given vector,
7494             creating its copy before the translation.
7495
7496             Parameters: 
7497                 theObject The object to be translated.
7498                 theVector The translation vector.
7499                 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             Returns: 
7504                 New GEOM.GEOM_Object, containing the translated object.
7505             """
7506             # Example: see GEOM_TestAll.py
7507             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7508             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7509             self._autoPublish(anObj, theName, "translated")
7510             return anObj
7511
7512         ## Translate the given object along the given vector on given distance.
7513         #  @param theObject The object to be translated.
7514         #  @param theVector The translation vector.
7515         #  @param theDistance The translation distance.
7516         #  @param theCopy Flag used to translate object itself or create a copy.
7517         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7518         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7519         #
7520         #  @ref tui_translation "Example"
7521         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7522             """
7523             Translate the given object along the given vector on given distance.
7524
7525             Parameters: 
7526                 theObject The object to be translated.
7527                 theVector The translation vector.
7528                 theDistance The translation distance.
7529                 theCopy Flag used to translate object itself or create a copy.
7530
7531             Returns: 
7532                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7533                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7534             """
7535             # Example: see GEOM_TestAll.py
7536             theDistance,Parameters = ParseParameters(theDistance)
7537             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7538             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7539             anObj.SetParameters(Parameters)
7540             return anObj
7541
7542         ## Translate the given object along the given vector on given distance,
7543         #  creating its copy before the translation.
7544         #  @param theObject The object to be translated.
7545         #  @param theVector The translation vector.
7546         #  @param theDistance The translation distance.
7547         #  @param theName Object name; when specified, this parameter is used
7548         #         for result publication in the study. Otherwise, if automatic
7549         #         publication is switched on, default value is used for result name.
7550         #
7551         #  @return New GEOM.GEOM_Object, containing the translated object.
7552         #
7553         #  @ref tui_translation "Example"
7554         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7555             """
7556             Translate the given object along the given vector on given distance,
7557             creating its copy before the translation.
7558
7559             Parameters:
7560                 theObject The object to be translated.
7561                 theVector The translation vector.
7562                 theDistance The translation distance.
7563                 theName Object name; when specified, this parameter is used
7564                         for result publication in the study. Otherwise, if automatic
7565                         publication is switched on, default value is used for result name.
7566
7567             Returns: 
7568                 New GEOM.GEOM_Object, containing the translated object.
7569             """
7570             # Example: see GEOM_TestAll.py
7571             theDistance,Parameters = ParseParameters(theDistance)
7572             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7573             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7574             anObj.SetParameters(Parameters)
7575             self._autoPublish(anObj, theName, "translated")
7576             return anObj
7577
7578         ## Rotate the given object around the given axis on the given angle.
7579         #  @param theObject The object to be rotated.
7580         #  @param theAxis Rotation axis.
7581         #  @param theAngle Rotation angle in radians.
7582         #  @param theCopy Flag used to rotate object itself or create a copy.
7583         #
7584         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7585         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7586         #
7587         #  @ref tui_rotation "Example"
7588         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7589             """
7590             Rotate the given object around the given axis on the given angle.
7591
7592             Parameters:
7593                 theObject The object to be rotated.
7594                 theAxis Rotation axis.
7595                 theAngle Rotation angle in radians.
7596                 theCopy Flag used to rotate object itself or create a copy.
7597
7598             Returns:
7599                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7600                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7601             """
7602             # Example: see GEOM_TestAll.py
7603             flag = False
7604             if isinstance(theAngle,str):
7605                 flag = True
7606             theAngle, Parameters = ParseParameters(theAngle)
7607             if flag:
7608                 theAngle = theAngle*math.pi/180.0
7609             if theCopy:
7610                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7611             else:
7612                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7613             RaiseIfFailed("Rotate", self.TrsfOp)
7614             anObj.SetParameters(Parameters)
7615             return anObj
7616
7617         ## Rotate the given object around the given axis
7618         #  on the given angle, creating its copy before the rotatation.
7619         #  @param theObject The object to be rotated.
7620         #  @param theAxis Rotation axis.
7621         #  @param theAngle Rotation angle in radians.
7622         #  @param theName Object name; when specified, this parameter is used
7623         #         for result publication in the study. Otherwise, if automatic
7624         #         publication is switched on, default value is used for result name.
7625         #
7626         #  @return New GEOM.GEOM_Object, containing the rotated object.
7627         #
7628         #  @ref tui_rotation "Example"
7629         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7630             """
7631             Rotate the given object around the given axis
7632             on the given angle, creating its copy before the rotatation.
7633
7634             Parameters:
7635                 theObject The object to be rotated.
7636                 theAxis Rotation axis.
7637                 theAngle Rotation angle in radians.
7638                 theName Object name; when specified, this parameter is used
7639                         for result publication in the study. Otherwise, if automatic
7640                         publication is switched on, default value is used for result name.
7641
7642             Returns:
7643                 New GEOM.GEOM_Object, containing the rotated object.
7644             """
7645             # Example: see GEOM_TestAll.py
7646             flag = False
7647             if isinstance(theAngle,str):
7648                 flag = True
7649             theAngle, Parameters = ParseParameters(theAngle)
7650             if flag:
7651                 theAngle = theAngle*math.pi/180.0
7652             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7653             RaiseIfFailed("RotateCopy", self.TrsfOp)
7654             anObj.SetParameters(Parameters)
7655             self._autoPublish(anObj, theName, "rotated")
7656             return anObj
7657
7658         ## Rotate given object around vector perpendicular to plane
7659         #  containing three points.
7660         #  @param theObject The object to be rotated.
7661         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7662         #  containing the three points.
7663         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7664         #  @param theCopy Flag used to rotate object itself or create a copy.
7665         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7666         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7667         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7668             """
7669             Rotate given object around vector perpendicular to plane
7670             containing three points.
7671
7672             Parameters:
7673                 theObject The object to be rotated.
7674                 theCentPoint central point  the axis is the vector perpendicular to the plane
7675                              containing the three points.
7676                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7677                 theCopy Flag used to rotate object itself or create a copy.
7678
7679             Returns:
7680                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7681                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7682             """
7683             if theCopy:
7684                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7685             else:
7686                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7687             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7688             return anObj
7689
7690         ## Rotate given object around vector perpendicular to plane
7691         #  containing three points, creating its copy before the rotatation.
7692         #  @param theObject The object to be rotated.
7693         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7694         #  containing the three points.
7695         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7696         #  @param theName Object name; when specified, this parameter is used
7697         #         for result publication in the study. Otherwise, if automatic
7698         #         publication is switched on, default value is used for result name.
7699         #
7700         #  @return New GEOM.GEOM_Object, containing the rotated object.
7701         #
7702         #  @ref tui_rotation "Example"
7703         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
7704             """
7705             Rotate given object around vector perpendicular to plane
7706             containing three points, creating its copy before the rotatation.
7707
7708             Parameters:
7709                 theObject The object to be rotated.
7710                 theCentPoint central point  the axis is the vector perpendicular to the plane
7711                              containing the three points.
7712                 thePoint1,thePoint2  in a perpendicular plane of the axis.
7713                 theName Object name; when specified, this parameter is used
7714                         for result publication in the study. Otherwise, if automatic
7715                         publication is switched on, default value is used for result name.
7716
7717             Returns:
7718                 New GEOM.GEOM_Object, containing the rotated object.
7719             """
7720             # Example: see GEOM_TestAll.py
7721             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7722             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
7723             self._autoPublish(anObj, theName, "rotated")
7724             return anObj
7725
7726         ## Scale the given object by the specified factor.
7727         #  @param theObject The object to be scaled.
7728         #  @param thePoint Center point for scaling.
7729         #                  Passing None for it means scaling relatively the origin of global CS.
7730         #  @param theFactor Scaling factor value.
7731         #  @param theCopy Flag used to scale object itself or create a copy.
7732         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7733         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7734         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
7735             """
7736             Scale the given object by the specified factor.
7737
7738             Parameters:
7739                 theObject The object to be scaled.
7740                 thePoint Center point for scaling.
7741                          Passing None for it means scaling relatively the origin of global CS.
7742                 theFactor Scaling factor value.
7743                 theCopy Flag used to scale object itself or create a copy.
7744
7745             Returns:    
7746                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7747                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7748             """
7749             # Example: see GEOM_TestAll.py
7750             theFactor, Parameters = ParseParameters(theFactor)
7751             if theCopy:
7752                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7753             else:
7754                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
7755             RaiseIfFailed("Scale", self.TrsfOp)
7756             anObj.SetParameters(Parameters)
7757             return anObj
7758
7759         ## Scale the given object by the factor, creating its copy before the scaling.
7760         #  @param theObject The object to be scaled.
7761         #  @param thePoint Center point for scaling.
7762         #                  Passing None for it means scaling relatively the origin of global CS.
7763         #  @param theFactor Scaling factor value.
7764         #  @param theName Object name; when specified, this parameter is used
7765         #         for result publication in the study. Otherwise, if automatic
7766         #         publication is switched on, default value is used for result name.
7767         #
7768         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7769         #
7770         #  @ref tui_scale "Example"
7771         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
7772             """
7773             Scale the given object by the factor, creating its copy before the scaling.
7774
7775             Parameters:
7776                 theObject The object to be scaled.
7777                 thePoint Center point for scaling.
7778                          Passing None for it means scaling relatively the origin of global CS.
7779                 theFactor Scaling factor value.
7780                 theName Object name; when specified, this parameter is used
7781                         for result publication in the study. Otherwise, if automatic
7782                         publication is switched on, default value is used for result name.
7783
7784             Returns:    
7785                 New GEOM.GEOM_Object, containing the scaled shape.
7786             """
7787             # Example: see GEOM_TestAll.py
7788             theFactor, Parameters = ParseParameters(theFactor)
7789             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7790             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
7791             anObj.SetParameters(Parameters)
7792             self._autoPublish(anObj, theName, "scaled")
7793             return anObj
7794
7795         ## Scale the given object by different factors along coordinate axes.
7796         #  @param theObject The object to be scaled.
7797         #  @param thePoint Center point for scaling.
7798         #                  Passing None for it means scaling relatively the origin of global CS.
7799         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7800         #  @param theCopy Flag used to scale object itself or create a copy.
7801         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7802         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7803         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
7804             """
7805             Scale the given object by different factors along coordinate axes.
7806
7807             Parameters:
7808                 theObject The object to be scaled.
7809                 thePoint Center point for scaling.
7810                             Passing None for it means scaling relatively the origin of global CS.
7811                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7812                 theCopy Flag used to scale object itself or create a copy.
7813
7814             Returns:    
7815                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7816                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7817             """
7818             # Example: see GEOM_TestAll.py
7819             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7820             if theCopy:
7821                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7822                                                             theFactorX, theFactorY, theFactorZ)
7823             else:
7824                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
7825                                                         theFactorX, theFactorY, theFactorZ)
7826             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
7827             anObj.SetParameters(Parameters)
7828             return anObj
7829
7830         ## Scale the given object by different factors along coordinate axes,
7831         #  creating its copy before the scaling.
7832         #  @param theObject The object to be scaled.
7833         #  @param thePoint Center point for scaling.
7834         #                  Passing None for it means scaling relatively the origin of global CS.
7835         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7836         #  @param theName Object name; when specified, this parameter is used
7837         #         for result publication in the study. Otherwise, if automatic
7838         #         publication is switched on, default value is used for result name.
7839         #
7840         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7841         #
7842         #  @ref swig_scale "Example"
7843         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
7844             """
7845             Scale the given object by different factors along coordinate axes,
7846             creating its copy before the scaling.
7847
7848             Parameters:
7849                 theObject The object to be scaled.
7850                 thePoint Center point for scaling.
7851                             Passing None for it means scaling relatively the origin of global CS.
7852                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7853                 theName Object name; when specified, this parameter is used
7854                         for result publication in the study. Otherwise, if automatic
7855                         publication is switched on, default value is used for result name.
7856
7857             Returns:
7858                 New GEOM.GEOM_Object, containing the scaled shape.
7859             """
7860             # Example: see GEOM_TestAll.py
7861             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7862             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7863                                                         theFactorX, theFactorY, theFactorZ)
7864             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
7865             anObj.SetParameters(Parameters)
7866             self._autoPublish(anObj, theName, "scaled")
7867             return anObj
7868
7869         ## Mirror an object relatively the given plane.
7870         #  @param theObject The object to be mirrored.
7871         #  @param thePlane Plane of symmetry.
7872         #  @param theCopy Flag used to mirror object itself or create a copy.
7873         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7874         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7875         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
7876             """
7877             Mirror an object relatively the given plane.
7878
7879             Parameters:
7880                 theObject The object to be mirrored.
7881                 thePlane Plane of symmetry.
7882                 theCopy Flag used to mirror object itself or create a copy.
7883
7884             Returns:
7885                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7886                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7887             """
7888             if theCopy:
7889                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7890             else:
7891                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
7892             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
7893             return anObj
7894
7895         ## Create an object, symmetrical
7896         #  to the given one relatively the given plane.
7897         #  @param theObject The object to be mirrored.
7898         #  @param thePlane Plane of symmetry.
7899         #  @param theName Object name; when specified, this parameter is used
7900         #         for result publication in the study. Otherwise, if automatic
7901         #         publication is switched on, default value is used for result name.
7902         #
7903         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7904         #
7905         #  @ref tui_mirror "Example"
7906         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
7907             """
7908             Create an object, symmetrical to the given one relatively the given plane.
7909
7910             Parameters:
7911                 theObject The object to be mirrored.
7912                 thePlane Plane of symmetry.
7913                 theName Object name; when specified, this parameter is used
7914                         for result publication in the study. Otherwise, if automatic
7915                         publication is switched on, default value is used for result name.
7916
7917             Returns:
7918                 New GEOM.GEOM_Object, containing the mirrored shape.
7919             """
7920             # Example: see GEOM_TestAll.py
7921             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7922             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
7923             self._autoPublish(anObj, theName, "mirrored")
7924             return anObj
7925
7926         ## Mirror an object relatively the given axis.
7927         #  @param theObject The object to be mirrored.
7928         #  @param theAxis Axis of symmetry.
7929         #  @param theCopy Flag used to mirror object itself or create a copy.
7930         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7931         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7932         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
7933             """
7934             Mirror an object relatively the given axis.
7935
7936             Parameters:
7937                 theObject The object to be mirrored.
7938                 theAxis Axis of symmetry.
7939                 theCopy Flag used to mirror object itself or create a copy.
7940
7941             Returns:
7942                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7943                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7944             """
7945             if theCopy:
7946                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7947             else:
7948                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
7949             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
7950             return anObj
7951
7952         ## Create an object, symmetrical
7953         #  to the given one relatively the given axis.
7954         #  @param theObject The object to be mirrored.
7955         #  @param theAxis Axis of symmetry.
7956         #  @param theName Object name; when specified, this parameter is used
7957         #         for result publication in the study. Otherwise, if automatic
7958         #         publication is switched on, default value is used for result name.
7959         #
7960         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7961         #
7962         #  @ref tui_mirror "Example"
7963         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
7964             """
7965             Create an object, symmetrical to the given one relatively the given axis.
7966
7967             Parameters:
7968                 theObject The object to be mirrored.
7969                 theAxis Axis of symmetry.
7970                 theName Object name; when specified, this parameter is used
7971                         for result publication in the study. Otherwise, if automatic
7972                         publication is switched on, default value is used for result name.
7973
7974             Returns: 
7975                 New GEOM.GEOM_Object, containing the mirrored shape.
7976             """
7977             # Example: see GEOM_TestAll.py
7978             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7979             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
7980             self._autoPublish(anObj, theName, "mirrored")
7981             return anObj
7982
7983         ## Mirror an object relatively the given point.
7984         #  @param theObject The object to be mirrored.
7985         #  @param thePoint Point of symmetry.
7986         #  @param theCopy Flag used to mirror object itself or create a copy.
7987         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7988         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7989         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
7990             """
7991             Mirror an object relatively the given point.
7992
7993             Parameters:
7994                 theObject The object to be mirrored.
7995                 thePoint Point of symmetry.
7996                 theCopy Flag used to mirror object itself or create a copy.
7997
7998             Returns:
7999                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8000                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8001             """
8002             # Example: see GEOM_TestAll.py
8003             if theCopy:
8004                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8005             else:
8006                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
8007             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
8008             return anObj
8009
8010         ## Create an object, symmetrical
8011         #  to the given one relatively the given point.
8012         #  @param theObject The object to be mirrored.
8013         #  @param thePoint Point of symmetry.
8014         #  @param theName Object name; when specified, this parameter is used
8015         #         for result publication in the study. Otherwise, if automatic
8016         #         publication is switched on, default value is used for result name.
8017         #
8018         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8019         #
8020         #  @ref tui_mirror "Example"
8021         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
8022             """
8023             Create an object, symmetrical
8024             to the given one relatively the given point.
8025
8026             Parameters:
8027                 theObject The object to be mirrored.
8028                 thePoint Point of symmetry.
8029                 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             Returns:  
8034                 New GEOM.GEOM_Object, containing the mirrored shape.
8035             """
8036             # Example: see GEOM_TestAll.py
8037             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8038             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
8039             self._autoPublish(anObj, theName, "mirrored")
8040             return anObj
8041
8042         ## Modify the location of the given object.
8043         #  @param theObject The object to be displaced.
8044         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8045         #                     If \a theStartLCS is NULL, displacement
8046         #                     will be performed from global CS.\n
8047         #                     If \a theObject itself is used as \a theStartLCS,
8048         #                     its location will be changed to \a theEndLCS.
8049         #  @param theEndLCS Coordinate system to perform displacement to it.
8050         #  @param theCopy Flag used to displace object itself or create a copy.
8051         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8052         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
8053         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
8054             """
8055             Modify the Location of the given object by LCS, creating its copy before the setting.
8056
8057             Parameters:
8058                 theObject The object to be displaced.
8059                 theStartLCS Coordinate system to perform displacement from it.
8060                             If theStartLCS is NULL, displacement
8061                             will be performed from global CS.
8062                             If theObject itself is used as theStartLCS,
8063                             its location will be changed to theEndLCS.
8064                 theEndLCS Coordinate system to perform displacement to it.
8065                 theCopy Flag used to displace object itself or create a copy.
8066
8067             Returns:
8068                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8069                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
8070             """
8071             # Example: see GEOM_TestAll.py
8072             if theCopy:
8073                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8074             else:
8075                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
8076             RaiseIfFailed("Displace", self.TrsfOp)
8077             return anObj
8078
8079         ## Modify the Location of the given object by LCS,
8080         #  creating its copy before the setting.
8081         #  @param theObject The object to be displaced.
8082         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8083         #                     If \a theStartLCS is NULL, displacement
8084         #                     will be performed from global CS.\n
8085         #                     If \a theObject itself is used as \a theStartLCS,
8086         #                     its location will be changed to \a theEndLCS.
8087         #  @param theEndLCS Coordinate system to perform displacement to it.
8088         #  @param theName Object name; when specified, this parameter is used
8089         #         for result publication in the study. Otherwise, if automatic
8090         #         publication is switched on, default value is used for result name.
8091         #
8092         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8093         #
8094         #  @ref tui_modify_location "Example"
8095         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
8096             """
8097             Modify the Location of the given object by LCS, creating its copy before the setting.
8098
8099             Parameters:
8100                 theObject The object to be displaced.
8101                 theStartLCS Coordinate system to perform displacement from it.
8102                             If theStartLCS is NULL, displacement
8103                             will be performed from global CS.
8104                             If theObject itself is used as theStartLCS,
8105                             its location will be changed to theEndLCS.
8106                 theEndLCS Coordinate system to perform displacement to it.
8107                 theName Object name; when specified, this parameter is used
8108                         for result publication in the study. Otherwise, if automatic
8109                         publication is switched on, default value is used for result name.
8110
8111             Returns:  
8112                 New GEOM.GEOM_Object, containing the displaced shape.
8113
8114             Example of usage:
8115                 # create local coordinate systems
8116                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
8117                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
8118                 # modify the location of the given object
8119                 position = geompy.MakePosition(cylinder, cs1, cs2)
8120             """
8121             # Example: see GEOM_TestAll.py
8122             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8123             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
8124             self._autoPublish(anObj, theName, "displaced")
8125             return anObj
8126
8127         ## Modify the Location of the given object by Path.
8128         #  @param  theObject The object to be displaced.
8129         #  @param  thePath Wire or Edge along that the object will be translated.
8130         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
8131         #  @param  theCopy is to create a copy objects if true.
8132         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
8133         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
8134         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
8135         #
8136         #  @ref tui_modify_location "Example"
8137         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
8138             """
8139             Modify the Location of the given object by Path.
8140
8141             Parameters:
8142                  theObject The object to be displaced.
8143                  thePath Wire or Edge along that the object will be translated.
8144                  theDistance progress of Path (0 = start location, 1 = end of path location).
8145                  theCopy is to create a copy objects if true.
8146                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8147
8148             Returns:  
8149                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
8150                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
8151
8152             Example of usage:
8153                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
8154             """
8155             # Example: see GEOM_TestAll.py
8156             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
8157             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8158             return anObj
8159
8160         ## Modify the Location of the given object by Path, creating its copy before the operation.
8161         #  @param theObject The object to be displaced.
8162         #  @param thePath Wire or Edge along that the object will be translated.
8163         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
8164         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
8165         #  @param theName Object name; when specified, this parameter is used
8166         #         for result publication in the study. Otherwise, if automatic
8167         #         publication is switched on, default value is used for result name.
8168         #
8169         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8170         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
8171             """
8172             Modify the Location of the given object by Path, creating its copy before the operation.
8173
8174             Parameters:
8175                  theObject The object to be displaced.
8176                  thePath Wire or Edge along that the object will be translated.
8177                  theDistance progress of Path (0 = start location, 1 = end of path location).
8178                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8179                  theName Object name; when specified, this parameter is used
8180                          for result publication in the study. Otherwise, if automatic
8181                          publication is switched on, default value is used for result name.
8182
8183             Returns:  
8184                 New GEOM.GEOM_Object, containing the displaced shape.
8185             """
8186             # Example: see GEOM_TestAll.py
8187             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
8188             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8189             self._autoPublish(anObj, theName, "displaced")
8190             return anObj
8191
8192         ## Offset given shape.
8193         #  @param theObject The base object for the offset.
8194         #  @param theOffset Offset value.
8195         #  @param theCopy Flag used to offset object itself or create a copy.
8196         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8197         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
8198         def Offset(self, theObject, theOffset, theCopy=False):
8199             """
8200             Offset given shape.
8201
8202             Parameters:
8203                 theObject The base object for the offset.
8204                 theOffset Offset value.
8205                 theCopy Flag used to offset object itself or create a copy.
8206
8207             Returns: 
8208                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8209                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
8210             """
8211             theOffset, Parameters = ParseParameters(theOffset)
8212             if theCopy:
8213                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8214             else:
8215                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
8216             RaiseIfFailed("Offset", self.TrsfOp)
8217             anObj.SetParameters(Parameters)
8218             return anObj
8219
8220         ## Create new object as offset of the given one.
8221         #  @param theObject The base object for the offset.
8222         #  @param theOffset Offset value.
8223         #  @param theName Object name; when specified, this parameter is used
8224         #         for result publication in the study. Otherwise, if automatic
8225         #         publication is switched on, default value is used for result name.
8226         #
8227         #  @return New GEOM.GEOM_Object, containing the offset object.
8228         #
8229         #  @ref tui_offset "Example"
8230         def MakeOffset(self, theObject, theOffset, theName=None):
8231             """
8232             Create new object as offset of the given one.
8233
8234             Parameters:
8235                 theObject The base object for the offset.
8236                 theOffset Offset value.
8237                 theName Object name; when specified, this parameter is used
8238                         for result publication in the study. Otherwise, if automatic
8239                         publication is switched on, default value is used for result name.
8240
8241             Returns:  
8242                 New GEOM.GEOM_Object, containing the offset object.
8243
8244             Example of usage:
8245                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
8246                  # create a new object as offset of the given object
8247                  offset = geompy.MakeOffset(box, 70.)
8248             """
8249             # Example: see GEOM_TestAll.py
8250             theOffset, Parameters = ParseParameters(theOffset)
8251             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8252             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
8253             anObj.SetParameters(Parameters)
8254             self._autoPublish(anObj, theName, "offset")
8255             return anObj
8256
8257         ## Create new object as projection of the given one on a 2D surface.
8258         #  @param theSource The source object for the projection. It can be a point, edge or wire.
8259         #  @param theTarget The target object. It can be planar or cylindrical face.
8260         #  @param theName Object name; when specified, this parameter is used
8261         #         for result publication in the study. Otherwise, if automatic
8262         #         publication is switched on, default value is used for result name.
8263         #
8264         #  @return New GEOM.GEOM_Object, containing the projection.
8265         #
8266         #  @ref tui_projection "Example"
8267         def MakeProjection(self, theSource, theTarget, theName=None):
8268             """
8269             Create new object as projection of the given one on a 2D surface.
8270
8271             Parameters:
8272                 theSource The source object for the projection. It can be a point, edge or wire.
8273                 theTarget The target object. It can be planar or cylindrical face.
8274                 theName Object name; when specified, this parameter is used
8275                         for result publication in the study. Otherwise, if automatic
8276                         publication is switched on, default value is used for result name.
8277
8278             Returns:  
8279                 New GEOM.GEOM_Object, containing the projection.
8280             """
8281             # Example: see GEOM_TestAll.py
8282             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
8283             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
8284             self._autoPublish(anObj, theName, "projection")
8285             return anObj
8286             
8287         ## Create a projection projection of the given point on a wire or an edge.
8288         #  If there are no solutions or there are 2 or more solutions It throws an
8289         #  exception.
8290         #  @param thePoint the point to be projected.
8291         #  @param theWire the wire. The edge is accepted as well.
8292         #  @param theName Object name; when specified, this parameter is used
8293         #         for result publication in the study. Otherwise, if automatic
8294         #         publication is switched on, default value is used for result name.
8295         #
8296         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
8297         #  \n \a u: The parameter of projection point on edge.
8298         #  \n \a PointOnEdge: The projection point.
8299         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
8300         #
8301         #  @ref tui_projection "Example"
8302         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
8303             """
8304             Create a projection projection of the given point on a wire or an edge.
8305             If there are no solutions or there are 2 or more solutions It throws an
8306             exception.
8307             
8308             Parameters:
8309                 thePoint the point to be projected.
8310                 theWire the wire. The edge is accepted as well.
8311                 theName Object name; when specified, this parameter is used
8312                         for result publication in the study. Otherwise, if automatic
8313                         publication is switched on, default value is used for result name.
8314           
8315             Returns:
8316                 [u, PointOnEdge, EdgeInWireIndex]
8317                  u: The parameter of projection point on edge.
8318                  PointOnEdge: The projection point.
8319                  EdgeInWireIndex: The index of an edge in a wire.
8320             """
8321             # Example: see GEOM_TestAll.py
8322             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
8323             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
8324             self._autoPublish(anObj[1], theName, "projection")
8325             return anObj
8326
8327         # -----------------------------------------------------------------------------
8328         # Patterns
8329         # -----------------------------------------------------------------------------
8330
8331         ## Translate the given object along the given vector a given number times
8332         #  @param theObject The object to be translated.
8333         #  @param theVector Direction of the translation. DX if None.
8334         #  @param theStep Distance to translate on.
8335         #  @param theNbTimes Quantity of translations to be done.
8336         #  @param theName Object name; when specified, this parameter is used
8337         #         for result publication in the study. Otherwise, if automatic
8338         #         publication is switched on, default value is used for result name.
8339         #
8340         #  @return New GEOM.GEOM_Object, containing compound of all
8341         #          the shapes, obtained after each translation.
8342         #
8343         #  @ref tui_multi_translation "Example"
8344         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
8345             """
8346             Translate the given object along the given vector a given number times
8347
8348             Parameters:
8349                 theObject The object to be translated.
8350                 theVector Direction of the translation. DX if None.
8351                 theStep Distance to translate on.
8352                 theNbTimes Quantity of translations to be done.
8353                 theName Object name; when specified, this parameter is used
8354                         for result publication in the study. Otherwise, if automatic
8355                         publication is switched on, default value is used for result name.
8356
8357             Returns:     
8358                 New GEOM.GEOM_Object, containing compound of all
8359                 the shapes, obtained after each translation.
8360
8361             Example of usage:
8362                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
8363             """
8364             # Example: see GEOM_TestAll.py
8365             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
8366             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
8367             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
8368             anObj.SetParameters(Parameters)
8369             self._autoPublish(anObj, theName, "multitranslation")
8370             return anObj
8371
8372         ## Conseqently apply two specified translations to theObject specified number of times.
8373         #  @param theObject The object to be translated.
8374         #  @param theVector1 Direction of the first translation. DX if None.
8375         #  @param theStep1 Step of the first translation.
8376         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
8377         #  @param theVector2 Direction of the second translation. DY if None.
8378         #  @param theStep2 Step of the second translation.
8379         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
8380         #  @param theName Object name; when specified, this parameter is used
8381         #         for result publication in the study. Otherwise, if automatic
8382         #         publication is switched on, default value is used for result name.
8383         #
8384         #  @return New GEOM.GEOM_Object, containing compound of all
8385         #          the shapes, obtained after each translation.
8386         #
8387         #  @ref tui_multi_translation "Example"
8388         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8389                                    theVector2, theStep2, theNbTimes2, theName=None):
8390             """
8391             Conseqently apply two specified translations to theObject specified number of times.
8392
8393             Parameters:
8394                 theObject The object to be translated.
8395                 theVector1 Direction of the first translation. DX if None.
8396                 theStep1 Step of the first translation.
8397                 theNbTimes1 Quantity of translations to be done along theVector1.
8398                 theVector2 Direction of the second translation. DY if None.
8399                 theStep2 Step of the second translation.
8400                 theNbTimes2 Quantity of translations to be done along theVector2.
8401                 theName Object name; when specified, this parameter is used
8402                         for result publication in the study. Otherwise, if automatic
8403                         publication is switched on, default value is used for result name.
8404
8405             Returns:
8406                 New GEOM.GEOM_Object, containing compound of all
8407                 the shapes, obtained after each translation.
8408
8409             Example of usage:
8410                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8411             """
8412             # Example: see GEOM_TestAll.py
8413             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8414             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8415                                                  theVector2, theStep2, theNbTimes2)
8416             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8417             anObj.SetParameters(Parameters)
8418             self._autoPublish(anObj, theName, "multitranslation")
8419             return anObj
8420
8421         ## Rotate the given object around the given axis a given number times.
8422         #  Rotation angle will be 2*PI/theNbTimes.
8423         #  @param theObject The object to be rotated.
8424         #  @param theAxis The rotation axis. DZ if None.
8425         #  @param theNbTimes Quantity of rotations to be done.
8426         #  @param theName Object name; when specified, this parameter is used
8427         #         for result publication in the study. Otherwise, if automatic
8428         #         publication is switched on, default value is used for result name.
8429         #
8430         #  @return New GEOM.GEOM_Object, containing compound of all the
8431         #          shapes, obtained after each rotation.
8432         #
8433         #  @ref tui_multi_rotation "Example"
8434         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8435             """
8436             Rotate the given object around the given axis a given number times.
8437             Rotation angle will be 2*PI/theNbTimes.
8438
8439             Parameters:
8440                 theObject The object to be rotated.
8441                 theAxis The rotation axis. DZ if None.
8442                 theNbTimes Quantity of rotations to be done.
8443                 theName Object name; when specified, this parameter is used
8444                         for result publication in the study. Otherwise, if automatic
8445                         publication is switched on, default value is used for result name.
8446
8447             Returns:     
8448                 New GEOM.GEOM_Object, containing compound of all the
8449                 shapes, obtained after each rotation.
8450
8451             Example of usage:
8452                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8453             """
8454             # Example: see GEOM_TestAll.py
8455             theNbTimes, Parameters = ParseParameters(theNbTimes)
8456             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8457             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8458             anObj.SetParameters(Parameters)
8459             self._autoPublish(anObj, theName, "multirotation")
8460             return anObj
8461
8462         ## Rotate the given object around the given axis
8463         #  a given number times on the given angle.
8464         #  @param theObject The object to be rotated.
8465         #  @param theAxis The rotation axis. DZ if None.
8466         #  @param theAngleStep Rotation angle in radians.
8467         #  @param theNbTimes Quantity of rotations to be done.
8468         #  @param theName Object name; when specified, this parameter is used
8469         #         for result publication in the study. Otherwise, if automatic
8470         #         publication is switched on, default value is used for result name.
8471         #
8472         #  @return New GEOM.GEOM_Object, containing compound of all the
8473         #          shapes, obtained after each rotation.
8474         #
8475         #  @ref tui_multi_rotation "Example"
8476         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8477             """
8478             Rotate the given object around the given axis
8479             a given number times on the given angle.
8480
8481             Parameters:
8482                 theObject The object to be rotated.
8483                 theAxis The rotation axis. DZ if None.
8484                 theAngleStep Rotation angle in radians.
8485                 theNbTimes Quantity of rotations to be done.
8486                 theName Object name; when specified, this parameter is used
8487                         for result publication in the study. Otherwise, if automatic
8488                         publication is switched on, default value is used for result name.
8489
8490             Returns:     
8491                 New GEOM.GEOM_Object, containing compound of all the
8492                 shapes, obtained after each rotation.
8493
8494             Example of usage:
8495                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8496             """
8497             # Example: see GEOM_TestAll.py
8498             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8499             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8500             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8501             anObj.SetParameters(Parameters)
8502             self._autoPublish(anObj, theName, "multirotation")
8503             return anObj
8504
8505         ## Rotate the given object around the given axis a given
8506         #  number times and multi-translate each rotation result.
8507         #  Rotation angle will be 2*PI/theNbTimes1.
8508         #  Translation direction passes through center of gravity
8509         #  of rotated shape and its projection on the rotation axis.
8510         #  @param theObject The object to be rotated.
8511         #  @param theAxis Rotation axis. DZ if None.
8512         #  @param theNbTimes1 Quantity of rotations to be done.
8513         #  @param theRadialStep Translation distance.
8514         #  @param theNbTimes2 Quantity of translations to be done.
8515         #  @param theName Object name; when specified, this parameter is used
8516         #         for result publication in the study. Otherwise, if automatic
8517         #         publication is switched on, default value is used for result name.
8518         #
8519         #  @return New GEOM.GEOM_Object, containing compound of all the
8520         #          shapes, obtained after each transformation.
8521         #
8522         #  @ref tui_multi_rotation "Example"
8523         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8524             """
8525             Rotate the given object around the
8526             given axis on the given angle a given number
8527             times and multi-translate each rotation result.
8528             Translation direction passes through center of gravity
8529             of rotated shape and its projection on the rotation axis.
8530
8531             Parameters:
8532                 theObject The object to be rotated.
8533                 theAxis Rotation axis. DZ if None.
8534                 theNbTimes1 Quantity of rotations to be done.
8535                 theRadialStep Translation distance.
8536                 theNbTimes2 Quantity of translations to be done.
8537                 theName Object name; when specified, this parameter is used
8538                         for result publication in the study. Otherwise, if automatic
8539                         publication is switched on, default value is used for result name.
8540
8541             Returns:    
8542                 New GEOM.GEOM_Object, containing compound of all the
8543                 shapes, obtained after each transformation.
8544
8545             Example of usage:
8546                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8547             """
8548             # Example: see GEOM_TestAll.py
8549             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8550             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8551             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8552             anObj.SetParameters(Parameters)
8553             self._autoPublish(anObj, theName, "multirotation")
8554             return anObj
8555
8556         ## Rotate the given object around the
8557         #  given axis on the given angle a given number
8558         #  times and multi-translate each rotation result.
8559         #  Translation direction passes through center of gravity
8560         #  of rotated shape and its projection on the rotation axis.
8561         #  @param theObject The object to be rotated.
8562         #  @param theAxis Rotation axis. DZ if None.
8563         #  @param theAngleStep Rotation angle in radians.
8564         #  @param theNbTimes1 Quantity of rotations to be done.
8565         #  @param theRadialStep Translation distance.
8566         #  @param theNbTimes2 Quantity of translations to be done.
8567         #  @param theName Object name; when specified, this parameter is used
8568         #         for result publication in the study. Otherwise, if automatic
8569         #         publication is switched on, default value is used for result name.
8570         #
8571         #  @return New GEOM.GEOM_Object, containing compound of all the
8572         #          shapes, obtained after each transformation.
8573         #
8574         #  @ref tui_multi_rotation "Example"
8575         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8576             """
8577             Rotate the given object around the
8578             given axis on the given angle a given number
8579             times and multi-translate each rotation result.
8580             Translation direction passes through center of gravity
8581             of rotated shape and its projection on the rotation axis.
8582
8583             Parameters:
8584                 theObject The object to be rotated.
8585                 theAxis Rotation axis. DZ if None.
8586                 theAngleStep Rotation angle in radians.
8587                 theNbTimes1 Quantity of rotations to be done.
8588                 theRadialStep Translation distance.
8589                 theNbTimes2 Quantity of translations to be done.
8590                 theName Object name; when specified, this parameter is used
8591                         for result publication in the study. Otherwise, if automatic
8592                         publication is switched on, default value is used for result name.
8593
8594             Returns:    
8595                 New GEOM.GEOM_Object, containing compound of all the
8596                 shapes, obtained after each transformation.
8597
8598             Example of usage:
8599                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8600             """
8601             # Example: see GEOM_TestAll.py
8602             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8603             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8604             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8605             anObj.SetParameters(Parameters)
8606             self._autoPublish(anObj, theName, "multirotation")
8607             return anObj
8608
8609         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8610         #
8611         #  @ref swig_MakeMultiRotation "Example"
8612         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8613             """
8614             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8615
8616             Example of usage:
8617                 pz = geompy.MakeVertex(0, 0, 100)
8618                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8619                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8620             """
8621             # Example: see GEOM_TestOthers.py
8622             aVec = self.MakeLine(aPoint,aDir)
8623             # note: auto-publishing is done in self.MultiRotate1D()
8624             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8625             return anObj
8626
8627         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8628         #
8629         #  @ref swig_MakeMultiRotation "Example"
8630         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8631             """
8632             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8633
8634             Example of usage:
8635                 pz = geompy.MakeVertex(0, 0, 100)
8636                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8637                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8638             """
8639             # Example: see GEOM_TestOthers.py
8640             aVec = self.MakeLine(aPoint,aDir)
8641             # note: auto-publishing is done in self.MultiRotate1D()
8642             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8643             return anObj
8644
8645         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8646         #
8647         #  @ref swig_MakeMultiRotation "Example"
8648         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8649             """
8650             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8651             
8652             Example of usage:
8653                 pz = geompy.MakeVertex(0, 0, 100)
8654                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8655                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8656             """
8657             # Example: see GEOM_TestOthers.py
8658             aVec = self.MakeLine(aPoint,aDir)
8659             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8660             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8661             return anObj
8662
8663         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8664         #
8665         #  @ref swig_MakeMultiRotation "Example"
8666         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8667             """
8668             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8669             
8670             Example of usage:
8671                 pz = geompy.MakeVertex(0, 0, 100)
8672                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8673                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8674             """
8675             # Example: see GEOM_TestOthers.py
8676             aVec = self.MakeLine(aPoint,aDir)
8677             # note: auto-publishing is done in self.MultiRotate2D()
8678             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8679             return anObj
8680
8681         # end of l3_transform
8682         ## @}
8683
8684         ## @addtogroup l3_transform_d
8685         ## @{
8686
8687         ## Deprecated method. Use MultiRotate1DNbTimes instead.
8688         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
8689             """
8690             Deprecated method. Use MultiRotate1DNbTimes instead.
8691             """
8692             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
8693             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
8694
8695         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8696         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8697         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
8698             """
8699             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8700             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8701
8702             Example of usage:
8703                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8704             """
8705             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
8706             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
8707             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
8708             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
8709             anObj.SetParameters(Parameters)
8710             self._autoPublish(anObj, theName, "multirotation")
8711             return anObj
8712
8713         ## The same, as MultiRotate1D(), but axis is given by direction and point
8714         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8715         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8716             """
8717             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
8718             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8719
8720             Example of usage:
8721                 pz = geompy.MakeVertex(0, 0, 100)
8722                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8723                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
8724             """
8725             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
8726             aVec = self.MakeLine(aPoint,aDir)
8727             # note: auto-publishing is done in self.MultiRotate1D()
8728             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
8729             return anObj
8730
8731         ## The same, as MultiRotate2D(), but axis is given by direction and point
8732         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8733         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8734             """
8735             The same, as MultiRotate2D(), but axis is given by direction and point
8736             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8737             
8738             Example of usage:
8739                 pz = geompy.MakeVertex(0, 0, 100)
8740                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8741                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
8742             """
8743             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
8744             aVec = self.MakeLine(aPoint,aDir)
8745             # note: auto-publishing is done in self.MultiRotate2D()
8746             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8747             return anObj
8748
8749         # end of l3_transform_d
8750         ## @}
8751
8752         ## @addtogroup l3_local
8753         ## @{
8754
8755         ## Perform a fillet on all edges of the given shape.
8756         #  @param theShape Shape, to perform fillet on.
8757         #  @param theR Fillet radius.
8758         #  @param theName Object name; when specified, this parameter is used
8759         #         for result publication in the study. Otherwise, if automatic
8760         #         publication is switched on, default value is used for result name.
8761         #
8762         #  @return New GEOM.GEOM_Object, containing the result shape.
8763         #
8764         #  @ref tui_fillet "Example 1"
8765         #  \n @ref swig_MakeFilletAll "Example 2"
8766         def MakeFilletAll(self, theShape, theR, theName=None):
8767             """
8768             Perform a fillet on all edges of the given shape.
8769
8770             Parameters:
8771                 theShape Shape, to perform fillet on.
8772                 theR Fillet radius.
8773                 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             Returns: 
8778                 New GEOM.GEOM_Object, containing the result shape.
8779
8780             Example of usage: 
8781                filletall = geompy.MakeFilletAll(prism, 10.)
8782             """
8783             # Example: see GEOM_TestOthers.py
8784             theR,Parameters = ParseParameters(theR)
8785             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
8786             RaiseIfFailed("MakeFilletAll", self.LocalOp)
8787             anObj.SetParameters(Parameters)
8788             self._autoPublish(anObj, theName, "fillet")
8789             return anObj
8790
8791         ## Perform a fillet on the specified edges/faces of the given shape
8792         #  @param theShape Shape, to perform fillet on.
8793         #  @param theR Fillet radius.
8794         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
8795         #  @param theListShapes Global indices of edges/faces to perform fillet on.
8796         #  @param theName Object name; when specified, this parameter is used
8797         #         for result publication in the study. Otherwise, if automatic
8798         #         publication is switched on, default value is used for result name.
8799         #
8800         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8801         #
8802         #  @return New GEOM.GEOM_Object, containing the result shape.
8803         #
8804         #  @ref tui_fillet "Example"
8805         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
8806             """
8807             Perform a fillet on the specified edges/faces of the given shape
8808
8809             Parameters:
8810                 theShape Shape, to perform fillet on.
8811                 theR Fillet radius.
8812                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
8813                 theListShapes Global indices of edges/faces to perform fillet on.
8814                 theName Object name; when specified, this parameter is used
8815                         for result publication in the study. Otherwise, if automatic
8816                         publication is switched on, default value is used for result name.
8817
8818             Note:
8819                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8820
8821             Returns: 
8822                 New GEOM.GEOM_Object, containing the result shape.
8823
8824             Example of usage:
8825                 # get the list of IDs (IDList) for the fillet
8826                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8827                 IDlist_e = []
8828                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8829                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8830                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8831                 # make a fillet on the specified edges of the given shape
8832                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
8833             """
8834             # Example: see GEOM_TestAll.py
8835             theR,Parameters = ParseParameters(theR)
8836             anObj = None
8837             if theShapeType == self.ShapeType["EDGE"]:
8838                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
8839                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
8840             else:
8841                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
8842                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
8843             anObj.SetParameters(Parameters)
8844             self._autoPublish(anObj, theName, "fillet")
8845             return anObj
8846
8847         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
8848         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
8849             """
8850             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
8851
8852             Example of usage:
8853                 # get the list of IDs (IDList) for the fillet
8854                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8855                 IDlist_e = []
8856                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8857                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8858                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8859                 # make a fillet on the specified edges of the given shape
8860                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
8861             """
8862             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
8863             anObj = None
8864             if theShapeType == self.ShapeType["EDGE"]:
8865                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
8866                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
8867             else:
8868                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
8869                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
8870             anObj.SetParameters(Parameters)
8871             self._autoPublish(anObj, theName, "fillet")
8872             return anObj
8873
8874         ## Perform a fillet on the specified edges of the given shape
8875         #  @param theShape  Wire Shape to perform fillet on.
8876         #  @param theR  Fillet radius.
8877         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8878         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
8879         #    \note The list of vertices could be empty,
8880         #          in this case fillet will done done at all vertices in wire
8881         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
8882         #         by the length of the edges, nearest to the fillet vertex.
8883         #         But sometimes the next edge is C1 continuous with the one, nearest to
8884         #         the fillet point, and such two (or more) edges can be united to allow
8885         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
8886         #         thus ignoring the secant vertex (vertices).
8887         #  @param theName Object name; when specified, this parameter is used
8888         #         for result publication in the study. Otherwise, if automatic
8889         #         publication is switched on, default value is used for result name.
8890         #
8891         #  @return New GEOM.GEOM_Object, containing the result shape.
8892         #
8893         #  @ref tui_fillet2d "Example"
8894         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
8895             """
8896             Perform a fillet on the specified edges of the given shape
8897
8898             Parameters:
8899                 theShape  Wire Shape to perform fillet on.
8900                 theR  Fillet radius.
8901                 theListOfVertexes Global indices of vertexes to perform fillet on.
8902                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
8903                     by the length of the edges, nearest to the fillet vertex.
8904                     But sometimes the next edge is C1 continuous with the one, nearest to
8905                     the fillet point, and such two (or more) edges can be united to allow
8906                     bigger radius. Set this flag to TRUE to allow collinear edges union,
8907                     thus ignoring the secant vertex (vertices).
8908                 theName Object name; when specified, this parameter is used
8909                         for result publication in the study. Otherwise, if automatic
8910                         publication is switched on, default value is used for result name.
8911             Note:
8912                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8913
8914                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
8915
8916             Returns: 
8917                 New GEOM.GEOM_Object, containing the result shape.
8918
8919             Example of usage:  
8920                 # create wire
8921                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
8922                 # make fillet at given wire vertices with giver radius
8923                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
8924             """
8925             # Example: see GEOM_TestAll.py
8926             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
8927             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
8928             RaiseIfFailed("MakeFillet1D", self.LocalOp)
8929             anObj.SetParameters(Parameters)
8930             self._autoPublish(anObj, theName, "fillet")
8931             return anObj
8932
8933         ## Perform a fillet at the specified vertices of the given face/shell.
8934         #  @param theShape Face or Shell shape to perform fillet on.
8935         #  @param theR Fillet radius.
8936         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8937         #  @param theName Object name; when specified, this parameter is used
8938         #         for result publication in the study. Otherwise, if automatic
8939         #         publication is switched on, default value is used for result name.
8940         #
8941         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8942         #
8943         #  @return New GEOM.GEOM_Object, containing the result shape.
8944         #
8945         #  @ref tui_fillet2d "Example"
8946         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
8947             """
8948             Perform a fillet at the specified vertices of the given face/shell.
8949
8950             Parameters:
8951                 theShape  Face or Shell shape to perform fillet on.
8952                 theR  Fillet radius.
8953                 theListOfVertexes Global indices of vertexes to perform fillet on.
8954                 theName Object name; when specified, this parameter is used
8955                         for result publication in the study. Otherwise, if automatic
8956                         publication is switched on, default value is used for result name.
8957             Note:
8958                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8959
8960             Returns: 
8961                 New GEOM.GEOM_Object, containing the result shape.
8962
8963             Example of usage:
8964                 face = geompy.MakeFaceHW(100, 100, 1)
8965                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
8966             """
8967             # Example: see GEOM_TestAll.py
8968             theR,Parameters = ParseParameters(theR)
8969             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
8970             RaiseIfFailed("MakeFillet2D", self.LocalOp)
8971             anObj.SetParameters(Parameters)
8972             self._autoPublish(anObj, theName, "fillet")
8973             return anObj
8974
8975         ## Perform a symmetric chamfer on all edges of the given shape.
8976         #  @param theShape Shape, to perform chamfer on.
8977         #  @param theD Chamfer size along each face.
8978         #  @param theName Object name; when specified, this parameter is used
8979         #         for result publication in the study. Otherwise, if automatic
8980         #         publication is switched on, default value is used for result name.
8981         #
8982         #  @return New GEOM.GEOM_Object, containing the result shape.
8983         #
8984         #  @ref tui_chamfer "Example 1"
8985         #  \n @ref swig_MakeChamferAll "Example 2"
8986         def MakeChamferAll(self, theShape, theD, theName=None):
8987             """
8988             Perform a symmetric chamfer on all edges of the given shape.
8989
8990             Parameters:
8991                 theShape Shape, to perform chamfer on.
8992                 theD Chamfer size along each face.
8993                 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             Returns:     
8998                 New GEOM.GEOM_Object, containing the result shape.
8999
9000             Example of usage:
9001                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
9002             """
9003             # Example: see GEOM_TestOthers.py
9004             theD,Parameters = ParseParameters(theD)
9005             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
9006             RaiseIfFailed("MakeChamferAll", self.LocalOp)
9007             anObj.SetParameters(Parameters)
9008             self._autoPublish(anObj, theName, "chamfer")
9009             return anObj
9010
9011         ## Perform a chamfer on edges, common to the specified faces,
9012         #  with distance D1 on the Face1
9013         #  @param theShape Shape, to perform chamfer on.
9014         #  @param theD1 Chamfer size along \a theFace1.
9015         #  @param theD2 Chamfer size along \a theFace2.
9016         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9017         #  @param theName Object name; when specified, this parameter is used
9018         #         for result publication in the study. Otherwise, if automatic
9019         #         publication is switched on, default value is used for result name.
9020         #
9021         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9022         #
9023         #  @return New GEOM.GEOM_Object, containing the result shape.
9024         #
9025         #  @ref tui_chamfer "Example"
9026         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
9027             """
9028             Perform a chamfer on edges, common to the specified faces,
9029             with distance D1 on the Face1
9030
9031             Parameters:
9032                 theShape Shape, to perform chamfer on.
9033                 theD1 Chamfer size along theFace1.
9034                 theD2 Chamfer size along theFace2.
9035                 theFace1,theFace2 Global indices of two faces of theShape.
9036                 theName Object name; when specified, this parameter is used
9037                         for result publication in the study. Otherwise, if automatic
9038                         publication is switched on, default value is used for result name.
9039
9040             Note:
9041                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9042
9043             Returns:      
9044                 New GEOM.GEOM_Object, containing the result shape.
9045
9046             Example of usage:
9047                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9048                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9049                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9050                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
9051             """
9052             # Example: see GEOM_TestAll.py
9053             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9054             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
9055             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
9056             anObj.SetParameters(Parameters)
9057             self._autoPublish(anObj, theName, "chamfer")
9058             return anObj
9059
9060         ## Perform a chamfer on edges
9061         #  @param theShape Shape, to perform chamfer on.
9062         #  @param theD Chamfer length
9063         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9064         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9065         #  @param theName Object name; when specified, this parameter is used
9066         #         for result publication in the study. Otherwise, if automatic
9067         #         publication is switched on, default value is used for result name.
9068         #
9069         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9070         #
9071         #  @return New GEOM.GEOM_Object, containing the result shape.
9072         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
9073             """
9074             Perform a chamfer on edges
9075
9076             Parameters:
9077                 theShape Shape, to perform chamfer on.
9078                 theD1 Chamfer size along theFace1.
9079                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
9080                 theFace1,theFace2 Global indices of two faces of theShape.
9081                 theName Object name; when specified, this parameter is used
9082                         for result publication in the study. Otherwise, if automatic
9083                         publication is switched on, default value is used for result name.
9084
9085             Note:
9086                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9087
9088             Returns:      
9089                 New GEOM.GEOM_Object, containing the result shape.
9090
9091             Example of usage:
9092                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9093                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9094                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9095                 ang = 30
9096                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
9097             """
9098             flag = False
9099             if isinstance(theAngle,str):
9100                 flag = True
9101             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9102             if flag:
9103                 theAngle = theAngle*math.pi/180.0
9104             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
9105             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
9106             anObj.SetParameters(Parameters)
9107             self._autoPublish(anObj, theName, "chamfer")
9108             return anObj
9109
9110         ## Perform a chamfer on all edges of the specified faces,
9111         #  with distance D1 on the first specified face (if several for one edge)
9112         #  @param theShape Shape, to perform chamfer on.
9113         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
9114         #               connected to the edge, are in \a theFaces, \a theD1
9115         #               will be get along face, which is nearer to \a theFaces beginning.
9116         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
9117         #  @param theFaces Sequence of global indices of faces of \a theShape.
9118         #  @param theName Object name; when specified, this parameter is used
9119         #         for result publication in the study. Otherwise, if automatic
9120         #         publication is switched on, default value is used for result name.
9121         #
9122         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9123         #
9124         #  @return New GEOM.GEOM_Object, containing the result shape.
9125         #
9126         #  @ref tui_chamfer "Example"
9127         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
9128             """
9129             Perform a chamfer on all edges of the specified faces,
9130             with distance D1 on the first specified face (if several for one edge)
9131
9132             Parameters:
9133                 theShape Shape, to perform chamfer on.
9134                 theD1 Chamfer size along face from  theFaces. If both faces,
9135                       connected to the edge, are in theFaces, theD1
9136                       will be get along face, which is nearer to theFaces beginning.
9137                 theD2 Chamfer size along another of two faces, connected to the edge.
9138                 theFaces Sequence of global indices of faces of theShape.
9139                 theName Object name; when specified, this parameter is used
9140                         for result publication in the study. Otherwise, if automatic
9141                         publication is switched on, default value is used for result name.
9142                 
9143             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
9144
9145             Returns:  
9146                 New GEOM.GEOM_Object, containing the result shape.
9147             """
9148             # Example: see GEOM_TestAll.py
9149             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9150             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
9151             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
9152             anObj.SetParameters(Parameters)
9153             self._autoPublish(anObj, theName, "chamfer")
9154             return anObj
9155
9156         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
9157         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9158         #
9159         #  @ref swig_FilletChamfer "Example"
9160         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
9161             """
9162             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
9163             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9164             """
9165             flag = False
9166             if isinstance(theAngle,str):
9167                 flag = True
9168             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9169             if flag:
9170                 theAngle = theAngle*math.pi/180.0
9171             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
9172             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
9173             anObj.SetParameters(Parameters)
9174             self._autoPublish(anObj, theName, "chamfer")
9175             return anObj
9176
9177         ## Perform a chamfer on edges,
9178         #  with distance D1 on the first specified face (if several for one edge)
9179         #  @param theShape Shape, to perform chamfer on.
9180         #  @param theD1,theD2 Chamfer size
9181         #  @param theEdges Sequence of edges of \a theShape.
9182         #  @param theName Object name; when specified, this parameter is used
9183         #         for result publication in the study. Otherwise, if automatic
9184         #         publication is switched on, default value is used for result name.
9185         #
9186         #  @return New GEOM.GEOM_Object, containing the result shape.
9187         #
9188         #  @ref swig_FilletChamfer "Example"
9189         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
9190             """
9191             Perform a chamfer on edges,
9192             with distance D1 on the first specified face (if several for one edge)
9193             
9194             Parameters:
9195                 theShape Shape, to perform chamfer on.
9196                 theD1,theD2 Chamfer size
9197                 theEdges Sequence of edges of theShape.
9198                 theName Object name; when specified, this parameter is used
9199                         for result publication in the study. Otherwise, if automatic
9200                         publication is switched on, default value is used for result name.
9201
9202             Returns:
9203                 New GEOM.GEOM_Object, containing the result shape.
9204             """
9205             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9206             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
9207             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
9208             anObj.SetParameters(Parameters)
9209             self._autoPublish(anObj, theName, "chamfer")
9210             return anObj
9211
9212         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
9213         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9214         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
9215             """
9216             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
9217             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9218             """
9219             flag = False
9220             if isinstance(theAngle,str):
9221                 flag = True
9222             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9223             if flag:
9224                 theAngle = theAngle*math.pi/180.0
9225             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
9226             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
9227             anObj.SetParameters(Parameters)
9228             self._autoPublish(anObj, theName, "chamfer")
9229             return anObj
9230
9231         ## @sa MakeChamferEdge(), MakeChamferFaces()
9232         #
9233         #  @ref swig_MakeChamfer "Example"
9234         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
9235             """
9236             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
9237             """
9238             # Example: see GEOM_TestOthers.py
9239             anObj = None
9240             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
9241             if aShapeType == self.ShapeType["EDGE"]:
9242                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
9243             else:
9244                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
9245             return anObj
9246             
9247         ## Remove material from a solid by extrusion of the base shape on the given distance.
9248         #  @param theInit Shape to remove material from. It must be a solid or 
9249         #  a compound made of a single solid.
9250         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9251         #  @param theH Prism dimension along the normal to theBase
9252         #  @param theAngle Draft angle in degrees.
9253         #  @param theName Object name; when specified, this parameter is used
9254         #         for result publication in the study. Otherwise, if automatic
9255         #         publication is switched on, default value is used for result name.
9256         #
9257         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
9258         #
9259         #  @ref tui_creation_prism "Example"
9260         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
9261             """
9262             Add material to a solid by extrusion of the base shape on the given distance.
9263
9264             Parameters:
9265                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
9266                 theBase Closed edge or wire defining the base shape to be extruded.
9267                 theH Prism dimension along the normal  to theBase
9268                 theAngle Draft angle in degrees.
9269                 theName Object name; when specified, this parameter is used
9270                         for result publication in the study. Otherwise, if automatic
9271                         publication is switched on, default value is used for result name.
9272
9273             Returns:
9274                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
9275             """
9276             # Example: see GEOM_TestAll.py
9277             #theH,Parameters = ParseParameters(theH)
9278             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
9279             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9280             #anObj.SetParameters(Parameters)
9281             self._autoPublish(anObj, theName, "extrudedCut")
9282             return anObj   
9283             
9284         ## Add material to a solid by extrusion of the base shape on the given distance.
9285         #  @param theInit Shape to add material to. It must be a solid or 
9286         #  a compound made of a single solid.
9287         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9288         #  @param theH Prism dimension along the normal to theBase
9289         #  @param theAngle Draft angle in degrees.
9290         #  @param theName Object name; when specified, this parameter is used
9291         #         for result publication in the study. Otherwise, if automatic
9292         #         publication is switched on, default value is used for result name.
9293         #
9294         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
9295         #
9296         #  @ref tui_creation_prism "Example"
9297         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
9298             """
9299             Add material to a solid by extrusion of the base shape on the given distance.
9300
9301             Parameters:
9302                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
9303                 theBase Closed edge or wire defining the base shape to be extruded.
9304                 theH Prism dimension along the normal  to theBase
9305                 theAngle Draft angle in degrees.
9306                 theName Object name; when specified, this parameter is used
9307                         for result publication in the study. Otherwise, if automatic
9308                         publication is switched on, default value is used for result name.
9309
9310             Returns:
9311                 New GEOM.GEOM_Object,  containing the initial shape with added material.
9312             """
9313             # Example: see GEOM_TestAll.py
9314             #theH,Parameters = ParseParameters(theH)
9315             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
9316             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9317             #anObj.SetParameters(Parameters)
9318             self._autoPublish(anObj, theName, "extrudedBoss")
9319             return anObj   
9320
9321         # end of l3_local
9322         ## @}
9323
9324         ## @addtogroup l3_basic_op
9325         ## @{
9326
9327         ## Perform an Archimde operation on the given shape with given parameters.
9328         #  The object presenting the resulting face is returned.
9329         #  @param theShape Shape to be put in water.
9330         #  @param theWeight Weight og the shape.
9331         #  @param theWaterDensity Density of the water.
9332         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
9333         #  @param theName Object name; when specified, this parameter is used
9334         #         for result publication in the study. Otherwise, if automatic
9335         #         publication is switched on, default value is used for result name.
9336         #
9337         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
9338         #          by a plane, corresponding to water level.
9339         #
9340         #  @ref tui_archimede "Example"
9341         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
9342             """
9343             Perform an Archimde operation on the given shape with given parameters.
9344             The object presenting the resulting face is returned.
9345
9346             Parameters: 
9347                 theShape Shape to be put in water.
9348                 theWeight Weight og the shape.
9349                 theWaterDensity Density of the water.
9350                 theMeshDeflection Deflection of the mesh, using to compute the section.
9351                 theName Object name; when specified, this parameter is used
9352                         for result publication in the study. Otherwise, if automatic
9353                         publication is switched on, default value is used for result name.
9354
9355             Returns: 
9356                 New GEOM.GEOM_Object, containing a section of theShape
9357                 by a plane, corresponding to water level.
9358             """
9359             # Example: see GEOM_TestAll.py
9360             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
9361               theWeight,theWaterDensity,theMeshDeflection)
9362             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
9363             RaiseIfFailed("MakeArchimede", self.LocalOp)
9364             anObj.SetParameters(Parameters)
9365             self._autoPublish(anObj, theName, "archimede")
9366             return anObj
9367
9368         # end of l3_basic_op
9369         ## @}
9370
9371         ## @addtogroup l2_measure
9372         ## @{
9373
9374         ## Get point coordinates
9375         #  @return [x, y, z]
9376         #
9377         #  @ref tui_measurement_tools_page "Example"
9378         def PointCoordinates(self,Point):
9379             """
9380             Get point coordinates
9381
9382             Returns:
9383                 [x, y, z]
9384             """
9385             # Example: see GEOM_TestMeasures.py
9386             aTuple = self.MeasuOp.PointCoordinates(Point)
9387             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9388             return aTuple 
9389         
9390         ## Get vector coordinates
9391         #  @return [x, y, z]
9392         #
9393         #  @ref tui_measurement_tools_page "Example"
9394         def VectorCoordinates(self,Vector):
9395             """
9396             Get vector coordinates
9397
9398             Returns:
9399                 [x, y, z]
9400             """
9401
9402             p1=self.GetFirstVertex(Vector)
9403             p2=self.GetLastVertex(Vector)
9404             
9405             X1=self.PointCoordinates(p1)
9406             X2=self.PointCoordinates(p2)
9407
9408             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9409
9410
9411         ## Compute cross product
9412         #  @return vector w=u^v
9413         #
9414         #  @ref tui_measurement_tools_page "Example"
9415         def CrossProduct(self, Vector1, Vector2):
9416             """ 
9417             Compute cross product
9418             
9419             Returns: vector w=u^v
9420             """
9421             u=self.VectorCoordinates(Vector1)
9422             v=self.VectorCoordinates(Vector2)
9423             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])
9424             
9425             return w
9426         
9427         ## Compute cross product
9428         #  @return dot product  p=u.v
9429         #
9430         #  @ref tui_measurement_tools_page "Example"
9431         def DotProduct(self, Vector1, Vector2):
9432             """ 
9433             Compute cross product
9434             
9435             Returns: dot product  p=u.v
9436             """
9437             u=self.VectorCoordinates(Vector1)
9438             v=self.VectorCoordinates(Vector2)
9439             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9440             
9441             return p
9442
9443
9444         ## Get summarized length of all wires,
9445         #  area of surface and volume of the given shape.
9446         #  @param theShape Shape to define properties of.
9447         #  @return [theLength, theSurfArea, theVolume]\n
9448         #  theLength:   Summarized length of all wires of the given shape.\n
9449         #  theSurfArea: Area of surface of the given shape.\n
9450         #  theVolume:   Volume of the given shape.
9451         #
9452         #  @ref tui_measurement_tools_page "Example"
9453         def BasicProperties(self,theShape):
9454             """
9455             Get summarized length of all wires,
9456             area of surface and volume of the given shape.
9457
9458             Parameters: 
9459                 theShape Shape to define properties of.
9460
9461             Returns:
9462                 [theLength, theSurfArea, theVolume]
9463                  theLength:   Summarized length of all wires of the given shape.
9464                  theSurfArea: Area of surface of the given shape.
9465                  theVolume:   Volume of the given shape.
9466             """
9467             # Example: see GEOM_TestMeasures.py
9468             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9469             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9470             return aTuple
9471
9472         ## Get parameters of bounding box of the given shape
9473         #  @param theShape Shape to obtain bounding box of.
9474         #  @param precise TRUE for precise computation; FALSE for fast one.
9475         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9476         #  Xmin,Xmax: Limits of shape along OX axis.
9477         #  Ymin,Ymax: Limits of shape along OY axis.
9478         #  Zmin,Zmax: Limits of shape along OZ axis.
9479         #
9480         #  @ref tui_measurement_tools_page "Example"
9481         def BoundingBox (self, theShape, precise=False):
9482             """
9483             Get parameters of bounding box of the given shape
9484
9485             Parameters: 
9486                 theShape Shape to obtain bounding box of.
9487                 precise TRUE for precise computation; FALSE for fast one.
9488
9489             Returns:
9490                 [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             # Example: see GEOM_TestMeasures.py
9496             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9497             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9498             return aTuple
9499
9500         ## Get bounding box of the given shape
9501         #  @param theShape Shape to obtain bounding box of.
9502         #  @param precise TRUE for precise computation; FALSE for fast one.
9503         #  @param theName Object name; when specified, this parameter is used
9504         #         for result publication in the study. Otherwise, if automatic
9505         #         publication is switched on, default value is used for result name.
9506         #
9507         #  @return New GEOM.GEOM_Object, containing the created box.
9508         #
9509         #  @ref tui_measurement_tools_page "Example"
9510         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9511             """
9512             Get bounding box of the given shape
9513
9514             Parameters: 
9515                 theShape Shape to obtain bounding box of.
9516                 precise TRUE for precise computation; FALSE for fast one.
9517                 theName Object name; when specified, this parameter is used
9518                         for result publication in the study. Otherwise, if automatic
9519                         publication is switched on, default value is used for result name.
9520
9521             Returns:
9522                 New GEOM.GEOM_Object, containing the created box.
9523             """
9524             # Example: see GEOM_TestMeasures.py
9525             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9526             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9527             self._autoPublish(anObj, theName, "bndbox")
9528             return anObj
9529
9530         ## Get inertia matrix and moments of inertia of theShape.
9531         #  @param theShape Shape to calculate inertia of.
9532         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9533         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9534         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9535         #
9536         #  @ref tui_measurement_tools_page "Example"
9537         def Inertia(self,theShape):
9538             """
9539             Get inertia matrix and moments of inertia of theShape.
9540
9541             Parameters: 
9542                 theShape Shape to calculate inertia of.
9543
9544             Returns:
9545                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9546                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9547                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9548             """
9549             # Example: see GEOM_TestMeasures.py
9550             aTuple = self.MeasuOp.GetInertia(theShape)
9551             RaiseIfFailed("GetInertia", self.MeasuOp)
9552             return aTuple
9553
9554         ## Get if coords are included in the shape (ST_IN or ST_ON)
9555         #  @param theShape Shape
9556         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9557         #  @param tolerance to be used (default is 1.0e-7)
9558         #  @return list_of_boolean = [res1, res2, ...]
9559         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9560             """
9561             Get if coords are included in the shape (ST_IN or ST_ON)
9562             
9563             Parameters: 
9564                 theShape Shape
9565                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9566                 tolerance to be used (default is 1.0e-7)
9567
9568             Returns:
9569                 list_of_boolean = [res1, res2, ...]
9570             """
9571             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9572
9573         ## Get minimal distance between the given shapes.
9574         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9575         #  @return Value of the minimal distance between the given shapes.
9576         #
9577         #  @ref tui_measurement_tools_page "Example"
9578         def MinDistance(self, theShape1, theShape2):
9579             """
9580             Get minimal distance between the given shapes.
9581             
9582             Parameters: 
9583                 theShape1,theShape2 Shapes to find minimal distance between.
9584
9585             Returns:    
9586                 Value of the minimal distance between the given shapes.
9587             """
9588             # Example: see GEOM_TestMeasures.py
9589             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9590             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9591             return aTuple[0]
9592
9593         ## Get minimal distance between the given shapes.
9594         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9595         #  @return Value of the minimal distance between the given shapes, in form of list
9596         #          [Distance, DX, DY, DZ].
9597         #
9598         #  @ref swig_all_measure "Example"
9599         def MinDistanceComponents(self, theShape1, theShape2):
9600             """
9601             Get minimal distance between the given shapes.
9602
9603             Parameters: 
9604                 theShape1,theShape2 Shapes to find minimal distance between.
9605
9606             Returns:  
9607                 Value of the minimal distance between the given shapes, in form of list
9608                 [Distance, DX, DY, DZ]
9609             """
9610             # Example: see GEOM_TestMeasures.py
9611             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9612             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9613             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9614             return aRes
9615
9616         ## Get closest points of the given shapes.
9617         #  @param theShape1,theShape2 Shapes to find closest points of.
9618         #  @return The number of found solutions (-1 in case of infinite number of
9619         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9620         #
9621         #  @ref tui_measurement_tools_page "Example"
9622         def ClosestPoints (self, theShape1, theShape2):
9623             """
9624             Get closest points of the given shapes.
9625
9626             Parameters: 
9627                 theShape1,theShape2 Shapes to find closest points of.
9628
9629             Returns:    
9630                 The number of found solutions (-1 in case of infinite number of
9631                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9632             """
9633             # Example: see GEOM_TestMeasures.py
9634             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9635             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9636             return aTuple
9637
9638         ## Get angle between the given shapes in degrees.
9639         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9640         #  @note If both arguments are vectors, the angle is computed in accordance
9641         #        with their orientations, otherwise the minimum angle is computed.
9642         #  @return Value of the angle between the given shapes in degrees.
9643         #
9644         #  @ref tui_measurement_tools_page "Example"
9645         def GetAngle(self, theShape1, theShape2):
9646             """
9647             Get angle between the given shapes in degrees.
9648
9649             Parameters: 
9650                 theShape1,theShape2 Lines or linear edges to find angle between.
9651
9652             Note:
9653                 If both arguments are vectors, the angle is computed in accordance
9654                 with their orientations, otherwise the minimum angle is computed.
9655
9656             Returns:  
9657                 Value of the angle between the given shapes in degrees.
9658             """
9659             # Example: see GEOM_TestMeasures.py
9660             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
9661             RaiseIfFailed("GetAngle", self.MeasuOp)
9662             return anAngle
9663
9664         ## Get angle between the given shapes in radians.
9665         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9666         #  @note If both arguments are vectors, the angle is computed in accordance
9667         #        with their orientations, otherwise the minimum angle is computed.
9668         #  @return Value of the angle between the given shapes in radians.
9669         #
9670         #  @ref tui_measurement_tools_page "Example"
9671         def GetAngleRadians(self, theShape1, theShape2):
9672             """
9673             Get angle between the given shapes in radians.
9674
9675             Parameters: 
9676                 theShape1,theShape2 Lines or linear edges to find angle between.
9677
9678                 
9679             Note:
9680                 If both arguments are vectors, the angle is computed in accordance
9681                 with their orientations, otherwise the minimum angle is computed.
9682
9683             Returns:  
9684                 Value of the angle between the given shapes in radians.
9685             """
9686             # Example: see GEOM_TestMeasures.py
9687             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
9688             RaiseIfFailed("GetAngle", self.MeasuOp)
9689             return anAngle
9690
9691         ## Get angle between the given vectors in degrees.
9692         #  @param theShape1,theShape2 Vectors to find angle between.
9693         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
9694         #                 if False, the opposite vector to the normal vector is used.
9695         #  @return Value of the angle between the given vectors in degrees.
9696         #
9697         #  @ref tui_measurement_tools_page "Example"
9698         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
9699             """
9700             Get angle between the given vectors in degrees.
9701
9702             Parameters: 
9703                 theShape1,theShape2 Vectors to find angle between.
9704                 theFlag If True, the normal vector is defined by the two vectors cross,
9705                         if False, the opposite vector to the normal vector is used.
9706
9707             Returns:  
9708                 Value of the angle between the given vectors in degrees.
9709             """
9710             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
9711             if not theFlag:
9712                 anAngle = 360. - anAngle
9713             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
9714             return anAngle
9715
9716         ## The same as GetAngleVectors, but the result is in radians.
9717         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
9718             """
9719             Get angle between the given vectors in radians.
9720
9721             Parameters: 
9722                 theShape1,theShape2 Vectors to find angle between.
9723                 theFlag If True, the normal vector is defined by the two vectors cross,
9724                         if False, the opposite vector to the normal vector is used.
9725
9726             Returns:  
9727                 Value of the angle between the given vectors in radians.
9728             """
9729             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
9730             return anAngle
9731
9732         ## @name Curve Curvature Measurement
9733         #  Methods for receiving radius of curvature of curves
9734         #  in the given point
9735         ## @{
9736
9737         ## Measure curvature of a curve at a point, set by parameter.
9738         #  @param theCurve a curve.
9739         #  @param theParam parameter.
9740         #  @return radius of curvature of \a theCurve.
9741         #
9742         #  @ref swig_todo "Example"
9743         def CurveCurvatureByParam(self, theCurve, theParam):
9744             """
9745             Measure curvature of a curve at a point, set by parameter.
9746
9747             Parameters: 
9748                 theCurve a curve.
9749                 theParam parameter.
9750
9751             Returns: 
9752                 radius of curvature of theCurve.
9753             """
9754             # Example: see GEOM_TestMeasures.py
9755             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
9756             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
9757             return aCurv
9758
9759         ## Measure curvature of a curve at a point.
9760         #  @param theCurve a curve.
9761         #  @param thePoint given point.
9762         #  @return radius of curvature of \a theCurve.
9763         #
9764         #  @ref swig_todo "Example"
9765         def CurveCurvatureByPoint(self, theCurve, thePoint):
9766             """
9767             Measure curvature of a curve at a point.
9768
9769             Parameters: 
9770                 theCurve a curve.
9771                 thePoint given point.
9772
9773             Returns: 
9774                 radius of curvature of theCurve.           
9775             """
9776             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
9777             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
9778             return aCurv
9779         ## @}
9780
9781         ## @name Surface Curvature Measurement
9782         #  Methods for receiving max and min radius of curvature of surfaces
9783         #  in the given point
9784         ## @{
9785
9786         ## Measure max radius of curvature of surface.
9787         #  @param theSurf the given surface.
9788         #  @param theUParam Value of U-parameter on the referenced surface.
9789         #  @param theVParam Value of V-parameter on the referenced surface.
9790         #  @return max radius of curvature of theSurf.
9791         #
9792         ## @ref swig_todo "Example"
9793         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9794             """
9795             Measure max radius of curvature of surface.
9796
9797             Parameters: 
9798                 theSurf the given surface.
9799                 theUParam Value of U-parameter on the referenced surface.
9800                 theVParam Value of V-parameter on the referenced surface.
9801                 
9802             Returns:     
9803                 max radius of curvature of theSurf.
9804             """
9805             # Example: see GEOM_TestMeasures.py
9806             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9807             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
9808             return aSurf
9809
9810         ## Measure max radius of curvature of surface in the given point
9811         #  @param theSurf the given surface.
9812         #  @param thePoint given point.
9813         #  @return max radius of curvature of theSurf.
9814         #
9815         ## @ref swig_todo "Example"
9816         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
9817             """
9818             Measure max radius of curvature of surface in the given point.
9819
9820             Parameters: 
9821                 theSurf the given surface.
9822                 thePoint given point.
9823                 
9824             Returns:     
9825                 max radius of curvature of theSurf.          
9826             """
9827             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
9828             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
9829             return aSurf
9830
9831         ## Measure min radius of curvature of surface.
9832         #  @param theSurf the given surface.
9833         #  @param theUParam Value of U-parameter on the referenced surface.
9834         #  @param theVParam Value of V-parameter on the referenced surface.
9835         #  @return min radius of curvature of theSurf.
9836         #   
9837         ## @ref swig_todo "Example"
9838         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9839             """
9840             Measure min radius of curvature of surface.
9841
9842             Parameters: 
9843                 theSurf the given surface.
9844                 theUParam Value of U-parameter on the referenced surface.
9845                 theVParam Value of V-parameter on the referenced surface.
9846                 
9847             Returns:     
9848                 Min radius of curvature of theSurf.
9849             """
9850             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9851             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
9852             return aSurf
9853
9854         ## Measure min radius of curvature of surface in the given point
9855         #  @param theSurf the given surface.
9856         #  @param thePoint given point.
9857         #  @return min radius of curvature of theSurf.
9858         #
9859         ## @ref swig_todo "Example"
9860         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
9861             """
9862             Measure min radius of curvature of surface in the given point.
9863
9864             Parameters: 
9865                 theSurf the given surface.
9866                 thePoint given point.
9867                 
9868             Returns:     
9869                 Min radius of curvature of theSurf.          
9870             """
9871             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
9872             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
9873             return aSurf
9874         ## @}
9875
9876         ## Get min and max tolerances of sub-shapes of theShape
9877         #  @param theShape Shape, to get tolerances of.
9878         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
9879         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
9880         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
9881         #  VertMin,VertMax: Min and max tolerances of the vertices.
9882         #
9883         #  @ref tui_measurement_tools_page "Example"
9884         def Tolerance(self,theShape):
9885             """
9886             Get min and max tolerances of sub-shapes of theShape
9887
9888             Parameters: 
9889                 theShape Shape, to get tolerances of.
9890
9891             Returns:    
9892                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
9893                  FaceMin,FaceMax: Min and max tolerances of the faces.
9894                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
9895                  VertMin,VertMax: Min and max tolerances of the vertices.
9896             """
9897             # Example: see GEOM_TestMeasures.py
9898             aTuple = self.MeasuOp.GetTolerance(theShape)
9899             RaiseIfFailed("GetTolerance", self.MeasuOp)
9900             return aTuple
9901
9902         ## Obtain description of the given shape (number of sub-shapes of each type)
9903         #  @param theShape Shape to be described.
9904         #  @return Description of the given shape.
9905         #
9906         #  @ref tui_measurement_tools_page "Example"
9907         def WhatIs(self,theShape):
9908             """
9909             Obtain description of the given shape (number of sub-shapes of each type)
9910
9911             Parameters:
9912                 theShape Shape to be described.
9913
9914             Returns:
9915                 Description of the given shape.
9916             """
9917             # Example: see GEOM_TestMeasures.py
9918             aDescr = self.MeasuOp.WhatIs(theShape)
9919             RaiseIfFailed("WhatIs", self.MeasuOp)
9920             return aDescr
9921
9922         ## Obtain quantity of shapes of the given type in \a theShape.
9923         #  If \a theShape is of type \a theType, it is also counted.
9924         #  @param theShape Shape to be described.
9925         #  @param theType the given ShapeType().
9926         #  @return Quantity of shapes of type \a theType in \a theShape.
9927         #
9928         #  @ref tui_measurement_tools_page "Example"
9929         def NbShapes (self, theShape, theType):
9930             """
9931             Obtain quantity of shapes of the given type in theShape.
9932             If theShape is of type theType, it is also counted.
9933
9934             Parameters:
9935                 theShape Shape to be described.
9936                 theType the given geompy.ShapeType
9937
9938             Returns:
9939                 Quantity of shapes of type theType in theShape.
9940             """
9941             # Example: see GEOM_TestMeasures.py
9942             listSh = self.SubShapeAllIDs(theShape, theType)
9943             Nb = len(listSh)
9944             return Nb
9945
9946         ## Obtain quantity of shapes of each type in \a theShape.
9947         #  The \a theShape is also counted.
9948         #  @param theShape Shape to be described.
9949         #  @return Dictionary of ShapeType() with bound quantities of shapes.
9950         #
9951         #  @ref tui_measurement_tools_page "Example"
9952         def ShapeInfo (self, theShape):
9953             """
9954             Obtain quantity of shapes of each type in theShape.
9955             The theShape is also counted.
9956
9957             Parameters:
9958                 theShape Shape to be described.
9959
9960             Returns:
9961                 Dictionary of geompy.ShapeType with bound quantities of shapes.
9962             """
9963             # Example: see GEOM_TestMeasures.py
9964             aDict = {}
9965             for typeSh in self.ShapeType:
9966                 if typeSh in ( "AUTO", "SHAPE" ): continue
9967                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
9968                 Nb = len(listSh)
9969                 aDict[typeSh] = Nb
9970                 pass
9971             return aDict
9972
9973         def GetCreationInformation(self, theShape):
9974             info = theShape.GetCreationInformation()
9975             # operationName
9976             opName = info.operationName
9977             if not opName: opName = "no info available"
9978             res = "Operation: " + opName
9979             # parameters
9980             for parVal in info.params:
9981                 res += " \n %s = %s" % ( parVal.name, parVal.value )
9982             return res
9983
9984         ## Get a point, situated at the centre of mass of theShape.
9985         #  @param theShape Shape to define centre of mass of.
9986         #  @param theName Object name; when specified, this parameter is used
9987         #         for result publication in the study. Otherwise, if automatic
9988         #         publication is switched on, default value is used for result name.
9989         #
9990         #  @return New GEOM.GEOM_Object, containing the created point.
9991         #
9992         #  @ref tui_measurement_tools_page "Example"
9993         def MakeCDG(self, theShape, theName=None):
9994             """
9995             Get a point, situated at the centre of mass of theShape.
9996
9997             Parameters:
9998                 theShape Shape to define centre of mass of.
9999                 theName Object name; when specified, this parameter is used
10000                         for result publication in the study. Otherwise, if automatic
10001                         publication is switched on, default value is used for result name.
10002
10003             Returns:
10004                 New GEOM.GEOM_Object, containing the created point.
10005             """
10006             # Example: see GEOM_TestMeasures.py
10007             anObj = self.MeasuOp.GetCentreOfMass(theShape)
10008             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
10009             self._autoPublish(anObj, theName, "centerOfMass")
10010             return anObj
10011
10012         ## Get a vertex sub-shape by index depended with orientation.
10013         #  @param theShape Shape to find sub-shape.
10014         #  @param theIndex Index to find vertex by this index (starting from zero)
10015         #  @param theName Object name; when specified, this parameter is used
10016         #         for result publication in the study. Otherwise, if automatic
10017         #         publication is switched on, default value is used for result name.
10018         #
10019         #  @return New GEOM.GEOM_Object, containing the created vertex.
10020         #
10021         #  @ref tui_measurement_tools_page "Example"
10022         def GetVertexByIndex(self, theShape, theIndex, theName=None):
10023             """
10024             Get a vertex sub-shape by index depended with orientation.
10025
10026             Parameters:
10027                 theShape Shape to find sub-shape.
10028                 theIndex Index to find vertex by this index (starting from zero)
10029                 theName Object name; when specified, this parameter is used
10030                         for result publication in the study. Otherwise, if automatic
10031                         publication is switched on, default value is used for result name.
10032
10033             Returns:
10034                 New GEOM.GEOM_Object, containing the created vertex.
10035             """
10036             # Example: see GEOM_TestMeasures.py
10037             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
10038             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
10039             self._autoPublish(anObj, theName, "vertex")
10040             return anObj
10041
10042         ## Get the first vertex of wire/edge depended orientation.
10043         #  @param theShape Shape to find first vertex.
10044         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created vertex.
10049         #
10050         #  @ref tui_measurement_tools_page "Example"
10051         def GetFirstVertex(self, theShape, theName=None):
10052             """
10053             Get the first vertex of wire/edge depended orientation.
10054
10055             Parameters:
10056                 theShape Shape to find first vertex.
10057                 theName Object name; when specified, this parameter is used
10058                         for result publication in the study. Otherwise, if automatic
10059                         publication is switched on, default value is used for result name.
10060
10061             Returns:    
10062                 New GEOM.GEOM_Object, containing the created vertex.
10063             """
10064             # Example: see GEOM_TestMeasures.py
10065             # note: auto-publishing is done in self.GetVertexByIndex()
10066             anObj = self.GetVertexByIndex(theShape, 0, theName)
10067             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
10068             return anObj
10069
10070         ## Get the last vertex of wire/edge depended orientation.
10071         #  @param theShape Shape to find last vertex.
10072         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created vertex.
10077         #
10078         #  @ref tui_measurement_tools_page "Example"
10079         def GetLastVertex(self, theShape, theName=None):
10080             """
10081             Get the last vertex of wire/edge depended orientation.
10082
10083             Parameters: 
10084                 theShape Shape to find last vertex.
10085                 theName Object name; when specified, this parameter is used
10086                         for result publication in the study. Otherwise, if automatic
10087                         publication is switched on, default value is used for result name.
10088
10089             Returns:   
10090                 New GEOM.GEOM_Object, containing the created vertex.
10091             """
10092             # Example: see GEOM_TestMeasures.py
10093             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
10094             # note: auto-publishing is done in self.GetVertexByIndex()
10095             anObj = self.GetVertexByIndex(theShape, (nb_vert-1), theName)
10096             RaiseIfFailed("GetLastVertex", self.MeasuOp)
10097             return anObj
10098
10099         ## Get a normale to the given face. If the point is not given,
10100         #  the normale is calculated at the center of mass.
10101         #  @param theFace Face to define normale of.
10102         #  @param theOptionalPoint Point to compute the normale at.
10103         #  @param theName Object name; when specified, this parameter is used
10104         #         for result publication in the study. Otherwise, if automatic
10105         #         publication is switched on, default value is used for result name.
10106         #
10107         #  @return New GEOM.GEOM_Object, containing the created vector.
10108         #
10109         #  @ref swig_todo "Example"
10110         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
10111             """
10112             Get a normale to the given face. If the point is not given,
10113             the normale is calculated at the center of mass.
10114             
10115             Parameters: 
10116                 theFace Face to define normale of.
10117                 theOptionalPoint Point to compute the normale at.
10118                 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             Returns:   
10123                 New GEOM.GEOM_Object, containing the created vector.
10124             """
10125             # Example: see GEOM_TestMeasures.py
10126             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
10127             RaiseIfFailed("GetNormal", self.MeasuOp)
10128             self._autoPublish(anObj, theName, "normal")
10129             return anObj
10130
10131         ## Check a topology of the given shape.
10132         #  @param theShape Shape to check validity of.
10133         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
10134         #                        if TRUE, the shape's geometry will be checked also.
10135         #  @param theReturnStatus If FALSE and if theShape is invalid, a description \n
10136         #                        of problem is printed.
10137         #                        if TRUE and if theShape is invalid, the description 
10138         #                        of problem is also returned.
10139         #  @return TRUE, if the shape "seems to be valid".
10140         #
10141         #  @ref tui_measurement_tools_page "Example"
10142         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
10143             """
10144             Check a topology of the given shape.
10145
10146             Parameters: 
10147                 theShape Shape to check validity of.
10148                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
10149                                if TRUE, the shape's geometry will be checked also.
10150                 theReturnStatus If FALSE and if theShape is invalid, a description
10151                                 of problem is printed.
10152                                 if TRUE and if theShape is invalid, the description 
10153                                 of problem is returned.
10154
10155             Returns:   
10156                 TRUE, if the shape "seems to be valid".
10157                 If theShape is invalid, prints a description of problem.
10158                 This description can also be returned.
10159             """
10160             # Example: see GEOM_TestMeasures.py
10161             if theIsCheckGeom:
10162                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
10163                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
10164             else:
10165                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
10166                 RaiseIfFailed("CheckShape", self.MeasuOp)
10167             if IsValid == 0:
10168                 if theReturnStatus == 0:
10169                     print Status
10170             if theReturnStatus == 1:
10171               return (IsValid, Status)
10172             return IsValid
10173
10174         ## Detect self-intersections in the given shape.
10175         #  @param theShape Shape to check.
10176         #  @return TRUE, if the shape contains no self-intersections.
10177         #
10178         #  @ref tui_measurement_tools_page "Example"
10179         def CheckSelfIntersections(self, theShape):
10180             """
10181             Detect self-intersections in the given shape.
10182
10183             Parameters: 
10184                 theShape Shape to check.
10185
10186             Returns:   
10187                 TRUE, if the shape contains no self-intersections.
10188             """
10189             # Example: see GEOM_TestMeasures.py
10190             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
10191             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
10192             return IsValid
10193
10194         ## Get position (LCS) of theShape.
10195         #
10196         #  Origin of the LCS is situated at the shape's center of mass.
10197         #  Axes of the LCS are obtained from shape's location or,
10198         #  if the shape is a planar face, from position of its plane.
10199         #
10200         #  @param theShape Shape to calculate position of.
10201         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10202         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
10203         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10204         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10205         #
10206         #  @ref swig_todo "Example"
10207         def GetPosition(self,theShape):
10208             """
10209             Get position (LCS) of theShape.
10210             Origin of the LCS is situated at the shape's center of mass.
10211             Axes of the LCS are obtained from shape's location or,
10212             if the shape is a planar face, from position of its plane.
10213
10214             Parameters: 
10215                 theShape Shape to calculate position of.
10216
10217             Returns:  
10218                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10219                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
10220                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10221                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10222             """
10223             # Example: see GEOM_TestMeasures.py
10224             aTuple = self.MeasuOp.GetPosition(theShape)
10225             RaiseIfFailed("GetPosition", self.MeasuOp)
10226             return aTuple
10227
10228         ## Get kind of theShape.
10229         #
10230         #  @param theShape Shape to get a kind of.
10231         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
10232         #          and a list of parameters, describing the shape.
10233         #  @note  Concrete meaning of each value, returned via \a theIntegers
10234         #         or \a theDoubles list depends on the kind() of the shape.
10235         #
10236         #  @ref swig_todo "Example"
10237         def KindOfShape(self,theShape):
10238             """
10239             Get kind of theShape.
10240          
10241             Parameters: 
10242                 theShape Shape to get a kind of.
10243
10244             Returns:
10245                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
10246                     and a list of parameters, describing the shape.
10247             Note:
10248                 Concrete meaning of each value, returned via theIntegers
10249                 or theDoubles list depends on the geompy.kind of the shape
10250             """
10251             # Example: see GEOM_TestMeasures.py
10252             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
10253             RaiseIfFailed("KindOfShape", self.MeasuOp)
10254
10255             aKind  = aRoughTuple[0]
10256             anInts = aRoughTuple[1]
10257             aDbls  = aRoughTuple[2]
10258
10259             # Now there is no exception from this rule:
10260             aKindTuple = [aKind] + aDbls + anInts
10261
10262             # If they are we will regroup parameters for such kind of shape.
10263             # For example:
10264             #if aKind == kind.SOME_KIND:
10265             #    #  SOME_KIND     int int double int double double
10266             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
10267
10268             return aKindTuple
10269
10270         # end of l2_measure
10271         ## @}
10272
10273         ## @addtogroup l2_import_export
10274         ## @{
10275
10276         ## Import a shape from the BREP or IGES or STEP file
10277         #  (depends on given format) with given name.
10278         #  @param theFileName The file, containing the shape.
10279         #  @param theFormatName Specify format for the file reading.
10280         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
10281         #         If format 'IGES_SCALE' is used instead of 'IGES' or
10282         #            format 'STEP_SCALE' is used instead of 'STEP',
10283         #            length unit will be set to 'meter' and result model will be scaled.
10284         #  @param theName Object name; when specified, this parameter is used
10285         #         for result publication in the study. Otherwise, if automatic
10286         #         publication is switched on, default value is used for result name.
10287         #
10288         #  @return New GEOM.GEOM_Object, containing the imported shape.
10289         #          If material names are imported it returns the list of
10290         #          objects. The first one is the imported object followed by
10291         #          material groups.
10292         #  @note Auto publishing is allowed for the shape itself. Imported
10293         #        material groups are not automatically published.
10294         #
10295         #  @ref swig_Import_Export "Example"
10296         def ImportFile(self, theFileName, theFormatName, theName=None):
10297             """
10298             Import a shape from the BREP or IGES or STEP file
10299             (depends on given format) with given name.
10300
10301             Parameters: 
10302                 theFileName The file, containing the shape.
10303                 theFormatName Specify format for the file reading.
10304                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
10305                     If format 'IGES_SCALE' is used instead of 'IGES' or
10306                        format 'STEP_SCALE' is used instead of 'STEP',
10307                        length unit will be set to 'meter' and result model will be scaled.
10308                 theName Object name; when specified, this parameter is used
10309                         for result publication in the study. Otherwise, if automatic
10310                         publication is switched on, default value is used for result name.
10311
10312             Returns:
10313                 New GEOM.GEOM_Object, containing the imported shape.
10314                 If material names are imported it returns the list of
10315                 objects. The first one is the imported object followed by
10316                 material groups.
10317             Note:
10318                 Auto publishing is allowed for the shape itself. Imported
10319                 material groups are not automatically published.
10320             """
10321             # Example: see GEOM_TestOthers.py
10322             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
10323             RaiseIfFailed("ImportFile", self.InsertOp)
10324             aNbObj = len(aListObj)
10325             if aNbObj > 0:
10326                 self._autoPublish(aListObj[0], theName, "imported")
10327             if aNbObj == 1:
10328                 return aListObj[0]
10329             return aListObj
10330
10331         ## Deprecated analog of ImportFile()
10332         def Import(self, theFileName, theFormatName, theName=None):
10333             """
10334             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
10335             """
10336             print "WARNING: Function Import is deprecated, use ImportFile instead"
10337             # note: auto-publishing is done in self.ImportFile()
10338             return self.ImportFile(theFileName, theFormatName, theName)
10339
10340         ## Shortcut to ImportFile() for BREP format.
10341         #  Import a shape from the BREP file with given name.
10342         #  @param theFileName The file, containing the shape.
10343         #  @param theName Object name; when specified, this parameter is used
10344         #         for result publication in the study. Otherwise, if automatic
10345         #         publication is switched on, default value is used for result name.
10346         #
10347         #  @return New GEOM.GEOM_Object, containing the imported shape.
10348         #
10349         #  @ref swig_Import_Export "Example"
10350         def ImportBREP(self, theFileName, theName=None):
10351             """
10352             geompy.ImportFile(...) function for BREP format
10353             Import a shape from the BREP file with given name.
10354
10355             Parameters: 
10356                 theFileName The file, containing the shape.
10357                 theName Object name; when specified, this parameter is used
10358                         for result publication in the study. Otherwise, if automatic
10359                         publication is switched on, default value is used for result name.
10360
10361             Returns:
10362                 New GEOM.GEOM_Object, containing the imported shape.
10363             """
10364             # Example: see GEOM_TestOthers.py
10365             # note: auto-publishing is done in self.ImportFile()
10366             return self.ImportFile(theFileName, "BREP", theName)
10367
10368         ## Shortcut to ImportFile() for IGES format
10369         #  Import a shape from the IGES file with given name.
10370         #  @param theFileName The file, containing the shape.
10371         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10372         #                     and result model will be scaled, if its units are not meters.
10373         #                     If False (default), file length units will be taken into account.
10374         #  @param theName Object name; when specified, this parameter is used
10375         #         for result publication in the study. Otherwise, if automatic
10376         #         publication is switched on, default value is used for result name.
10377         #
10378         #  @return New GEOM.GEOM_Object, containing the imported shape.
10379         #
10380         #  @ref swig_Import_Export "Example"
10381         def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
10382             """
10383             geompy.ImportFile(...) function for IGES format
10384
10385             Parameters:
10386                 theFileName The file, containing the shape.
10387                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10388                             and result model will be scaled, if its units are not meters.
10389                             If False (default), file length units will be taken into account.
10390                 theName Object name; when specified, this parameter is used
10391                         for result publication in the study. Otherwise, if automatic
10392                         publication is switched on, default value is used for result name.
10393
10394             Returns:
10395                 New GEOM.GEOM_Object, containing the imported shape.
10396             """
10397             # Example: see GEOM_TestOthers.py
10398             # note: auto-publishing is done in self.ImportFile()
10399             if ignoreUnits:
10400                 return self.ImportFile(theFileName, "IGES_SCALE", theName)
10401             return self.ImportFile(theFileName, "IGES", theName)
10402
10403         ## Return length unit from given IGES file
10404         #  @param theFileName The file, containing the shape.
10405         #  @return String, containing the units name.
10406         #
10407         #  @ref swig_Import_Export "Example"
10408         def GetIGESUnit(self, theFileName):
10409             """
10410             Return length units from given IGES file
10411
10412             Parameters:
10413                 theFileName The file, containing the shape.
10414
10415             Returns:
10416                 String, containing the units name.
10417             """
10418             # Example: see GEOM_TestOthers.py
10419             aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
10420             return aUnitName
10421
10422         ## Shortcut to ImportFile() for STEP format
10423         #  Import a shape from the STEP file with given name.
10424         #  @param theFileName The file, containing the shape.
10425         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10426         #                     and result model will be scaled, if its units are not meters.
10427         #                     If False (default), file length units will be taken into account.
10428         #  @param theName Object name; when specified, this parameter is used
10429         #         for result publication in the study. Otherwise, if automatic
10430         #         publication is switched on, default value is used for result name.
10431         #
10432         #  @return New GEOM.GEOM_Object, containing the imported shape.
10433         #          If material names are imported it returns the list of
10434         #          objects. The first one is the imported object followed by
10435         #          material groups.
10436         #  @note Auto publishing is allowed for the shape itself. Imported
10437         #        material groups are not automatically published.
10438         #
10439         #  @ref swig_Import_Export "Example"
10440         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
10441             """
10442             geompy.ImportFile(...) function for STEP format
10443
10444             Parameters:
10445                 theFileName The file, containing the shape.
10446                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10447                             and result model will be scaled, if its units are not meters.
10448                             If False (default), file length units will be taken into account.
10449                 theName Object name; when specified, this parameter is used
10450                         for result publication in the study. Otherwise, if automatic
10451                         publication is switched on, default value is used for result name.
10452
10453             Returns:
10454                 New GEOM.GEOM_Object, containing the imported shape.
10455                 If material names are imported it returns the list of
10456                 objects. The first one is the imported object followed by
10457                 material groups.
10458             Note:
10459                 Auto publishing is allowed for the shape itself. Imported
10460                 material groups are not automatically published.
10461             """
10462             # Example: see GEOM_TestOthers.py
10463             # note: auto-publishing is done in self.ImportFile()
10464             if ignoreUnits:
10465                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
10466             return self.ImportFile(theFileName, "STEP", theName)
10467
10468         ## Return length unit from given IGES or STEP file
10469         #  @param theFileName The file, containing the shape.
10470         #  @return String, containing the units name.
10471         #
10472         #  @ref swig_Import_Export "Example"
10473         def GetSTEPUnit(self, theFileName):
10474             """
10475             Return length units from given STEP file
10476
10477             Parameters:
10478                 theFileName The file, containing the shape.
10479
10480             Returns:
10481                 String, containing the units name.
10482             """
10483             # Example: see GEOM_TestOthers.py
10484             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
10485             return aUnitName
10486
10487         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10488         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10489         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10490         #  @param theStream The BRep binary stream.
10491         #  @param theName Object name; when specified, this parameter is used
10492         #         for result publication in the study. Otherwise, if automatic
10493         #         publication is switched on, default value is used for result name.
10494         #
10495         #  @return New GEOM_Object, containing the shape, read from theStream.
10496         #
10497         #  @ref swig_Import_Export "Example"
10498         def RestoreShape (self, theStream, theName=None):
10499             """
10500             Read a shape from the binary stream, containing its bounding representation (BRep).
10501
10502             Note:
10503                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10504
10505             Parameters: 
10506                 theStream The BRep binary stream.
10507                 theName Object name; when specified, this parameter is used
10508                         for result publication in the study. Otherwise, if automatic
10509                         publication is switched on, default value is used for result name.
10510
10511             Returns:
10512                 New GEOM_Object, containing the shape, read from theStream.
10513             """
10514             # Example: see GEOM_TestOthers.py
10515             anObj = self.InsertOp.RestoreShape(theStream)
10516             RaiseIfFailed("RestoreShape", self.InsertOp)
10517             self._autoPublish(anObj, theName, "restored")
10518             return anObj
10519
10520         ## Export the given shape into a file with given name.
10521         #  @param theObject Shape to be stored in the file.
10522         #  @param theFileName Name of the file to store the given shape in.
10523         #  @param theFormatName Specify format for the shape storage.
10524         #         Available formats can be obtained with
10525         #         geompy.InsertOp.ExportTranslators()[0] method.
10526         #
10527         #  @ref swig_Import_Export "Example"
10528         def Export(self, theObject, theFileName, theFormatName):
10529             """
10530             Export the given shape into a file with given name.
10531
10532             Parameters: 
10533                 theObject Shape to be stored in the file.
10534                 theFileName Name of the file to store the given shape in.
10535                 theFormatName Specify format for the shape storage.
10536                               Available formats can be obtained with
10537                               geompy.InsertOp.ExportTranslators()[0] method.
10538             """
10539             # Example: see GEOM_TestOthers.py
10540             self.InsertOp.Export(theObject, theFileName, theFormatName)
10541             if self.InsertOp.IsDone() == 0:
10542                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10543                 pass
10544             pass
10545
10546         ## Shortcut to Export() for BREP format
10547         #
10548         #  @ref swig_Import_Export "Example"
10549         def ExportBREP(self,theObject, theFileName):
10550             """
10551             geompy.Export(...) function for BREP format
10552             """
10553             # Example: see GEOM_TestOthers.py
10554             return self.Export(theObject, theFileName, "BREP")
10555
10556         ## Shortcut to Export() for IGES format
10557         #
10558         #  @ref swig_Import_Export "Example"
10559         def ExportIGES(self,theObject, theFileName):
10560             """
10561             geompy.Export(...) function for IGES format
10562             """
10563             # Example: see GEOM_TestOthers.py
10564             return self.Export(theObject, theFileName, "IGES")
10565
10566         ## Shortcut to Export() for STEP format
10567         #
10568         #  @ref swig_Import_Export "Example"
10569         def ExportSTEP(self,theObject, theFileName):
10570             """
10571             geompy.Export(...) function for STEP format
10572             """
10573             # Example: see GEOM_TestOthers.py
10574             return self.Export(theObject, theFileName, "STEP")
10575
10576         # end of l2_import_export
10577         ## @}
10578
10579         ## @addtogroup l3_blocks
10580         ## @{
10581
10582         ## Create a quadrangle face from four edges. Order of Edges is not
10583         #  important. It is  not necessary that edges share the same vertex.
10584         #  @param E1,E2,E3,E4 Edges for the face bound.
10585         #  @param theName Object name; when specified, this parameter is used
10586         #         for result publication in the study. Otherwise, if automatic
10587         #         publication is switched on, default value is used for result name.
10588         #
10589         #  @return New GEOM.GEOM_Object, containing the created face.
10590         #
10591         #  @ref tui_building_by_blocks_page "Example"
10592         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10593             """
10594             Create a quadrangle face from four edges. Order of Edges is not
10595             important. It is  not necessary that edges share the same vertex.
10596
10597             Parameters: 
10598                 E1,E2,E3,E4 Edges for the face bound.
10599                 theName Object name; when specified, this parameter is used
10600                         for result publication in the study. Otherwise, if automatic
10601                         publication is switched on, default value is used for result name.
10602
10603             Returns: 
10604                 New GEOM.GEOM_Object, containing the created face.
10605
10606             Example of usage:               
10607                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10608             """
10609             # Example: see GEOM_Spanner.py
10610             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10611             RaiseIfFailed("MakeQuad", self.BlocksOp)
10612             self._autoPublish(anObj, theName, "quad")
10613             return anObj
10614
10615         ## Create a quadrangle face on two edges.
10616         #  The missing edges will be built by creating the shortest ones.
10617         #  @param E1,E2 Two opposite edges for the face.
10618         #  @param theName Object name; when specified, this parameter is used
10619         #         for result publication in the study. Otherwise, if automatic
10620         #         publication is switched on, default value is used for result name.
10621         #
10622         #  @return New GEOM.GEOM_Object, containing the created face.
10623         #
10624         #  @ref tui_building_by_blocks_page "Example"
10625         def MakeQuad2Edges(self, E1, E2, theName=None):
10626             """
10627             Create a quadrangle face on two edges.
10628             The missing edges will be built by creating the shortest ones.
10629
10630             Parameters: 
10631                 E1,E2 Two opposite edges for the face.
10632                 theName Object name; when specified, this parameter is used
10633                         for result publication in the study. Otherwise, if automatic
10634                         publication is switched on, default value is used for result name.
10635
10636             Returns: 
10637                 New GEOM.GEOM_Object, containing the created face.
10638             
10639             Example of usage:
10640                 # create vertices
10641                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10642                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10643                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10644                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10645                 # create edges
10646                 edge1 = geompy.MakeEdge(p1, p2)
10647                 edge2 = geompy.MakeEdge(p3, p4)
10648                 # create a quadrangle face from two edges
10649                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10650             """
10651             # Example: see GEOM_Spanner.py
10652             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10653             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10654             self._autoPublish(anObj, theName, "quad")
10655             return anObj
10656
10657         ## Create a quadrangle face with specified corners.
10658         #  The missing edges will be built by creating the shortest ones.
10659         #  @param V1,V2,V3,V4 Corner vertices for the face.
10660         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created face.
10665         #
10666         #  @ref tui_building_by_blocks_page "Example 1"
10667         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10668         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10669             """
10670             Create a quadrangle face with specified corners.
10671             The missing edges will be built by creating the shortest ones.
10672
10673             Parameters: 
10674                 V1,V2,V3,V4 Corner vertices for the face.
10675                 theName Object name; when specified, this parameter is used
10676                         for result publication in the study. Otherwise, if automatic
10677                         publication is switched on, default value is used for result name.
10678
10679             Returns: 
10680                 New GEOM.GEOM_Object, containing the created face.
10681
10682             Example of usage:
10683                 # create vertices
10684                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10685                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10686                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10687                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10688                 # create a quadrangle from four points in its corners
10689                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10690             """
10691             # Example: see GEOM_Spanner.py
10692             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10693             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10694             self._autoPublish(anObj, theName, "quad")
10695             return anObj
10696
10697         ## Create a hexahedral solid, bounded by the six given faces. Order of
10698         #  faces is not important. It is  not necessary that Faces share the same edge.
10699         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10700         #  @param theName Object name; when specified, this parameter is used
10701         #         for result publication in the study. Otherwise, if automatic
10702         #         publication is switched on, default value is used for result name.
10703         #
10704         #  @return New GEOM.GEOM_Object, containing the created solid.
10705         #
10706         #  @ref tui_building_by_blocks_page "Example 1"
10707         #  \n @ref swig_MakeHexa "Example 2"
10708         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
10709             """
10710             Create a hexahedral solid, bounded by the six given faces. Order of
10711             faces is not important. It is  not necessary that Faces share the same edge.
10712
10713             Parameters: 
10714                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10715                 theName Object name; when specified, this parameter is used
10716                         for result publication in the study. Otherwise, if automatic
10717                         publication is switched on, default value is used for result name.
10718
10719             Returns:    
10720                 New GEOM.GEOM_Object, containing the created solid.
10721
10722             Example of usage:
10723                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
10724             """
10725             # Example: see GEOM_Spanner.py
10726             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
10727             RaiseIfFailed("MakeHexa", self.BlocksOp)
10728             self._autoPublish(anObj, theName, "hexa")
10729             return anObj
10730
10731         ## Create a hexahedral solid between two given faces.
10732         #  The missing faces will be built by creating the smallest ones.
10733         #  @param F1,F2 Two opposite faces for the hexahedral solid.
10734         #  @param theName Object name; when specified, this parameter is used
10735         #         for result publication in the study. Otherwise, if automatic
10736         #         publication is switched on, default value is used for result name.
10737         #
10738         #  @return New GEOM.GEOM_Object, containing the created solid.
10739         #
10740         #  @ref tui_building_by_blocks_page "Example 1"
10741         #  \n @ref swig_MakeHexa2Faces "Example 2"
10742         def MakeHexa2Faces(self, F1, F2, theName=None):
10743             """
10744             Create a hexahedral solid between two given faces.
10745             The missing faces will be built by creating the smallest ones.
10746
10747             Parameters: 
10748                 F1,F2 Two opposite faces for the hexahedral solid.
10749                 theName Object name; when specified, this parameter is used
10750                         for result publication in the study. Otherwise, if automatic
10751                         publication is switched on, default value is used for result name.
10752
10753             Returns:
10754                 New GEOM.GEOM_Object, containing the created solid.
10755
10756             Example of usage:
10757                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
10758             """
10759             # Example: see GEOM_Spanner.py
10760             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
10761             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
10762             self._autoPublish(anObj, theName, "hexa")
10763             return anObj
10764
10765         # end of l3_blocks
10766         ## @}
10767
10768         ## @addtogroup l3_blocks_op
10769         ## @{
10770
10771         ## Get a vertex, found in the given shape by its coordinates.
10772         #  @param theShape Block or a compound of blocks.
10773         #  @param theX,theY,theZ Coordinates of the sought vertex.
10774         #  @param theEpsilon Maximum allowed distance between the resulting
10775         #                    vertex and point with the given coordinates.
10776         #  @param 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         #  @return New GEOM.GEOM_Object, containing the found vertex.
10781         #
10782         #  @ref swig_GetPoint "Example"
10783         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
10784             """
10785             Get a vertex, found in the given shape by its coordinates.
10786
10787             Parameters: 
10788                 theShape Block or a compound of blocks.
10789                 theX,theY,theZ Coordinates of the sought vertex.
10790                 theEpsilon Maximum allowed distance between the resulting
10791                            vertex and point with the given coordinates.
10792                 theName Object name; when specified, this parameter is used
10793                         for result publication in the study. Otherwise, if automatic
10794                         publication is switched on, default value is used for result name.
10795
10796             Returns:                  
10797                 New GEOM.GEOM_Object, containing the found vertex.
10798
10799             Example of usage:
10800                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
10801             """
10802             # Example: see GEOM_TestOthers.py
10803             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
10804             RaiseIfFailed("GetPoint", self.BlocksOp)
10805             self._autoPublish(anObj, theName, "vertex")
10806             return anObj
10807
10808         ## Find a vertex of the given shape, which has minimal distance to the given point.
10809         #  @param theShape Any shape.
10810         #  @param thePoint Point, close to the desired vertex.
10811         #  @param theName Object name; when specified, this parameter is used
10812         #         for result publication in the study. Otherwise, if automatic
10813         #         publication is switched on, default value is used for result name.
10814         #
10815         #  @return New GEOM.GEOM_Object, containing the found vertex.
10816         #
10817         #  @ref swig_GetVertexNearPoint "Example"
10818         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
10819             """
10820             Find a vertex of the given shape, which has minimal distance to the given point.
10821
10822             Parameters: 
10823                 theShape Any shape.
10824                 thePoint Point, close to the desired vertex.
10825                 theName Object name; when specified, this parameter is used
10826                         for result publication in the study. Otherwise, if automatic
10827                         publication is switched on, default value is used for result name.
10828
10829             Returns:
10830                 New GEOM.GEOM_Object, containing the found vertex.
10831
10832             Example of usage:
10833                 pmidle = geompy.MakeVertex(50, 0, 50)
10834                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
10835             """
10836             # Example: see GEOM_TestOthers.py
10837             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
10838             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
10839             self._autoPublish(anObj, theName, "vertex")
10840             return anObj
10841
10842         ## Get an edge, found in the given shape by two given vertices.
10843         #  @param theShape Block or a compound of blocks.
10844         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
10845         #  @param theName Object name; when specified, this parameter is used
10846         #         for result publication in the study. Otherwise, if automatic
10847         #         publication is switched on, default value is used for result name.
10848         #
10849         #  @return New GEOM.GEOM_Object, containing the found edge.
10850         #
10851         #  @ref swig_GetEdge "Example"
10852         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
10853             """
10854             Get an edge, found in the given shape by two given vertices.
10855
10856             Parameters: 
10857                 theShape Block or a compound of blocks.
10858                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
10859                 theName Object name; when specified, this parameter is used
10860                         for result publication in the study. Otherwise, if automatic
10861                         publication is switched on, default value is used for result name.
10862
10863             Returns:
10864                 New GEOM.GEOM_Object, containing the found edge.
10865             """
10866             # Example: see GEOM_Spanner.py
10867             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
10868             RaiseIfFailed("GetEdge", self.BlocksOp)
10869             self._autoPublish(anObj, theName, "edge")
10870             return anObj
10871
10872         ## Find an edge of the given shape, which has minimal distance to the given point.
10873         #  @param theShape Block or a compound of blocks.
10874         #  @param thePoint Point, close to the desired edge.
10875         #  @param theName Object name; when specified, this parameter is used
10876         #         for result publication in the study. Otherwise, if automatic
10877         #         publication is switched on, default value is used for result name.
10878         #
10879         #  @return New GEOM.GEOM_Object, containing the found edge.
10880         #
10881         #  @ref swig_GetEdgeNearPoint "Example"
10882         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
10883             """
10884             Find an edge of the given shape, which has minimal distance to the given point.
10885
10886             Parameters: 
10887                 theShape Block or a compound of blocks.
10888                 thePoint Point, close to the desired edge.
10889                 theName Object name; when specified, this parameter is used
10890                         for result publication in the study. Otherwise, if automatic
10891                         publication is switched on, default value is used for result name.
10892
10893             Returns:
10894                 New GEOM.GEOM_Object, containing the found edge.
10895             """
10896             # Example: see GEOM_TestOthers.py
10897             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
10898             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
10899             self._autoPublish(anObj, theName, "edge")
10900             return anObj
10901
10902         ## Returns a face, found in the given shape by four given corner vertices.
10903         #  @param theShape Block or a compound of blocks.
10904         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10905         #  @param theName Object name; when specified, this parameter is used
10906         #         for result publication in the study. Otherwise, if automatic
10907         #         publication is switched on, default value is used for result name.
10908         #
10909         #  @return New GEOM.GEOM_Object, containing the found face.
10910         #
10911         #  @ref swig_todo "Example"
10912         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
10913             """
10914             Returns a face, found in the given shape by four given corner vertices.
10915
10916             Parameters:
10917                 theShape Block or a compound of blocks.
10918                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10919                 theName Object name; when specified, this parameter is used
10920                         for result publication in the study. Otherwise, if automatic
10921                         publication is switched on, default value is used for result name.
10922
10923             Returns:
10924                 New GEOM.GEOM_Object, containing the found face.
10925             """
10926             # Example: see GEOM_Spanner.py
10927             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
10928             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
10929             self._autoPublish(anObj, theName, "face")
10930             return anObj
10931
10932         ## Get a face of block, found in the given shape by two given edges.
10933         #  @param theShape Block or a compound of blocks.
10934         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
10935         #  @param theName Object name; when specified, this parameter is used
10936         #         for result publication in the study. Otherwise, if automatic
10937         #         publication is switched on, default value is used for result name.
10938         #
10939         #  @return New GEOM.GEOM_Object, containing the found face.
10940         #
10941         #  @ref swig_todo "Example"
10942         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
10943             """
10944             Get a face of block, found in the given shape by two given edges.
10945
10946             Parameters:
10947                 theShape Block or a compound of blocks.
10948                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
10949                 theName Object name; when specified, this parameter is used
10950                         for result publication in the study. Otherwise, if automatic
10951                         publication is switched on, default value is used for result name.
10952
10953             Returns:
10954                 New GEOM.GEOM_Object, containing the found face.
10955             """
10956             # Example: see GEOM_Spanner.py
10957             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
10958             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
10959             self._autoPublish(anObj, theName, "face")
10960             return anObj
10961
10962         ## Find a face, opposite to the given one in the given block.
10963         #  @param theBlock Must be a hexahedral solid.
10964         #  @param theFace Face of \a theBlock, opposite to the desired face.
10965         #  @param theName Object name; when specified, this parameter is used
10966         #         for result publication in the study. Otherwise, if automatic
10967         #         publication is switched on, default value is used for result name.
10968         #
10969         #  @return New GEOM.GEOM_Object, containing the found face.
10970         #
10971         #  @ref swig_GetOppositeFace "Example"
10972         def GetOppositeFace(self, theBlock, theFace, theName=None):
10973             """
10974             Find a face, opposite to the given one in the given block.
10975
10976             Parameters:
10977                 theBlock Must be a hexahedral solid.
10978                 theFace Face of theBlock, opposite to the desired face.
10979                 theName Object name; when specified, this parameter is used
10980                         for result publication in the study. Otherwise, if automatic
10981                         publication is switched on, default value is used for result name.
10982
10983             Returns: 
10984                 New GEOM.GEOM_Object, containing the found face.
10985             """
10986             # Example: see GEOM_Spanner.py
10987             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
10988             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
10989             self._autoPublish(anObj, theName, "face")
10990             return anObj
10991
10992         ## Find a face of the given shape, which has minimal distance to the given point.
10993         #  @param theShape Block or a compound of blocks.
10994         #  @param thePoint Point, close to the desired face.
10995         #  @param theName Object name; when specified, this parameter is used
10996         #         for result publication in the study. Otherwise, if automatic
10997         #         publication is switched on, default value is used for result name.
10998         #
10999         #  @return New GEOM.GEOM_Object, containing the found face.
11000         #
11001         #  @ref swig_GetFaceNearPoint "Example"
11002         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
11003             """
11004             Find a face of the given shape, which has minimal distance to the given point.
11005
11006             Parameters:
11007                 theShape Block or a compound of blocks.
11008                 thePoint Point, close to the desired face.
11009                 theName Object name; when specified, this parameter is used
11010                         for result publication in the study. Otherwise, if automatic
11011                         publication is switched on, default value is used for result name.
11012
11013             Returns:
11014                 New GEOM.GEOM_Object, containing the found face.
11015             """
11016             # Example: see GEOM_Spanner.py
11017             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
11018             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
11019             self._autoPublish(anObj, theName, "face")
11020             return anObj
11021
11022         ## Find a face of block, whose outside normale has minimal angle with the given vector.
11023         #  @param theBlock Block or a compound of blocks.
11024         #  @param theVector Vector, close to the normale of the desired face.
11025         #  @param theName Object name; when specified, this parameter is used
11026         #         for result publication in the study. Otherwise, if automatic
11027         #         publication is switched on, default value is used for result name.
11028         #
11029         #  @return New GEOM.GEOM_Object, containing the found face.
11030         #
11031         #  @ref swig_todo "Example"
11032         def GetFaceByNormale(self, theBlock, theVector, theName=None):
11033             """
11034             Find a face of block, whose outside normale has minimal angle with the given vector.
11035
11036             Parameters:
11037                 theBlock Block or a compound of blocks.
11038                 theVector Vector, close to the normale of the desired face.
11039                 theName Object name; when specified, this parameter is used
11040                         for result publication in the study. Otherwise, if automatic
11041                         publication is switched on, default value is used for result name.
11042
11043             Returns:
11044                 New GEOM.GEOM_Object, containing the found face.
11045             """
11046             # Example: see GEOM_Spanner.py
11047             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
11048             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
11049             self._autoPublish(anObj, theName, "face")
11050             return anObj
11051
11052         ## Find all sub-shapes of type \a theShapeType of the given shape,
11053         #  which have minimal distance to the given point.
11054         #  @param theShape Any shape.
11055         #  @param thePoint Point, close to the desired shape.
11056         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
11057         #  @param theTolerance The tolerance for distances comparison. All shapes
11058         #                      with distances to the given point in interval
11059         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
11060         #  @param theName Object name; when specified, this parameter is used
11061         #         for result publication in the study. Otherwise, if automatic
11062         #         publication is switched on, default value is used for result name.
11063         #
11064         #  @return New GEOM_Object, containing a group of all found shapes.
11065         #
11066         #  @ref swig_GetShapesNearPoint "Example"
11067         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
11068             """
11069             Find all sub-shapes of type theShapeType of the given shape,
11070             which have minimal distance to the given point.
11071
11072             Parameters:
11073                 theShape Any shape.
11074                 thePoint Point, close to the desired shape.
11075                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
11076                 theTolerance The tolerance for distances comparison. All shapes
11077                                 with distances to the given point in interval
11078                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
11079                 theName Object name; when specified, this parameter is used
11080                         for result publication in the study. Otherwise, if automatic
11081                         publication is switched on, default value is used for result name.
11082
11083             Returns:
11084                 New GEOM_Object, containing a group of all found shapes.
11085             """
11086             # Example: see GEOM_TestOthers.py
11087             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
11088             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
11089             self._autoPublish(anObj, theName, "group")
11090             return anObj
11091
11092         # end of l3_blocks_op
11093         ## @}
11094
11095         ## @addtogroup l4_blocks_measure
11096         ## @{
11097
11098         ## Check, if the compound of blocks is given.
11099         #  To be considered as a compound of blocks, the
11100         #  given shape must satisfy the following conditions:
11101         #  - Each element of the compound should be a Block (6 faces and 12 edges).
11102         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11103         #  - The compound should be connexe.
11104         #  - The glue between two quadrangle faces should be applied.
11105         #  @param theCompound The compound to check.
11106         #  @return TRUE, if the given shape is a compound of blocks.
11107         #  If theCompound is not valid, prints all discovered errors.
11108         #
11109         #  @ref tui_measurement_tools_page "Example 1"
11110         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
11111         def CheckCompoundOfBlocks(self,theCompound):
11112             """
11113             Check, if the compound of blocks is given.
11114             To be considered as a compound of blocks, the
11115             given shape must satisfy the following conditions:
11116             - Each element of the compound should be a Block (6 faces and 12 edges).
11117             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11118             - The compound should be connexe.
11119             - The glue between two quadrangle faces should be applied.
11120
11121             Parameters:
11122                 theCompound The compound to check.
11123
11124             Returns:
11125                 TRUE, if the given shape is a compound of blocks.
11126                 If theCompound is not valid, prints all discovered errors.            
11127             """
11128             # Example: see GEOM_Spanner.py
11129             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
11130             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
11131             if IsValid == 0:
11132                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
11133                 print Descr
11134             return IsValid
11135
11136         ## Retrieve all non blocks solids and faces from \a theShape.
11137         #  @param theShape The shape to explore.
11138         #  @param theName Object name; when specified, this parameter is used
11139         #         for result publication in the study. Otherwise, if automatic
11140         #         publication is switched on, default value is used for result name.
11141         #
11142         #  @return A tuple of two GEOM_Objects. The first object is a group of all
11143         #          non block solids (= not 6 faces, or with 6 faces, but with the
11144         #          presence of non-quadrangular faces). The second object is a
11145         #          group of all non quadrangular faces.
11146         #
11147         #  @ref tui_measurement_tools_page "Example 1"
11148         #  \n @ref swig_GetNonBlocks "Example 2"
11149         def GetNonBlocks (self, theShape, theName=None):
11150             """
11151             Retrieve all non blocks solids and faces from theShape.
11152
11153             Parameters:
11154                 theShape The shape to explore.
11155                 theName Object name; when specified, this parameter is used
11156                         for result publication in the study. Otherwise, if automatic
11157                         publication is switched on, default value is used for result name.
11158
11159             Returns:
11160                 A tuple of two GEOM_Objects. The first object is a group of all
11161                 non block solids (= not 6 faces, or with 6 faces, but with the
11162                 presence of non-quadrangular faces). The second object is a
11163                 group of all non quadrangular faces.
11164
11165             Usage:
11166                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
11167             """
11168             # Example: see GEOM_Spanner.py
11169             aTuple = self.BlocksOp.GetNonBlocks(theShape)
11170             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
11171             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
11172             return aTuple
11173
11174         ## Remove all seam and degenerated edges from \a theShape.
11175         #  Unite faces and edges, sharing one surface. It means that
11176         #  this faces must have references to one C++ surface object (handle).
11177         #  @param theShape The compound or single solid to remove irregular edges from.
11178         #  @param doUnionFaces If True, then unite faces. If False (the default value),
11179         #         do not unite faces.
11180         #  @param theName Object name; when specified, this parameter is used
11181         #         for result publication in the study. Otherwise, if automatic
11182         #         publication is switched on, default value is used for result name.
11183         #
11184         #  @return Improved shape.
11185         #
11186         #  @ref swig_RemoveExtraEdges "Example"
11187         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
11188             """
11189             Remove all seam and degenerated edges from theShape.
11190             Unite faces and edges, sharing one surface. It means that
11191             this faces must have references to one C++ surface object (handle).
11192
11193             Parameters:
11194                 theShape The compound or single solid to remove irregular edges from.
11195                 doUnionFaces If True, then unite faces. If False (the default value),
11196                              do not unite faces.
11197                 theName Object name; when specified, this parameter is used
11198                         for result publication in the study. Otherwise, if automatic
11199                         publication is switched on, default value is used for result name.
11200
11201             Returns: 
11202                 Improved shape.
11203             """
11204             # Example: see GEOM_TestOthers.py
11205             nbFacesOptimum = -1 # -1 means do not unite faces
11206             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
11207             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
11208             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
11209             self._autoPublish(anObj, theName, "removeExtraEdges")
11210             return anObj
11211
11212         ## Performs union faces of \a theShape
11213         #  Unite faces sharing one surface. It means that
11214         #  these faces must have references to one C++ surface object (handle).
11215         #  @param theShape The compound or single solid that contains faces
11216         #         to perform union.
11217         #  @param theName Object name; when specified, this parameter is used
11218         #         for result publication in the study. Otherwise, if automatic
11219         #         publication is switched on, default value is used for result name.
11220         #
11221         #  @return Improved shape.
11222         #
11223         #  @ref swig_UnionFaces "Example"
11224         def UnionFaces(self, theShape, theName=None):
11225             """
11226             Performs union faces of theShape.
11227             Unite faces sharing one surface. It means that
11228             these faces must have references to one C++ surface object (handle).
11229
11230             Parameters:
11231                 theShape The compound or single solid that contains faces
11232                          to perform union.
11233                 theName Object name; when specified, this parameter is used
11234                         for result publication in the study. Otherwise, if automatic
11235                         publication is switched on, default value is used for result name.
11236
11237             Returns: 
11238                 Improved shape.
11239             """
11240             # Example: see GEOM_TestOthers.py
11241             anObj = self.BlocksOp.UnionFaces(theShape)
11242             RaiseIfFailed("UnionFaces", self.BlocksOp)
11243             self._autoPublish(anObj, theName, "unionFaces")
11244             return anObj
11245
11246         ## Check, if the given shape is a blocks compound.
11247         #  Fix all detected errors.
11248         #    \note Single block can be also fixed by this method.
11249         #  @param theShape The compound to check and improve.
11250         #  @param theName Object name; when specified, this parameter is used
11251         #         for result publication in the study. Otherwise, if automatic
11252         #         publication is switched on, default value is used for result name.
11253         #
11254         #  @return Improved compound.
11255         #
11256         #  @ref swig_CheckAndImprove "Example"
11257         def CheckAndImprove(self, theShape, theName=None):
11258             """
11259             Check, if the given shape is a blocks compound.
11260             Fix all detected errors.
11261
11262             Note:
11263                 Single block can be also fixed by this method.
11264
11265             Parameters:
11266                 theShape The compound to check and improve.
11267                 theName Object name; when specified, this parameter is used
11268                         for result publication in the study. Otherwise, if automatic
11269                         publication is switched on, default value is used for result name.
11270
11271             Returns: 
11272                 Improved compound.
11273             """
11274             # Example: see GEOM_TestOthers.py
11275             anObj = self.BlocksOp.CheckAndImprove(theShape)
11276             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
11277             self._autoPublish(anObj, theName, "improved")
11278             return anObj
11279
11280         # end of l4_blocks_measure
11281         ## @}
11282
11283         ## @addtogroup l3_blocks_op
11284         ## @{
11285
11286         ## Get all the blocks, contained in the given compound.
11287         #  @param theCompound The compound to explode.
11288         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
11289         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
11290         #  @param theName Object name; when specified, this parameter is used
11291         #         for result publication in the study. Otherwise, if automatic
11292         #         publication is switched on, default value is used for result name.
11293         #
11294         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11295         #
11296         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
11297         #
11298         #  @ref tui_explode_on_blocks "Example 1"
11299         #  \n @ref swig_MakeBlockExplode "Example 2"
11300         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
11301             """
11302             Get all the blocks, contained in the given compound.
11303
11304             Parameters:
11305                 theCompound The compound to explode.
11306                 theMinNbFaces If solid has lower number of faces, it is not a block.
11307                 theMaxNbFaces If solid has higher number of faces, it is not a block.
11308                 theName Object name; when specified, this parameter is used
11309                         for result publication in the study. Otherwise, if automatic
11310                         publication is switched on, default value is used for result name.
11311
11312             Note:
11313                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11314
11315             Returns:  
11316                 List of GEOM.GEOM_Object, containing the retrieved blocks.
11317             """
11318             # Example: see GEOM_TestOthers.py
11319             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
11320             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
11321             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
11322             for anObj in aList:
11323                 anObj.SetParameters(Parameters)
11324                 pass
11325             self._autoPublish(aList, theName, "block")
11326             return aList
11327
11328         ## Find block, containing the given point inside its volume or on boundary.
11329         #  @param theCompound Compound, to find block in.
11330         #  @param thePoint Point, close to the desired block. If the point lays on
11331         #         boundary between some blocks, we return block with nearest center.
11332         #  @param theName Object name; when specified, this parameter is used
11333         #         for result publication in the study. Otherwise, if automatic
11334         #         publication is switched on, default value is used for result name.
11335         #
11336         #  @return New GEOM.GEOM_Object, containing the found block.
11337         #
11338         #  @ref swig_todo "Example"
11339         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
11340             """
11341             Find block, containing the given point inside its volume or on boundary.
11342
11343             Parameters:
11344                 theCompound Compound, to find block in.
11345                 thePoint Point, close to the desired block. If the point lays on
11346                          boundary between some blocks, we return block with nearest center.
11347                 theName Object name; when specified, this parameter is used
11348                         for result publication in the study. Otherwise, if automatic
11349                         publication is switched on, default value is used for result name.
11350
11351             Returns:
11352                 New GEOM.GEOM_Object, containing the found block.
11353             """
11354             # Example: see GEOM_Spanner.py
11355             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
11356             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
11357             self._autoPublish(anObj, theName, "block")
11358             return anObj
11359
11360         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11361         #  @param theCompound Compound, to find block in.
11362         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
11363         #  @param theName Object name; when specified, this parameter is used
11364         #         for result publication in the study. Otherwise, if automatic
11365         #         publication is switched on, default value is used for result name.
11366         #
11367         #  @return New GEOM.GEOM_Object, containing the found block.
11368         #
11369         #  @ref swig_GetBlockByParts "Example"
11370         def GetBlockByParts(self, theCompound, theParts, theName=None):
11371             """
11372              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11373
11374              Parameters:
11375                 theCompound Compound, to find block in.
11376                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
11377                 theName Object name; when specified, this parameter is used
11378                         for result publication in the study. Otherwise, if automatic
11379                         publication is switched on, default value is used for result name.
11380
11381             Returns: 
11382                 New GEOM_Object, containing the found block.
11383             """
11384             # Example: see GEOM_TestOthers.py
11385             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
11386             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
11387             self._autoPublish(anObj, theName, "block")
11388             return anObj
11389
11390         ## Return all blocks, containing all the elements, passed as the parts.
11391         #  @param theCompound Compound, to find blocks in.
11392         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
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 List of GEOM.GEOM_Object, containing the found blocks.
11398         #
11399         #  @ref swig_todo "Example"
11400         def GetBlocksByParts(self, theCompound, theParts, theName=None):
11401             """
11402             Return all blocks, containing all the elements, passed as the parts.
11403
11404             Parameters:
11405                 theCompound Compound, to find blocks in.
11406                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11407                 theName Object name; when specified, this parameter is used
11408                         for result publication in the study. Otherwise, if automatic
11409                         publication is switched on, default value is used for result name.
11410
11411             Returns:
11412                 List of GEOM.GEOM_Object, containing the found blocks.
11413             """
11414             # Example: see GEOM_Spanner.py
11415             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11416             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11417             self._autoPublish(aList, theName, "block")
11418             return aList
11419
11420         ## Multi-transformate block and glue the result.
11421         #  Transformation is defined so, as to superpose direction faces.
11422         #  @param Block Hexahedral solid to be multi-transformed.
11423         #  @param DirFace1 ID of First direction face.
11424         #  @param DirFace2 ID of Second direction face.
11425         #  @param NbTimes Quantity of transformations to be done.
11426         #  @param theName Object name; when specified, this parameter is used
11427         #         for result publication in the study. Otherwise, if automatic
11428         #         publication is switched on, default value is used for result name.
11429         #
11430         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11431         #
11432         #  @return New GEOM.GEOM_Object, containing the result shape.
11433         #
11434         #  @ref tui_multi_transformation "Example"
11435         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11436             """
11437             Multi-transformate block and glue the result.
11438             Transformation is defined so, as to superpose direction faces.
11439
11440             Parameters:
11441                 Block Hexahedral solid to be multi-transformed.
11442                 DirFace1 ID of First direction face.
11443                 DirFace2 ID of Second direction face.
11444                 NbTimes Quantity of transformations to be done.
11445                 theName Object name; when specified, this parameter is used
11446                         for result publication in the study. Otherwise, if automatic
11447                         publication is switched on, default value is used for result name.
11448
11449             Note:
11450                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11451
11452             Returns:
11453                 New GEOM.GEOM_Object, containing the result shape.
11454             """
11455             # Example: see GEOM_Spanner.py
11456             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11457             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11458             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11459             anObj.SetParameters(Parameters)
11460             self._autoPublish(anObj, theName, "transformed")
11461             return anObj
11462
11463         ## Multi-transformate block and glue the result.
11464         #  @param Block Hexahedral solid to be multi-transformed.
11465         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11466         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11467         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11468         #  @param 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         #  @return New GEOM.GEOM_Object, containing the result shape.
11473         #
11474         #  @ref tui_multi_transformation "Example"
11475         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11476                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11477             """
11478             Multi-transformate block and glue the result.
11479
11480             Parameters:
11481                 Block Hexahedral solid to be multi-transformed.
11482                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11483                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11484                 NbTimesU,NbTimesV Quantity of transformations to be done.
11485                 theName Object name; when specified, this parameter is used
11486                         for result publication in the study. Otherwise, if automatic
11487                         publication is switched on, default value is used for result name.
11488
11489             Returns:
11490                 New GEOM.GEOM_Object, containing the result shape.
11491             """
11492             # Example: see GEOM_Spanner.py
11493             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11494               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11495             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11496                                                             DirFace1V, DirFace2V, NbTimesV)
11497             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11498             anObj.SetParameters(Parameters)
11499             self._autoPublish(anObj, theName, "transformed")
11500             return anObj
11501
11502         ## Build all possible propagation groups.
11503         #  Propagation group is a set of all edges, opposite to one (main)
11504         #  edge of this group directly or through other opposite edges.
11505         #  Notion of Opposite Edge make sence only on quadrangle face.
11506         #  @param theShape Shape to build propagation groups on.
11507         #  @param theName Object name; when specified, this parameter is used
11508         #         for result publication in the study. Otherwise, if automatic
11509         #         publication is switched on, default value is used for result name.
11510         #
11511         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11512         #
11513         #  @ref swig_Propagate "Example"
11514         def Propagate(self, theShape, theName=None):
11515             """
11516             Build all possible propagation groups.
11517             Propagation group is a set of all edges, opposite to one (main)
11518             edge of this group directly or through other opposite edges.
11519             Notion of Opposite Edge make sence only on quadrangle face.
11520
11521             Parameters:
11522                 theShape Shape to build propagation groups on.
11523                 theName Object name; when specified, this parameter is used
11524                         for result publication in the study. Otherwise, if automatic
11525                         publication is switched on, default value is used for result name.
11526
11527             Returns:
11528                 List of GEOM.GEOM_Object, each of them is a propagation group.
11529             """
11530             # Example: see GEOM_TestOthers.py
11531             listChains = self.BlocksOp.Propagate(theShape)
11532             RaiseIfFailed("Propagate", self.BlocksOp)
11533             self._autoPublish(listChains, theName, "propagate")
11534             return listChains
11535
11536         # end of l3_blocks_op
11537         ## @}
11538
11539         ## @addtogroup l3_groups
11540         ## @{
11541
11542         ## Creates a new group which will store sub-shapes of theMainShape
11543         #  @param theMainShape is a GEOM object on which the group is selected
11544         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
11545         #  @param theName Object name; when specified, this parameter is used
11546         #         for result publication in the study. Otherwise, if automatic
11547         #         publication is switched on, default value is used for result name.
11548         #
11549         #  @return a newly created GEOM group (GEOM.GEOM_Object)
11550         #
11551         #  @ref tui_working_with_groups_page "Example 1"
11552         #  \n @ref swig_CreateGroup "Example 2"
11553         def CreateGroup(self, theMainShape, theShapeType, theName=None):
11554             """
11555             Creates a new group which will store sub-shapes of theMainShape
11556
11557             Parameters:
11558                theMainShape is a GEOM object on which the group is selected
11559                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
11560                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
11561                 theName Object name; when specified, this parameter is used
11562                         for result publication in the study. Otherwise, if automatic
11563                         publication is switched on, default value is used for result name.
11564
11565             Returns:
11566                a newly created GEOM group
11567
11568             Example of usage:
11569                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
11570                 
11571             """
11572             # Example: see GEOM_TestOthers.py
11573             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
11574             RaiseIfFailed("CreateGroup", self.GroupOp)
11575             self._autoPublish(anObj, theName, "group")
11576             return anObj
11577
11578         ## Adds a sub-object with ID theSubShapeId to the group
11579         #  @param theGroup is a GEOM group to which the new sub-shape is added
11580         #  @param theSubShapeID is a sub-shape ID in the main object.
11581         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11582         #
11583         #  @ref tui_working_with_groups_page "Example"
11584         def AddObject(self,theGroup, theSubShapeID):
11585             """
11586             Adds a sub-object with ID theSubShapeId to the group
11587
11588             Parameters:
11589                 theGroup       is a GEOM group to which the new sub-shape is added
11590                 theSubShapeID  is a sub-shape ID in the main object.
11591
11592             Note:
11593                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
11594             """
11595             # Example: see GEOM_TestOthers.py
11596             self.GroupOp.AddObject(theGroup, theSubShapeID)
11597             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
11598                 RaiseIfFailed("AddObject", self.GroupOp)
11599                 pass
11600             pass
11601
11602         ## Removes a sub-object with ID \a theSubShapeId from the group
11603         #  @param theGroup is a GEOM group from which the new sub-shape is removed
11604         #  @param theSubShapeID is a sub-shape ID in the main object.
11605         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11606         #
11607         #  @ref tui_working_with_groups_page "Example"
11608         def RemoveObject(self,theGroup, theSubShapeID):
11609             """
11610             Removes a sub-object with ID theSubShapeId from the group
11611
11612             Parameters:
11613                 theGroup is a GEOM group from which the new sub-shape is removed
11614                 theSubShapeID is a sub-shape ID in the main object.
11615
11616             Note:
11617                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11618             """
11619             # Example: see GEOM_TestOthers.py
11620             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
11621             RaiseIfFailed("RemoveObject", self.GroupOp)
11622             pass
11623
11624         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11625         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11626         #  @param theSubShapes is a list of sub-shapes to be added.
11627         #
11628         #  @ref tui_working_with_groups_page "Example"
11629         def UnionList (self,theGroup, theSubShapes):
11630             """
11631             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11632
11633             Parameters:
11634                 theGroup is a GEOM group to which the new sub-shapes are added.
11635                 theSubShapes is a list of sub-shapes to be added.
11636             """
11637             # Example: see GEOM_TestOthers.py
11638             self.GroupOp.UnionList(theGroup, theSubShapes)
11639             RaiseIfFailed("UnionList", self.GroupOp)
11640             pass
11641
11642         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11643         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11644         #  @param theSubShapes is a list of indices of sub-shapes to be added.
11645         #
11646         #  @ref swig_UnionIDs "Example"
11647         def UnionIDs(self,theGroup, theSubShapes):
11648             """
11649             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11650
11651             Parameters:
11652                 theGroup is a GEOM group to which the new sub-shapes are added.
11653                 theSubShapes is a list of indices of sub-shapes to be added.
11654             """
11655             # Example: see GEOM_TestOthers.py
11656             self.GroupOp.UnionIDs(theGroup, theSubShapes)
11657             RaiseIfFailed("UnionIDs", self.GroupOp)
11658             pass
11659
11660         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11661         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11662         #  @param theSubShapes is a list of sub-shapes to be removed.
11663         #
11664         #  @ref tui_working_with_groups_page "Example"
11665         def DifferenceList (self,theGroup, theSubShapes):
11666             """
11667             Removes from the group all the given shapes. No errors, if some shapes are not included.
11668
11669             Parameters:
11670                 theGroup is a GEOM group from which the sub-shapes are removed.
11671                 theSubShapes is a list of sub-shapes to be removed.
11672             """
11673             # Example: see GEOM_TestOthers.py
11674             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11675             RaiseIfFailed("DifferenceList", self.GroupOp)
11676             pass
11677
11678         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11679         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11680         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
11681         #
11682         #  @ref swig_DifferenceIDs "Example"
11683         def DifferenceIDs(self,theGroup, theSubShapes):
11684             """
11685             Removes from the group all the given shapes. No errors, if some shapes are not included.
11686
11687             Parameters:
11688                 theGroup is a GEOM group from which the sub-shapes are removed.
11689                 theSubShapes is a list of indices of sub-shapes to be removed.
11690             """            
11691             # Example: see GEOM_TestOthers.py
11692             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
11693             RaiseIfFailed("DifferenceIDs", self.GroupOp)
11694             pass
11695
11696         ## Union of two groups.
11697         #  New group is created. It will contain all entities
11698         #  which are present in groups theGroup1 and theGroup2.
11699         #  @param theGroup1, theGroup2 are the initial GEOM groups
11700         #                              to create the united group from.
11701         #  @param theName Object name; when specified, this parameter is used
11702         #         for result publication in the study. Otherwise, if automatic
11703         #         publication is switched on, default value is used for result name.
11704         #
11705         #  @return a newly created GEOM group.
11706         #
11707         #  @ref tui_union_groups_anchor "Example"
11708         def UnionGroups (self, theGroup1, theGroup2, theName=None):
11709             """
11710             Union of two groups.
11711             New group is created. It will contain all entities
11712             which are present in groups theGroup1 and theGroup2.
11713
11714             Parameters:
11715                 theGroup1, theGroup2 are the initial GEOM groups
11716                                      to create the united group from.
11717                 theName Object name; when specified, this parameter is used
11718                         for result publication in the study. Otherwise, if automatic
11719                         publication is switched on, default value is used for result name.
11720
11721             Returns:
11722                 a newly created GEOM group.
11723             """
11724             # Example: see GEOM_TestOthers.py
11725             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
11726             RaiseIfFailed("UnionGroups", self.GroupOp)
11727             self._autoPublish(aGroup, theName, "group")
11728             return aGroup
11729
11730         ## Intersection of two groups.
11731         #  New group is created. It will contain only those entities
11732         #  which are present in both groups theGroup1 and theGroup2.
11733         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11734         #  @param theName Object name; when specified, this parameter is used
11735         #         for result publication in the study. Otherwise, if automatic
11736         #         publication is switched on, default value is used for result name.
11737         #
11738         #  @return a newly created GEOM group.
11739         #
11740         #  @ref tui_intersect_groups_anchor "Example"
11741         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
11742             """
11743             Intersection of two groups.
11744             New group is created. It will contain only those entities
11745             which are present in both groups theGroup1 and theGroup2.
11746
11747             Parameters:
11748                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11749                 theName Object name; when specified, this parameter is used
11750                         for result publication in the study. Otherwise, if automatic
11751                         publication is switched on, default value is used for result name.
11752
11753             Returns:
11754                 a newly created GEOM group.
11755             """
11756             # Example: see GEOM_TestOthers.py
11757             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
11758             RaiseIfFailed("IntersectGroups", self.GroupOp)
11759             self._autoPublish(aGroup, theName, "group")
11760             return aGroup
11761
11762         ## Cut of two groups.
11763         #  New group is created. It will contain entities which are
11764         #  present in group theGroup1 but are not present in group theGroup2.
11765         #  @param theGroup1 is a GEOM group to include elements of.
11766         #  @param theGroup2 is a GEOM group to exclude elements of.
11767         #  @param theName Object name; when specified, this parameter is used
11768         #         for result publication in the study. Otherwise, if automatic
11769         #         publication is switched on, default value is used for result name.
11770         #
11771         #  @return a newly created GEOM group.
11772         #
11773         #  @ref tui_cut_groups_anchor "Example"
11774         def CutGroups (self, theGroup1, theGroup2, theName=None):
11775             """
11776             Cut of two groups.
11777             New group is created. It will contain entities which are
11778             present in group theGroup1 but are not present in group theGroup2.
11779
11780             Parameters:
11781                 theGroup1 is a GEOM group to include elements of.
11782                 theGroup2 is a GEOM group to exclude elements of.
11783                 theName Object name; when specified, this parameter is used
11784                         for result publication in the study. Otherwise, if automatic
11785                         publication is switched on, default value is used for result name.
11786
11787             Returns:
11788                 a newly created GEOM group.
11789             """
11790             # Example: see GEOM_TestOthers.py
11791             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
11792             RaiseIfFailed("CutGroups", self.GroupOp)
11793             self._autoPublish(aGroup, theName, "group")
11794             return aGroup
11795
11796         ## Union of list of groups.
11797         #  New group is created. It will contain all entities that are
11798         #  present in groups listed in theGList.
11799         #  @param theGList is a list of GEOM groups to create the united group from.
11800         #  @param theName Object name; when specified, this parameter is used
11801         #         for result publication in the study. Otherwise, if automatic
11802         #         publication is switched on, default value is used for result name.
11803         #
11804         #  @return a newly created GEOM group.
11805         #
11806         #  @ref tui_union_groups_anchor "Example"
11807         def UnionListOfGroups (self, theGList, theName=None):
11808             """
11809             Union of list of groups.
11810             New group is created. It will contain all entities that are
11811             present in groups listed in theGList.
11812
11813             Parameters:
11814                 theGList is a list of GEOM groups to create the united group from.
11815                 theName Object name; when specified, this parameter is used
11816                         for result publication in the study. Otherwise, if automatic
11817                         publication is switched on, default value is used for result name.
11818
11819             Returns:
11820                 a newly created GEOM group.
11821             """
11822             # Example: see GEOM_TestOthers.py
11823             aGroup = self.GroupOp.UnionListOfGroups(theGList)
11824             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
11825             self._autoPublish(aGroup, theName, "group")
11826             return aGroup
11827
11828         ## Cut of lists of groups.
11829         #  New group is created. It will contain only entities
11830         #  which are present in groups listed in theGList.
11831         #  @param theGList is a list of GEOM groups to include elements of.
11832         #  @param theName Object name; when specified, this parameter is used
11833         #         for result publication in the study. Otherwise, if automatic
11834         #         publication is switched on, default value is used for result name.
11835         #
11836         #  @return a newly created GEOM group.
11837         #
11838         #  @ref tui_intersect_groups_anchor "Example"
11839         def IntersectListOfGroups (self, theGList, theName=None):
11840             """
11841             Cut of lists of groups.
11842             New group is created. It will contain only entities
11843             which are present in groups listed in theGList.
11844
11845             Parameters:
11846                 theGList is a list of GEOM groups to include elements of.
11847                 theName Object name; when specified, this parameter is used
11848                         for result publication in the study. Otherwise, if automatic
11849                         publication is switched on, default value is used for result name.
11850
11851             Returns:
11852                 a newly created GEOM group.
11853             """
11854             # Example: see GEOM_TestOthers.py
11855             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
11856             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
11857             self._autoPublish(aGroup, theName, "group")
11858             return aGroup
11859
11860         ## Cut of lists of groups.
11861         #  New group is created. It will contain only entities
11862         #  which are present in groups listed in theGList1 but 
11863         #  are not present in groups from theGList2.
11864         #  @param theGList1 is a list of GEOM groups to include elements of.
11865         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11866         #  @param theName Object name; when specified, this parameter is used
11867         #         for result publication in the study. Otherwise, if automatic
11868         #         publication is switched on, default value is used for result name.
11869         #
11870         #  @return a newly created GEOM group.
11871         #
11872         #  @ref tui_cut_groups_anchor "Example"
11873         def CutListOfGroups (self, theGList1, theGList2, theName=None):
11874             """
11875             Cut of lists of groups.
11876             New group is created. It will contain only entities
11877             which are present in groups listed in theGList1 but 
11878             are not present in groups from theGList2.
11879
11880             Parameters:
11881                 theGList1 is a list of GEOM groups to include elements of.
11882                 theGList2 is a list of GEOM groups to exclude elements of.
11883                 theName Object name; when specified, this parameter is used
11884                         for result publication in the study. Otherwise, if automatic
11885                         publication is switched on, default value is used for result name.
11886
11887             Returns:
11888                 a newly created GEOM group.
11889             """
11890             # Example: see GEOM_TestOthers.py
11891             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
11892             RaiseIfFailed("CutListOfGroups", self.GroupOp)
11893             self._autoPublish(aGroup, theName, "group")
11894             return aGroup
11895
11896         ## Returns a list of sub-objects ID stored in the group
11897         #  @param theGroup is a GEOM group for which a list of IDs is requested
11898         #
11899         #  @ref swig_GetObjectIDs "Example"
11900         def GetObjectIDs(self,theGroup):
11901             """
11902             Returns a list of sub-objects ID stored in the group
11903
11904             Parameters:
11905                 theGroup is a GEOM group for which a list of IDs is requested
11906             """
11907             # Example: see GEOM_TestOthers.py
11908             ListIDs = self.GroupOp.GetObjects(theGroup)
11909             RaiseIfFailed("GetObjects", self.GroupOp)
11910             return ListIDs
11911
11912         ## Returns a type of sub-objects stored in the group
11913         #  @param theGroup is a GEOM group which type is returned.
11914         #
11915         #  @ref swig_GetType "Example"
11916         def GetType(self,theGroup):
11917             """
11918             Returns a type of sub-objects stored in the group
11919
11920             Parameters:
11921                 theGroup is a GEOM group which type is returned.
11922             """
11923             # Example: see GEOM_TestOthers.py
11924             aType = self.GroupOp.GetType(theGroup)
11925             RaiseIfFailed("GetType", self.GroupOp)
11926             return aType
11927
11928         ## Convert a type of geom object from id to string value
11929         #  @param theId is a GEOM obect type id.
11930         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11931         #  @ref swig_GetType "Example"
11932         def ShapeIdToType(self, theId):
11933             """
11934             Convert a type of geom object from id to string value
11935
11936             Parameters:
11937                 theId is a GEOM obect type id.
11938                 
11939             Returns:
11940                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11941             """
11942             if theId == 0:
11943                 return "COPY"
11944             if theId == 1:
11945                 return "IMPORT"
11946             if theId == 2:
11947                 return "POINT"
11948             if theId == 3:
11949                 return "VECTOR"
11950             if theId == 4:
11951                 return "PLANE"
11952             if theId == 5:
11953                 return "LINE"
11954             if theId == 6:
11955                 return "TORUS"
11956             if theId == 7:
11957                 return "BOX"
11958             if theId == 8:
11959                 return "CYLINDER"
11960             if theId == 9:
11961                 return "CONE"
11962             if theId == 10:
11963                 return "SPHERE"
11964             if theId == 11:
11965                 return "PRISM"
11966             if theId == 12:
11967                 return "REVOLUTION"
11968             if theId == 13:
11969                 return "BOOLEAN"
11970             if theId == 14:
11971                 return "PARTITION"
11972             if theId == 15:
11973                 return "POLYLINE"
11974             if theId == 16:
11975                 return "CIRCLE"
11976             if theId == 17:
11977                 return "SPLINE"
11978             if theId == 18:
11979                 return "ELLIPSE"
11980             if theId == 19:
11981                 return "CIRC_ARC"
11982             if theId == 20:
11983                 return "FILLET"
11984             if theId == 21:
11985                 return "CHAMFER"
11986             if theId == 22:
11987                 return "EDGE"
11988             if theId == 23:
11989                 return "WIRE"
11990             if theId == 24:
11991                 return "FACE"
11992             if theId == 25:
11993                 return "SHELL"
11994             if theId == 26:
11995                 return "SOLID"
11996             if theId == 27:
11997                 return "COMPOUND"
11998             if theId == 28:
11999                 return "SUBSHAPE"
12000             if theId == 29:
12001                 return "PIPE"
12002             if theId == 30:
12003                 return "ARCHIMEDE"
12004             if theId == 31:
12005                 return "FILLING"
12006             if theId == 32:
12007                 return "EXPLODE"
12008             if theId == 33:
12009                 return "GLUED"
12010             if theId == 34:
12011                 return "SKETCHER"
12012             if theId == 35:
12013                 return "CDG"
12014             if theId == 36:
12015                 return "FREE_BOUNDS"
12016             if theId == 37:
12017                 return "GROUP"
12018             if theId == 38:
12019                 return "BLOCK"
12020             if theId == 39:
12021                 return "MARKER"
12022             if theId == 40:
12023                 return "THRUSECTIONS"
12024             if theId == 41:
12025                 return "COMPOUNDFILTER"
12026             if theId == 42:
12027                 return "SHAPES_ON_SHAPE"
12028             if theId == 43:
12029                 return "ELLIPSE_ARC"
12030             if theId == 44:
12031                 return "3DSKETCHER"
12032             if theId == 45:
12033                 return "FILLET_2D"
12034             if theId == 46:
12035                 return "FILLET_1D"
12036             if theId == 201:
12037                 return "PIPETSHAPE"
12038             return "Shape Id not exist."
12039
12040         ## Returns a main shape associated with the group
12041         #  @param theGroup is a GEOM group for which a main shape object is requested
12042         #  @return a GEOM object which is a main shape for theGroup
12043         #
12044         #  @ref swig_GetMainShape "Example"
12045         def GetMainShape(self,theGroup):
12046             """
12047             Returns a main shape associated with the group
12048
12049             Parameters:
12050                 theGroup is a GEOM group for which a main shape object is requested
12051
12052             Returns:
12053                 a GEOM object which is a main shape for theGroup
12054
12055             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
12056             """
12057             # Example: see GEOM_TestOthers.py
12058             anObj = self.GroupOp.GetMainShape(theGroup)
12059             RaiseIfFailed("GetMainShape", self.GroupOp)
12060             return anObj
12061
12062         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
12063         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12064         #  @param theShape given shape (see GEOM.GEOM_Object)
12065         #  @param min_length minimum length of edges of theShape
12066         #  @param max_length maximum length of edges of theShape
12067         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12068         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12069         #  @param theName Object name; when specified, this parameter is used
12070         #         for result publication in the study. Otherwise, if automatic
12071         #         publication is switched on, default value is used for result name.
12072         #
12073         #  @return a newly created GEOM group of edges
12074         #
12075         #  @@ref swig_todo "Example"
12076         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
12077             """
12078             Create group of edges of theShape, whose length is in range [min_length, max_length].
12079             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12080
12081             Parameters:
12082                 theShape given shape
12083                 min_length minimum length of edges of theShape
12084                 max_length maximum length of edges of theShape
12085                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12086                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12087                 theName Object name; when specified, this parameter is used
12088                         for result publication in the study. Otherwise, if automatic
12089                         publication is switched on, default value is used for result name.
12090
12091              Returns:
12092                 a newly created GEOM group of edges.
12093             """
12094             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
12095             edges_in_range = []
12096             for edge in edges:
12097                 Props = self.BasicProperties(edge)
12098                 if min_length <= Props[0] and Props[0] <= max_length:
12099                     if (not include_min) and (min_length == Props[0]):
12100                         skip = 1
12101                     else:
12102                         if (not include_max) and (Props[0] == max_length):
12103                             skip = 1
12104                         else:
12105                             edges_in_range.append(edge)
12106
12107             if len(edges_in_range) <= 0:
12108                 print "No edges found by given criteria"
12109                 return None
12110
12111             # note: auto-publishing is done in self.CreateGroup()
12112             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
12113             self.UnionList(group_edges, edges_in_range)
12114
12115             return group_edges
12116
12117         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
12118         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12119         #  @param min_length minimum length of edges of selected shape
12120         #  @param max_length maximum length of edges of selected shape
12121         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12122         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12123         #  @return a newly created GEOM group of edges
12124         #  @ref swig_todo "Example"
12125         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
12126             """
12127             Create group of edges of selected shape, whose length is in range [min_length, max_length].
12128             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12129
12130             Parameters:
12131                 min_length minimum length of edges of selected shape
12132                 max_length maximum length of edges of selected shape
12133                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12134                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12135
12136              Returns:
12137                 a newly created GEOM group of edges.
12138             """
12139             nb_selected = sg.SelectedCount()
12140             if nb_selected < 1:
12141                 print "Select a shape before calling this function, please."
12142                 return 0
12143             if nb_selected > 1:
12144                 print "Only one shape must be selected"
12145                 return 0
12146
12147             id_shape = sg.getSelected(0)
12148             shape = IDToObject( id_shape )
12149
12150             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
12151
12152             left_str  = " < "
12153             right_str = " < "
12154             if include_min: left_str  = " <= "
12155             if include_max: right_str  = " <= "
12156
12157             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
12158                                     + left_str + "length" + right_str + `max_length`)
12159
12160             sg.updateObjBrowser(1)
12161
12162             return group_edges
12163
12164         # end of l3_groups
12165         ## @}
12166
12167         ## @addtogroup l4_advanced
12168         ## @{
12169
12170         ## Create a T-shape object with specified caracteristics for the main
12171         #  and the incident pipes (radius, width, half-length).
12172         #  The extremities of the main pipe are located on junctions points P1 and P2.
12173         #  The extremity of the incident pipe is located on junction point P3.
12174         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12175         #  the main plane of the T-shape is XOY.
12176         #
12177         #  @param theR1 Internal radius of main pipe
12178         #  @param theW1 Width of main pipe
12179         #  @param theL1 Half-length of main pipe
12180         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12181         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12182         #  @param theL2 Half-length of incident pipe
12183         #
12184         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12185         #  @param theP1 1st junction point of main pipe
12186         #  @param theP2 2nd junction point of main pipe
12187         #  @param theP3 Junction point of incident pipe
12188         #
12189         #  @param theRL Internal radius of left thickness reduction
12190         #  @param theWL Width of left thickness reduction
12191         #  @param theLtransL Length of left transition part
12192         #  @param theLthinL Length of left thin part
12193         #
12194         #  @param theRR Internal radius of right thickness reduction
12195         #  @param theWR Width of right thickness reduction
12196         #  @param theLtransR Length of right transition part
12197         #  @param theLthinR Length of right thin part
12198         #
12199         #  @param theRI Internal radius of incident thickness reduction
12200         #  @param theWI Width of incident thickness reduction
12201         #  @param theLtransI Length of incident transition part
12202         #  @param theLthinI Length of incident thin part
12203         #
12204         #  @param theName Object name; when specified, this parameter is used
12205         #         for result publication in the study. Otherwise, if automatic
12206         #         publication is switched on, default value is used for result name.
12207         #
12208         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12209         #
12210         #  @ref tui_creation_pipetshape "Example"
12211         def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
12212                             theHexMesh=True, theP1=None, theP2=None, theP3=None,
12213                             theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12214                             theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12215                             theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12216                             theName=None):
12217             """
12218             Create a T-shape object with specified caracteristics for the main
12219             and the incident pipes (radius, width, half-length).
12220             The extremities of the main pipe are located on junctions points P1 and P2.
12221             The extremity of the incident pipe is located on junction point P3.
12222             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12223             the main plane of the T-shape is XOY.
12224
12225             Parameters:
12226                 theR1 Internal radius of main pipe
12227                 theW1 Width of main pipe
12228                 theL1 Half-length of main pipe
12229                 theR2 Internal radius of incident pipe (R2 < R1)
12230                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12231                 theL2 Half-length of incident pipe
12232                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12233                 theP1 1st junction point of main pipe
12234                 theP2 2nd junction point of main pipe
12235                 theP3 Junction point of incident pipe
12236
12237                 theRL Internal radius of left thickness reduction
12238                 theWL Width of left thickness reduction
12239                 theLtransL Length of left transition part
12240                 theLthinL Length of left thin part
12241
12242                 theRR Internal radius of right thickness reduction
12243                 theWR Width of right thickness reduction
12244                 theLtransR Length of right transition part
12245                 theLthinR Length of right thin part
12246
12247                 theRI Internal radius of incident thickness reduction
12248                 theWI Width of incident thickness reduction
12249                 theLtransI Length of incident transition part
12250                 theLthinI Length of incident thin part
12251
12252                 theName Object name; when specified, this parameter is used
12253                         for result publication in the study. Otherwise, if automatic
12254                         publication is switched on, default value is used for result name.
12255
12256             Returns:
12257                 List of GEOM_Object, containing the created shape and propagation groups.
12258
12259             Example of usage:
12260                 # create PipeTShape object
12261                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
12262                 # create PipeTShape object with position
12263                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
12264                 # create PipeTShape object with left thickness reduction
12265                 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
12266             """
12267             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)
12268             if (theP1 and theP2 and theP3):
12269                 anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12270                                                                 theRL, theWL, theLtransL, theLthinL,
12271                                                                 theRR, theWR, theLtransR, theLthinR,
12272                                                                 theRI, theWI, theLtransI, theLthinI,
12273                                                                 theHexMesh, theP1, theP2, theP3)
12274             else:
12275                 anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
12276                                                     theRL, theWL, theLtransL, theLthinL,
12277                                                     theRR, theWR, theLtransR, theLthinR,
12278                                                     theRI, theWI, theLtransI, theLthinI,
12279                                                     theHexMesh)
12280             RaiseIfFailed("MakePipeTShape", self.AdvOp)
12281             if Parameters: anObj[0].SetParameters(Parameters)
12282             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12283             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12284             return anObj
12285
12286         ## Create a T-shape object with chamfer and with specified caracteristics for the main
12287         #  and the incident pipes (radius, width, half-length). The chamfer is
12288         #  created on the junction of the pipes.
12289         #  The extremities of the main pipe are located on junctions points P1 and P2.
12290         #  The extremity of the incident pipe is located on junction point P3.
12291         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12292         #  the main plane of the T-shape is XOY.
12293         #  @param theR1 Internal radius of main pipe
12294         #  @param theW1 Width of main pipe
12295         #  @param theL1 Half-length of main pipe
12296         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12297         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12298         #  @param theL2 Half-length of incident pipe
12299         #  @param theH Height of the chamfer.
12300         #  @param theW Width of the chamfer.
12301         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12302         #  @param theP1 1st junction point of main pipe
12303         #  @param theP2 2nd junction point of main pipe
12304         #  @param theP3 Junction point of incident pipe
12305         #
12306         #  @param theRL Internal radius of left thickness reduction
12307         #  @param theWL Width of left thickness reduction
12308         #  @param theLtransL Length of left transition part
12309         #  @param theLthinL Length of left thin part
12310         #
12311         #  @param theRR Internal radius of right thickness reduction
12312         #  @param theWR Width of right thickness reduction
12313         #  @param theLtransR Length of right transition part
12314         #  @param theLthinR Length of right thin part
12315         #
12316         #  @param theRI Internal radius of incident thickness reduction
12317         #  @param theWI Width of incident thickness reduction
12318         #  @param theLtransI Length of incident transition part
12319         #  @param theLthinI Length of incident thin part
12320         #
12321         #  @param theName Object name; when specified, this parameter is used
12322         #         for result publication in the study. Otherwise, if automatic
12323         #         publication is switched on, default value is used for result name.
12324         #
12325         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12326         #
12327         #  @ref tui_creation_pipetshape "Example"
12328         def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
12329                                    theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12330                                    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12331                                    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12332                                    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12333                                    theName=None):
12334             """
12335             Create a T-shape object with chamfer and with specified caracteristics for the main
12336             and the incident pipes (radius, width, half-length). The chamfer is
12337             created on the junction of the pipes.
12338             The extremities of the main pipe are located on junctions points P1 and P2.
12339             The extremity of the incident pipe is located on junction point P3.
12340             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12341             the main plane of the T-shape is XOY.
12342
12343             Parameters:
12344                 theR1 Internal radius of main pipe
12345                 theW1 Width of main pipe
12346                 theL1 Half-length of main pipe
12347                 theR2 Internal radius of incident pipe (R2 < R1)
12348                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12349                 theL2 Half-length of incident pipe
12350                 theH Height of the chamfer.
12351                 theW Width of the chamfer.
12352                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12353                 theP1 1st junction point of main pipe
12354                 theP2 2nd junction point of main pipe
12355                 theP3 Junction point of incident pipe
12356
12357                 theRL Internal radius of left thickness reduction
12358                 theWL Width of left thickness reduction
12359                 theLtransL Length of left transition part
12360                 theLthinL Length of left thin part
12361
12362                 theRR Internal radius of right thickness reduction
12363                 theWR Width of right thickness reduction
12364                 theLtransR Length of right transition part
12365                 theLthinR Length of right thin part
12366
12367                 theRI Internal radius of incident thickness reduction
12368                 theWI Width of incident thickness reduction
12369                 theLtransI Length of incident transition part
12370                 theLthinI Length of incident thin part
12371
12372                 theName Object name; when specified, this parameter is used
12373                         for result publication in the study. Otherwise, if automatic
12374                         publication is switched on, default value is used for result name.
12375
12376             Returns:
12377                 List of GEOM_Object, containing the created shape and propagation groups.
12378
12379             Example of usage:
12380                 # create PipeTShape with chamfer object
12381                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
12382                 # create PipeTShape with chamfer object with position
12383                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
12384                 # create PipeTShape with chamfer object with left thickness reduction
12385                 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)
12386             """
12387             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)
12388             if (theP1 and theP2 and theP3):
12389               anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12390                                                                      theRL, theWL, theLtransL, theLthinL,
12391                                                                      theRR, theWR, theLtransR, theLthinR,
12392                                                                      theRI, theWI, theLtransI, theLthinI,
12393                                                                      theH, theW, theHexMesh, theP1, theP2, theP3)
12394             else:
12395               anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
12396                                                          theRL, theWL, theLtransL, theLthinL,
12397                                                          theRR, theWR, theLtransR, theLthinR,
12398                                                          theRI, theWI, theLtransI, theLthinI,
12399                                                          theH, theW, theHexMesh)
12400             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
12401             if Parameters: anObj[0].SetParameters(Parameters)
12402             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12403             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12404             return anObj
12405
12406         ## Create a T-shape object with fillet and with specified caracteristics for the main
12407         #  and the incident pipes (radius, width, half-length). The fillet is
12408         #  created on the junction of the pipes.
12409         #  The extremities of the main pipe are located on junctions points P1 and P2.
12410         #  The extremity of the incident pipe is located on junction point P3.
12411         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12412         #  the main plane of the T-shape is XOY.
12413         #  @param theR1 Internal radius of main pipe
12414         #  @param theW1 Width of main pipe
12415         #  @param theL1 Half-length of main pipe
12416         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12417         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12418         #  @param theL2 Half-length of incident pipe
12419         #  @param theRF Radius of curvature of fillet.
12420         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12421         #  @param theP1 1st junction point of main pipe
12422         #  @param theP2 2nd junction point of main pipe
12423         #  @param theP3 Junction point of incident pipe
12424         #
12425         #  @param theRL Internal radius of left thickness reduction
12426         #  @param theWL Width of left thickness reduction
12427         #  @param theLtransL Length of left transition part
12428         #  @param theLthinL Length of left thin part
12429         #
12430         #  @param theRR Internal radius of right thickness reduction
12431         #  @param theWR Width of right thickness reduction
12432         #  @param theLtransR Length of right transition part
12433         #  @param theLthinR Length of right thin part
12434         #
12435         #  @param theRI Internal radius of incident thickness reduction
12436         #  @param theWI Width of incident thickness reduction
12437         #  @param theLtransI Length of incident transition part
12438         #  @param theLthinI Length of incident thin part
12439         #
12440         #  @param theName Object name; when specified, this parameter is used
12441         #         for result publication in the study. Otherwise, if automatic
12442         #         publication is switched on, default value is used for result name.
12443         #
12444         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12445         #
12446         #  @ref tui_creation_pipetshape "Example"
12447         def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
12448                                   theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12449                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12450                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12451                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12452                                   theName=None):
12453             """
12454             Create a T-shape object with fillet and with specified caracteristics for the main
12455             and the incident pipes (radius, width, half-length). The fillet is
12456             created on the junction of the pipes.
12457             The extremities of the main pipe are located on junctions points P1 and P2.
12458             The extremity of the incident pipe is located on junction point P3.
12459
12460             Parameters:
12461                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12462                 the main plane of the T-shape is XOY.
12463                 theR1 Internal radius of main pipe
12464                 theW1 Width of main pipe
12465                 heL1 Half-length of main pipe
12466                 theR2 Internal radius of incident pipe (R2 < R1)
12467                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12468                 theL2 Half-length of incident pipe
12469                 theRF Radius of curvature of fillet.
12470                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12471                 theP1 1st junction point of main pipe
12472                 theP2 2nd junction point of main pipe
12473                 theP3 Junction point of incident pipe
12474
12475                 theRL Internal radius of left thickness reduction
12476                 theWL Width of left thickness reduction
12477                 theLtransL Length of left transition part
12478                 theLthinL Length of left thin part
12479
12480                 theRR Internal radius of right thickness reduction
12481                 theWR Width of right thickness reduction
12482                 theLtransR Length of right transition part
12483                 theLthinR Length of right thin part
12484
12485                 theRI Internal radius of incident thickness reduction
12486                 theWI Width of incident thickness reduction
12487                 theLtransI Length of incident transition part
12488                 theLthinI Length of incident thin part
12489
12490                 theName Object name; when specified, this parameter is used
12491                         for result publication in the study. Otherwise, if automatic
12492                         publication is switched on, default value is used for result name.
12493                 
12494             Returns:
12495                 List of GEOM_Object, containing the created shape and propagation groups.
12496                 
12497             Example of usage:
12498                 # create PipeTShape with fillet object
12499                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
12500                 # create PipeTShape with fillet object with position
12501                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
12502                 # create PipeTShape with fillet object with left thickness reduction
12503                 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)
12504             """
12505             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)
12506             if (theP1 and theP2 and theP3):
12507               anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12508                                                                     theRL, theWL, theLtransL, theLthinL,
12509                                                                     theRR, theWR, theLtransR, theLthinR,
12510                                                                     theRI, theWI, theLtransI, theLthinI,
12511                                                                     theRF, theHexMesh, theP1, theP2, theP3)
12512             else:
12513               anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
12514                                                         theRL, theWL, theLtransL, theLthinL,
12515                                                         theRR, theWR, theLtransR, theLthinR,
12516                                                         theRI, theWI, theLtransI, theLthinI,
12517                                                         theRF, theHexMesh)
12518             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
12519             if Parameters: anObj[0].SetParameters(Parameters)
12520             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12521             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12522             return anObj
12523
12524         ## This function allows creating a disk already divided into blocks. It
12525         #  can be used to create divided pipes for later meshing in hexaedra.
12526         #  @param theR Radius of the disk
12527         #  @param theOrientation Orientation of the plane on which the disk will be built
12528         #         1 = XOY, 2 = OYZ, 3 = OZX
12529         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12530         #  @param theName Object name; when specified, this parameter is used
12531         #         for result publication in the study. Otherwise, if automatic
12532         #         publication is switched on, default value is used for result name.
12533         #
12534         #  @return New GEOM_Object, containing the created shape.
12535         #
12536         #  @ref tui_creation_divideddisk "Example"
12537         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
12538             """
12539             Creates a disk, divided into blocks. It can be used to create divided pipes
12540             for later meshing in hexaedra.
12541
12542             Parameters:
12543                 theR Radius of the disk
12544                 theOrientation Orientation of the plane on which the disk will be built:
12545                                1 = XOY, 2 = OYZ, 3 = OZX
12546                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12547                 theName Object name; when specified, this parameter is used
12548                         for result publication in the study. Otherwise, if automatic
12549                         publication is switched on, default value is used for result name.
12550
12551             Returns:
12552                 New GEOM_Object, containing the created shape.
12553             """
12554             theR, Parameters = ParseParameters(theR)
12555             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
12556             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
12557             if Parameters: anObj.SetParameters(Parameters)
12558             self._autoPublish(anObj, theName, "dividedDisk")
12559             return anObj
12560             
12561         ## This function allows creating a disk already divided into blocks. It
12562         #  can be used to create divided pipes for later meshing in hexaedra.
12563         #  @param theCenter Center of the disk
12564         #  @param theVector Normal vector to the plane of the created disk
12565         #  @param theRadius Radius of the disk
12566         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12567         #  @param theName Object name; when specified, this parameter is used
12568         #         for result publication in the study. Otherwise, if automatic
12569         #         publication is switched on, default value is used for result name.
12570         #
12571         #  @return New GEOM_Object, containing the created shape.
12572         #
12573         #  @ref tui_creation_divideddisk "Example"
12574         def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
12575             """
12576             Creates a disk already divided into blocks. It can be used to create divided pipes
12577             for later meshing in hexaedra.
12578
12579             Parameters:
12580                 theCenter Center of the disk
12581                 theVector Normal vector to the plane of the created disk
12582                 theRadius Radius of the disk
12583                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12584                 theName Object name; when specified, this parameter is used
12585                         for result publication in the study. Otherwise, if automatic
12586                         publication is switched on, default value is used for result name.
12587
12588             Returns:
12589                 New GEOM_Object, containing the created shape.
12590             """
12591             theRadius, Parameters = ParseParameters(theRadius)
12592             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
12593             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
12594             if Parameters: anObj.SetParameters(Parameters)
12595             self._autoPublish(anObj, theName, "dividedDisk")
12596             return anObj
12597
12598         ## Builds a cylinder prepared for hexa meshes
12599         #  @param theR Radius of the cylinder
12600         #  @param theH Height of the cylinder
12601         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12602         #  @param theName Object name; when specified, this parameter is used
12603         #         for result publication in the study. Otherwise, if automatic
12604         #         publication is switched on, default value is used for result name.
12605         #
12606         #  @return New GEOM_Object, containing the created shape.
12607         #
12608         #  @ref tui_creation_dividedcylinder "Example"
12609         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
12610             """
12611             Builds a cylinder prepared for hexa meshes
12612
12613             Parameters:
12614                 theR Radius of the cylinder
12615                 theH Height of the cylinder
12616                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12617                 theName Object name; when specified, this parameter is used
12618                         for result publication in the study. Otherwise, if automatic
12619                         publication is switched on, default value is used for result name.
12620
12621             Returns:
12622                 New GEOM_Object, containing the created shape.
12623             """
12624             theR, theH, Parameters = ParseParameters(theR, theH)
12625             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
12626             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
12627             if Parameters: anObj.SetParameters(Parameters)
12628             self._autoPublish(anObj, theName, "dividedCylinder")
12629             return anObj
12630
12631         ## Create a surface from a cloud of points
12632         #  @param thelPoints list of points. Compounds of points are
12633         #         accepted as well.
12634         #  @param theNbMax maximum number of Bezier pieces in the resulting
12635         #         surface.
12636         #  @param theDegMax maximum degree of the resulting BSpline surface.
12637         #  @param theDMax specifies maximum value of the
12638         #         GeomPlate_PlateG0Criterion criterion.
12639         #  @param theName Object name; when specified, this parameter is used
12640         #         for result publication in the study. Otherwise, if automatic
12641         #         publication is switched on, default value is used for result name.
12642         #  @return New GEOM_Object, containing the created shape.
12643         #
12644         #  @ref tui_creation_smoothingsurface "Example"
12645         def MakeSmoothingSurface(self, thelPoints, theNbMax=2, theDegMax=8,
12646                                  theDMax=0.0, theName=None):
12647             """
12648             Create a surface from a cloud of points
12649
12650             Parameters:
12651                 thelPoints list of points. Compounds of points are
12652                            accepted as well.
12653                 theNbMax maximum number of Bezier pieces in the resulting
12654                          surface.
12655                 theDegMax maximum degree of the resulting BSpline surface.
12656                 theDMax specifies maximum value of the
12657                         GeomPlate_PlateG0Criterion criterion.
12658                 theName Object name; when specified, this parameter is used
12659                         for result publication in the study. Otherwise, if automatic
12660                         publication is switched on, default value is used for result name.
12661
12662             Returns:
12663                 New GEOM_Object, containing the created shape.
12664             """
12665             anObj = self.AdvOp.MakeSmoothingSurface
12666                 (thelPoints, theNbMax, theDegMax, theDMax)
12667             RaiseIfFailed("MakeSmoothingSurface", self.AdvOp)
12668             self._autoPublish(anObj, theName, "smoothing")
12669             return anObj
12670
12671         ## Export a shape to XAO format
12672         #  @param shape The shape to export
12673         #  @param groups The list of groups to export
12674         #  @param fields The list of fields to export
12675         #  @param author The author of the export
12676         #  @param fileName The name of the file to export
12677         #  @return boolean
12678         #
12679         #  @ref tui_exportxao "Example"
12680         def ExportXAO(self, shape, groups, fields, author, fileName):
12681             res = self.InsertOp.ExportXAO(shape, groups, fields, author, fileName)
12682             RaiseIfFailed("ExportXAO", self.InsertOp)
12683             return res
12684
12685         ## Import a shape from XAO format
12686         #  @param shape Shape to export
12687         #  @param fileName The name of the file to import
12688         #  @return tuple (res, shape, subShapes, groups, fields)
12689         #       res Flag indicating if the import was successful
12690         #       shape The imported shape
12691         #       subShapes The list of imported subShapes
12692         #       groups The list of imported groups
12693         #       fields The list of imported fields
12694         #
12695         #  @ref tui_importxao "Example"
12696         def ImportXAO(self, fileName):
12697             res = self.InsertOp.ImportXAO(fileName)
12698             RaiseIfFailed("ImportXAO", self.InsertOp)
12699             return res
12700
12701         #@@ insert new functions before this line @@ do not remove this line @@#
12702
12703         # end of l4_advanced
12704         ## @}
12705
12706         ## Create a copy of the given object
12707         #
12708         #  @param theOriginal geometry object for copy
12709         #  @param theName Object name; when specified, this parameter is used
12710         #         for result publication in the study. Otherwise, if automatic
12711         #         publication is switched on, default value is used for result name.
12712         #
12713         #  @return New GEOM_Object, containing the copied shape.
12714         #
12715         #  @ingroup l1_geomBuilder_auxiliary
12716         #  @ref swig_MakeCopy "Example"
12717         def MakeCopy(self, theOriginal, theName=None):
12718             """
12719             Create a copy of the given object
12720
12721             Parameters:
12722                 theOriginal geometry object for copy
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 copied shape.
12729
12730             Example of usage: Copy = geompy.MakeCopy(Box)
12731             """
12732             # Example: see GEOM_TestAll.py
12733             anObj = self.InsertOp.MakeCopy(theOriginal)
12734             RaiseIfFailed("MakeCopy", self.InsertOp)
12735             self._autoPublish(anObj, theName, "copy")
12736             return anObj
12737
12738         ## Add Path to load python scripts from
12739         #  @param Path a path to load python scripts from
12740         #  @ingroup l1_geomBuilder_auxiliary
12741         def addPath(self,Path):
12742             """
12743             Add Path to load python scripts from
12744
12745             Parameters:
12746                 Path a path to load python scripts from
12747             """
12748             if (sys.path.count(Path) < 1):
12749                 sys.path.append(Path)
12750                 pass
12751             pass
12752
12753         ## Load marker texture from the file
12754         #  @param Path a path to the texture file
12755         #  @return unique texture identifier
12756         #  @ingroup l1_geomBuilder_auxiliary
12757         def LoadTexture(self, Path):
12758             """
12759             Load marker texture from the file
12760             
12761             Parameters:
12762                 Path a path to the texture file
12763                 
12764             Returns:
12765                 unique texture identifier
12766             """
12767             # Example: see GEOM_TestAll.py
12768             ID = self.InsertOp.LoadTexture(Path)
12769             RaiseIfFailed("LoadTexture", self.InsertOp)
12770             return ID
12771
12772         ## Get internal name of the object based on its study entry
12773         #  @note This method does not provide an unique identifier of the geometry object.
12774         #  @note This is internal function of GEOM component, though it can be used outside it for 
12775         #  appropriate reason (e.g. for identification of geometry object).
12776         #  @param obj geometry object
12777         #  @return unique object identifier
12778         #  @ingroup l1_geomBuilder_auxiliary
12779         def getObjectID(self, obj):
12780             """
12781             Get internal name of the object based on its study entry.
12782             Note: this method does not provide an unique identifier of the geometry object.
12783             It is an internal function of GEOM component, though it can be used outside GEOM for 
12784             appropriate reason (e.g. for identification of geometry object).
12785
12786             Parameters:
12787                 obj geometry object
12788
12789             Returns:
12790                 unique object identifier
12791             """
12792             ID = ""
12793             entry = salome.ObjectToID(obj)
12794             if entry is not None:
12795                 lst = entry.split(":")
12796                 if len(lst) > 0:
12797                     ID = lst[-1] # -1 means last item in the list            
12798                     return "GEOM_" + ID
12799             return ID
12800                 
12801             
12802
12803         ## Add marker texture. @a Width and @a Height parameters
12804         #  specify width and height of the texture in pixels.
12805         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12806         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12807         #  parameter should be unpacked string, in which '1' symbols represent opaque
12808         #  pixels and '0' represent transparent pixels of the texture bitmap.
12809         #
12810         #  @param Width texture width in pixels
12811         #  @param Height texture height in pixels
12812         #  @param Texture texture data
12813         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12814         #  @return unique texture identifier
12815         #  @ingroup l1_geomBuilder_auxiliary
12816         def AddTexture(self, Width, Height, Texture, RowData=False):
12817             """
12818             Add marker texture. Width and Height parameters
12819             specify width and height of the texture in pixels.
12820             If RowData is True, Texture parameter should represent texture data
12821             packed into the byte array. If RowData is False (default), Texture
12822             parameter should be unpacked string, in which '1' symbols represent opaque
12823             pixels and '0' represent transparent pixels of the texture bitmap.
12824
12825             Parameters:
12826                 Width texture width in pixels
12827                 Height texture height in pixels
12828                 Texture texture data
12829                 RowData if True, Texture data are packed in the byte stream
12830
12831             Returns:
12832                 return unique texture identifier
12833             """
12834             if not RowData: Texture = PackData(Texture)
12835             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12836             RaiseIfFailed("AddTexture", self.InsertOp)
12837             return ID
12838
12839         ## Creates a new folder object. It is a container for any GEOM objects.
12840         #  @param Name name of the container
12841         #  @param Father parent object. If None, 
12842         #         folder under 'Geometry' root object will be created.
12843         #  @return a new created folder
12844         #  @ingroup l1_publish_data
12845         def NewFolder(self, Name, Father=None):
12846             """
12847             Create a new folder object. It is an auxiliary container for any GEOM objects.
12848             
12849             Parameters:
12850                 Name name of the container
12851                 Father parent object. If None, 
12852                 folder under 'Geometry' root object will be created.
12853             
12854             Returns:
12855                 a new created folder
12856             """
12857             if not Father: Father = self.father
12858             return self.CreateFolder(Name, Father)
12859
12860         ## Move object to the specified folder
12861         #  @param Object object to move
12862         #  @param Folder target folder
12863         #  @ingroup l1_publish_data
12864         def PutToFolder(self, Object, Folder):
12865             """
12866             Move object to the specified folder
12867             
12868             Parameters:
12869                 Object object to move
12870                 Folder target folder
12871             """
12872             self.MoveToFolder(Object, Folder)
12873             pass
12874
12875         ## Move list of objects to the specified folder
12876         #  @param ListOfSO list of objects to move
12877         #  @param Folder target folder
12878         #  @ingroup l1_publish_data
12879         def PutListToFolder(self, ListOfSO, Folder):
12880             """
12881             Move list of objects to the specified folder
12882             
12883             Parameters:
12884                 ListOfSO list of objects to move
12885                 Folder target folder
12886             """
12887             self.MoveListToFolder(ListOfSO, Folder)
12888             pass
12889
12890         ## @addtogroup l2_field
12891         ## @{
12892
12893         ## Creates a field
12894         #  @param shape the shape the field lies on
12895         #  @param name the field name
12896         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
12897         #  @param dimension dimension of the shape the field lies on
12898         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12899         #  @param componentNames names of components
12900         #  @return a created field
12901         def CreateField(self, shape, name, type, dimension, componentNames):
12902             """
12903             Creates a field
12904
12905             Parameters:
12906                 shape the shape the field lies on
12907                 name  the field name
12908                 type  type of field data
12909                 dimension dimension of the shape the field lies on
12910                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12911                 componentNames names of components
12912             
12913             Returns:
12914                 a created field
12915             """
12916             if isinstance( type, int ):
12917                 if type < 0 or type > 3:
12918                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
12919                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
12920
12921             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
12922             RaiseIfFailed("CreateField", self.FieldOp)
12923             global geom
12924             geom._autoPublish( f, "", name)
12925             return f
12926
12927         ## Removes a field from the GEOM component
12928         #  @param field the field to remove
12929         def RemoveField(self, field):
12930             "Removes a field from the GEOM component"
12931             global geom
12932             if isinstance( field, GEOM._objref_GEOM_Field ):
12933                 geom.RemoveObject( field )
12934             elif isinstance( field, geomField ):
12935                 geom.RemoveObject( field.field )
12936             else:
12937                 raise RuntimeError, "RemoveField() : the object is not a field"
12938             return
12939
12940         ## Returns number of fields on a shape
12941         def CountFields(self, shape):
12942             "Returns number of fields on a shape"
12943             nb = self.FieldOp.CountFields( shape )
12944             RaiseIfFailed("CountFields", self.FieldOp)
12945             return nb
12946
12947         ## Returns all fields on a shape
12948         def GetFields(self, shape):
12949             "Returns all fields on a shape"
12950             ff = self.FieldOp.GetFields( shape )
12951             RaiseIfFailed("GetFields", self.FieldOp)
12952             return ff
12953
12954         ## Returns a field on a shape by its name
12955         def GetField(self, shape, name):
12956             "Returns a field on a shape by its name"
12957             f = self.FieldOp.GetField( shape, name )
12958             RaiseIfFailed("GetField", self.FieldOp)
12959             return f
12960
12961         # end of l2_field
12962         ## @}
12963
12964
12965 import omniORB
12966 # Register the new proxy for GEOM_Gen
12967 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
12968
12969
12970 ## Field on Geometry
12971 #  @ingroup l2_field
12972 class geomField( GEOM._objref_GEOM_Field ):
12973
12974     def __init__(self):
12975         GEOM._objref_GEOM_Field.__init__(self)
12976         self.field = GEOM._objref_GEOM_Field
12977         return
12978
12979     ## Returns the shape the field lies on
12980     def getShape(self):
12981         "Returns the shape the field lies on"
12982         return self.field.GetShape(self)
12983
12984     ## Returns the field name
12985     def getName(self):
12986         "Returns the field name"
12987         return self.field.GetName(self)
12988
12989     ## Returns type of field data as integer [0-3]
12990     def getType(self):
12991         "Returns type of field data"
12992         return self.field.GetDataType(self)._v
12993
12994     ## Returns type of field data:
12995     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
12996     def getTypeEnum(self):
12997         "Returns type of field data"
12998         return self.field.GetDataType(self)
12999
13000     ## Returns dimension of the shape the field lies on:
13001     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13002     def getDimension(self):
13003         """Returns dimension of the shape the field lies on:
13004         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
13005         return self.field.GetDimension(self)
13006
13007     ## Returns names of components
13008     def getComponents(self):
13009         "Returns names of components"
13010         return self.field.GetComponents(self)
13011
13012     ## Adds a time step to the field
13013     #  @param step the time step number futher used as the step identifier
13014     #  @param stamp the time step time
13015     #  @param values the values of the time step
13016     def addStep(self, step, stamp, values):
13017         "Adds a time step to the field"
13018         stp = self.field.AddStep( self, step, stamp )
13019         if not stp:
13020             raise RuntimeError, \
13021                   "Field.addStep() : Error: step %s already exists in this field"%step
13022         global geom
13023         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
13024         self.setValues( step, values )
13025         return stp
13026
13027     ## Remove a time step from the field
13028     def removeStep(self,step):
13029         "Remove a time step from the field"
13030         stepSO = None
13031         try:
13032             stepObj = self.field.GetStep( self, step )
13033             if stepObj:
13034                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
13035         except:
13036             #import traceback
13037             #traceback.print_exc()
13038             pass
13039         self.field.RemoveStep( self, step )
13040         if stepSO:
13041             geom.myBuilder.RemoveObjectWithChildren( stepSO )
13042         return
13043
13044     ## Returns number of time steps in the field
13045     def countSteps(self):
13046         "Returns number of time steps in the field"
13047         return self.field.CountSteps(self)
13048
13049     ## Returns a list of time step IDs in the field
13050     def getSteps(self):
13051         "Returns a list of time step IDs in the field"
13052         return self.field.GetSteps(self)
13053
13054     ## Returns a time step by its ID
13055     def getStep(self,step):
13056         "Returns a time step by its ID"
13057         stp = self.field.GetStep(self, step)
13058         if not stp:
13059             raise RuntimeError, "Step %s is missing from this field"%step
13060         return stp
13061
13062     ## Returns the time of the field step
13063     def getStamp(self,step):
13064         "Returns the time of the field step"
13065         return self.getStep(step).GetStamp()
13066
13067     ## Changes the time of the field step
13068     def setStamp(self, step, stamp):
13069         "Changes the time of the field step"
13070         return self.getStep(step).SetStamp(stamp)
13071
13072     ## Returns values of the field step
13073     def getValues(self, step):
13074         "Returns values of the field step"
13075         return self.getStep(step).GetValues()
13076
13077     ## Changes values of the field step
13078     def setValues(self, step, values):
13079         "Changes values of the field step"
13080         stp = self.getStep(step)
13081         errBeg = "Field.setValues(values) : Error: "
13082         try:
13083             ok = stp.SetValues( values )
13084         except Exception, e:
13085             excStr = str(e)
13086             if excStr.find("WrongPythonType") > 0:
13087                 raise RuntimeError, errBeg +\
13088                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
13089             raise RuntimeError, errBeg + str(e)
13090         if not ok:
13091             nbOK = self.field.GetArraySize(self)
13092             nbKO = len(values)
13093             if nbOK != nbKO:
13094                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
13095             else:
13096                 raise RuntimeError, errBeg + "failed"
13097         return
13098
13099     pass # end of class geomField
13100
13101 # Register the new proxy for GEOM_Field
13102 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
13103
13104
13105 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
13106 #  interface to GEOM operations.
13107 #
13108 #  Typical use is:
13109 #  \code
13110 #    import salome
13111 #    salome.salome_init()
13112 #    from salome.geom import geomBuilder
13113 #    geompy = geomBuilder.New(salome.myStudy)
13114 #  \endcode
13115 #  @param  study     SALOME study, generally obtained by salome.myStudy.
13116 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13117 #  @return geomBuilder instance
13118 def New( study, instance=None):
13119     """
13120     Create a new geomBuilder instance.The geomBuilder class provides the Python
13121     interface to GEOM operations.
13122
13123     Typical use is:
13124         import salome
13125         salome.salome_init()
13126         from salome.geom import geomBuilder
13127         geompy = geomBuilder.New(salome.myStudy)
13128
13129     Parameters:
13130         study     SALOME study, generally obtained by salome.myStudy.
13131         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13132     Returns:
13133         geomBuilder instance
13134     """
13135     #print "New geomBuilder ", study, instance
13136     global engine
13137     global geom
13138     global doLcc
13139     engine = instance
13140     if engine is None:
13141       doLcc = True
13142     geom = geomBuilder()
13143     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
13144     geom.init_geom(study)
13145     return geom