Salome HOME
Mantis issue 0021934: Delete the internal faces of an object
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2013  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.
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 l1_publish_data Publishing results in SALOME study
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 ## - Not that some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
142 ##   @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 ## @}
148
149
150 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
151
152 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
153 ## @{
154 ##   @defgroup l2_import_export Importing/exporting geometrical objects
155 ##   @defgroup l2_creating      Creating geometrical objects
156 ##   @{
157 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
158 ##     @{
159 ##       @defgroup l4_curves        Creating Curves
160
161 ##     @}
162 ##     @defgroup l3_3d_primitives Creating 3D Primitives
163 ##     @defgroup l3_complex       Creating Complex Objects
164 ##     @defgroup l3_groups        Working with groups
165 ##     @defgroup l3_blocks        Building by blocks
166 ##     @{
167 ##       @defgroup l4_blocks_measure Check and Improve
168
169 ##     @}
170 ##     @defgroup l3_sketcher      Sketcher
171 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
172 ##     @{
173 ##       @defgroup l4_decompose     Decompose objects
174 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
175 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
176 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
177 ##       @defgroup l4_advanced      Advanced objects creation functions
178
179 ##     @}
180
181 ##   @}
182 ##   @defgroup l2_transforming  Transforming geometrical objects
183 ##   @{
184 ##     @defgroup l3_basic_op      Basic Operations
185 ##     @defgroup l3_boolean       Boolean Operations
186 ##     @defgroup l3_transform     Transformation Operations
187 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
188 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
189 ##     @defgroup l3_blocks_op     Blocks Operations
190 ##     @defgroup l3_healing       Repairing Operations
191 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
192
193 ##   @}
194 ##   @defgroup l2_measure       Using measurement tools
195
196 ## @}
197
198 # initialize SALOME session in try/except block
199 # to avoid problems in some cases, e.g. when generating documentation
200 try:
201     import salome
202     salome.salome_init()
203     from salome import *
204 except:
205     pass
206
207 from salome_notebook import *
208
209 import GEOM
210 import math
211 import os
212
213 from salome.geom.gsketcher import Sketcher3D, Sketcher2D
214
215 # service function
216 def _toListOfNames(_names, _size=-1):
217     l = []
218     import types
219     if type(_names) in [types.ListType, types.TupleType]:
220         for i in _names: l.append(i)
221     elif _names:
222         l.append(_names)
223     if l and len(l) < _size:
224         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
225     return l
226
227 ## Raise an Error, containing the Method_name, if Operation is Failed
228 ## @ingroup l1_geomBuilder_auxiliary
229 def RaiseIfFailed (Method_name, Operation):
230     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
231         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
232
233 ## Return list of variables value from salome notebook
234 ## @ingroup l1_geomBuilder_auxiliary
235 def ParseParameters(*parameters):
236     Result = []
237     StringResult = []
238     for parameter in parameters:
239         if isinstance(parameter, list):
240             lResults = ParseParameters(*parameter)
241             if len(lResults) > 0:
242                 Result.append(lResults[:-1])
243                 StringResult += lResults[-1].split(":")
244                 pass
245             pass
246         else:
247             if isinstance(parameter,str):
248                 if notebook.isVariable(parameter):
249                     Result.append(notebook.get(parameter))
250                 else:
251                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
252                 pass
253             else:
254                 Result.append(parameter)
255                 pass
256             StringResult.append(str(parameter))
257             pass
258         pass
259     if Result:
260         Result.append(":".join(StringResult))
261     else:
262         Result = ":".join(StringResult)
263     return Result
264
265 ## Return list of variables value from salome notebook
266 ## @ingroup l1_geomBuilder_auxiliary
267 def ParseList(list):
268     Result = []
269     StringResult = ""
270     for parameter in list:
271         if isinstance(parameter,str) and notebook.isVariable(parameter):
272             Result.append(str(notebook.get(parameter)))
273             pass
274         else:
275             Result.append(str(parameter))
276             pass
277
278         StringResult = StringResult + str(parameter)
279         StringResult = StringResult + ":"
280         pass
281     StringResult = StringResult[:len(StringResult)-1]
282     return Result, StringResult
283
284 ## Return list of variables value from salome notebook
285 ## @ingroup l1_geomBuilder_auxiliary
286 def ParseSketcherCommand(command):
287     Result = ""
288     StringResult = ""
289     sections = command.split(":")
290     for section in sections:
291         parameters = section.split(" ")
292         paramIndex = 1
293         for parameter in parameters:
294             if paramIndex > 1 and parameter.find("'") != -1:
295                 parameter = parameter.replace("'","")
296                 if notebook.isVariable(parameter):
297                     Result = Result + str(notebook.get(parameter)) + " "
298                     pass
299                 else:
300                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
301                     pass
302                 pass
303             else:
304                 Result = Result + str(parameter) + " "
305                 pass
306             if paramIndex > 1:
307                 StringResult = StringResult + parameter
308                 StringResult = StringResult + ":"
309                 pass
310             paramIndex = paramIndex + 1
311             pass
312         Result = Result[:len(Result)-1] + ":"
313         pass
314     Result = Result[:len(Result)-1]
315     return Result, StringResult
316
317 ## Helper function which can be used to pack the passed string to the byte data.
318 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
319 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
320 ## For example,
321 ## \code
322 ## val = PackData("10001110") # val = 0xAE
323 ## val = PackData("1")        # val = 0x80
324 ## \endcode
325 ## @param data unpacked data - a string containing '1' and '0' symbols
326 ## @return data packed to the byte stream
327 ## @ingroup l1_geomBuilder_auxiliary
328 def PackData(data):
329     """
330     Helper function which can be used to pack the passed string to the byte data.
331     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
332     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
333
334     Parameters:
335         data unpacked data - a string containing '1' and '0' symbols
336
337     Returns:
338         data packed to the byte stream
339         
340     Example of usage:
341         val = PackData("10001110") # val = 0xAE
342         val = PackData("1")        # val = 0x80
343     """
344     bytes = len(data)/8
345     if len(data)%8: bytes += 1
346     res = ""
347     for b in range(bytes):
348         d = data[b*8:(b+1)*8]
349         val = 0
350         for i in range(8):
351             val *= 2
352             if i < len(d):
353                 if d[i] == "1": val += 1
354                 elif d[i] != "0":
355                     raise "Invalid symbol %s" % d[i]
356                 pass
357             pass
358         res += chr(val)
359         pass
360     return res
361
362 ## Read bitmap texture from the text file.
363 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
364 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
365 ## The function returns width and height of the pixmap in pixels and byte stream representing
366 ## texture bitmap itself.
367 ##
368 ## This function can be used to read the texture to the byte stream in order to pass it to
369 ## the AddTexture() function of geomBuilder class.
370 ## For example,
371 ## \code
372 ## from salome.geom import geomBuilder
373 ## geompy = geomBuilder.New(salome.myStudy)
374 ## texture = geompy.readtexture('mytexture.dat')
375 ## texture = geompy.AddTexture(*texture)
376 ## obj.SetMarkerTexture(texture)
377 ## \endcode
378 ## @param fname texture file name
379 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
380 ## @ingroup l1_geomBuilder_auxiliary
381 def ReadTexture(fname):
382     """
383     Read bitmap texture from the text file.
384     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
385     A zero symbol ('0') represents transparent pixel of the texture bitmap.
386     The function returns width and height of the pixmap in pixels and byte stream representing
387     texture bitmap itself.
388     This function can be used to read the texture to the byte stream in order to pass it to
389     the AddTexture() function of geomBuilder class.
390     
391     Parameters:
392         fname texture file name
393
394     Returns:
395         sequence of tree values: texture's width, height in pixels and its byte stream
396     
397     Example of usage:
398         from salome.geom import geomBuilder
399         geompy = geomBuilder.New(salome.myStudy)
400         texture = geompy.readtexture('mytexture.dat')
401         texture = geompy.AddTexture(*texture)
402         obj.SetMarkerTexture(texture)
403     """
404     try:
405         f = open(fname)
406         lines = [ l.strip() for l in f.readlines()]
407         f.close()
408         maxlen = 0
409         if lines: maxlen = max([len(x) for x in lines])
410         lenbytes = maxlen/8
411         if maxlen%8: lenbytes += 1
412         bytedata=""
413         for line in lines:
414             if len(line)%8:
415                 lenline = (len(line)/8+1)*8
416                 pass
417             else:
418                 lenline = (len(line)/8)*8
419                 pass
420             for i in range(lenline/8):
421                 byte=""
422                 for j in range(8):
423                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
424                     else: byte += "0"
425                     pass
426                 bytedata += PackData(byte)
427                 pass
428             for i in range(lenline/8, lenbytes):
429                 bytedata += PackData("0")
430             pass
431         return lenbytes*8, len(lines), bytedata
432     except:
433         pass
434     return 0, 0, ""
435
436 ## Returns a long value from enumeration type
437 #  Can be used for CORBA enumerator types like GEOM.shape_type
438 #  @param theItem enumeration type
439 #  @ingroup l1_geomBuilder_auxiliary
440 def EnumToLong(theItem):
441     """
442     Returns a long value from enumeration type
443     Can be used for CORBA enumerator types like geomBuilder.ShapeType
444
445     Parameters:
446         theItem enumeration type
447     """
448     ret = theItem
449     if hasattr(theItem, "_v"): ret = theItem._v
450     return ret
451
452 ## Information about closed/unclosed state of shell or wire
453 #  @ingroup l1_geomBuilder_auxiliary
454 class info:
455     """
456     Information about closed/unclosed state of shell or wire
457     """
458     UNKNOWN  = 0
459     CLOSED   = 1
460     UNCLOSED = 2
461
462 # Warning: geom is a singleton
463 geom = None
464 engine = None
465 doLcc = False
466 created = False
467
468 class geomBuilder(object, GEOM._objref_GEOM_Gen):
469
470         ## Enumeration ShapeType as a dictionary. \n
471         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
472         #  @ingroup l1_geomBuilder_auxiliary
473         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
474
475         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
476         #  and a list of parameters, describing the shape.
477         #  List of parameters, describing the shape:
478         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
479         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
480         #
481         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
482         #
483         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
484         #
485         #  - SPHERE:       [xc yc zc            R]
486         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
487         #  - BOX:          [xc yc zc                      ax ay az]
488         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
489         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
490         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
491         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
492         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
493         #
494         #  - SPHERE2D:     [xc yc zc            R]
495         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
496         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
497         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
498         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
499         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
500         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
501         #  - PLANE:        [xo yo zo  dx dy dz]
502         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
503         #  - FACE:                                       [nb_edges  nb_vertices]
504         #
505         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
506         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
507         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
508         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
509         #  - LINE:         [xo yo zo  dx dy dz]
510         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
511         #  - EDGE:                                                 [nb_vertices]
512         #
513         #  - VERTEX:       [x  y  z]
514         #  @ingroup l1_geomBuilder_auxiliary
515         kind = GEOM.GEOM_IKindOfShape
516
517         def __new__(cls):
518             global engine
519             global geom
520             global doLcc
521             global created
522             #print "==== __new__ ", engine, geom, doLcc, created
523             if geom is None:
524                 # geom engine is either retrieved from engine, or created
525                 geom = engine
526                 # Following test avoids a recursive loop
527                 if doLcc:
528                     if geom is not None:
529                         # geom engine not created: existing engine found
530                         doLcc = False
531                     if doLcc and not created:
532                         doLcc = False
533                         # FindOrLoadComponent called:
534                         # 1. CORBA resolution of server
535                         # 2. the __new__ method is called again
536                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
537                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
538                         #print "====1 ",geom
539                 else:
540                     # FindOrLoadComponent not called
541                     if geom is None:
542                         # geomBuilder instance is created from lcc.FindOrLoadComponent
543                         #print "==== super ", engine, geom, doLcc, created
544                         geom = super(geomBuilder,cls).__new__(cls)
545                         #print "====2 ",geom
546                     else:
547                         # geom engine not created: existing engine found
548                         #print "==== existing ", engine, geom, doLcc, created
549                         pass
550                 #print "return geom 1 ", geom
551                 return geom
552
553             #print "return geom 2 ", geom
554             return geom
555
556         def __init__(self):
557             global created
558             #print "-------- geomBuilder __init__ --- ", created, self
559             if not created:
560               created = True
561               GEOM._objref_GEOM_Gen.__init__(self)
562               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
563               self.myBuilder = None
564               self.myStudyId = 0
565               self.father    = None
566
567               self.BasicOp  = None
568               self.CurvesOp = None
569               self.PrimOp   = None
570               self.ShapesOp = None
571               self.HealOp   = None
572               self.InsertOp = None
573               self.BoolOp   = None
574               self.TrsfOp   = None
575               self.LocalOp  = None
576               self.MeasuOp  = None
577               self.BlocksOp = None
578               self.GroupOp  = None
579               self.AdvOp    = None
580             pass
581
582         ## Process object publication in the study, as follows:
583         #  - if @a theName is specified (not None), the object is published in the study
584         #    with this name, not taking into account "auto-publishing" option;
585         #  - if @a theName is NOT specified, the object is published in the study
586         #    (using default name, which can be customized using @a theDefaultName parameter)
587         #    only if auto-publishing is switched on.
588         #
589         #  @param theObj  object, a subject for publishing
590         #  @param theName object name for study
591         #  @param theDefaultName default name for the auto-publishing
592         #
593         #  @sa addToStudyAuto()
594         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
595             # ---
596             def _item_name(_names, _defname, _idx=-1):
597                 if not _names: _names = _defname
598                 if type(_names) in [types.ListType, types.TupleType]:
599                     if _idx >= 0:
600                         if _idx >= len(_names) or not _names[_idx]:
601                             if type(_defname) not in [types.ListType, types.TupleType]:
602                                 _name = "%s_%d"%(_defname, _idx+1)
603                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
604                                 _name = _defname[_idx]
605                             else:
606                                 _name = "%noname_%d"%(dn, _idx+1)
607                             pass
608                         else:
609                             _name = _names[_idx]
610                         pass
611                     else:
612                         # must be wrong  usage
613                         _name = _names[0]
614                     pass
615                 else:
616                     if _idx >= 0:
617                         _name = "%s_%d"%(_names, _idx+1)
618                     else:
619                         _name = _names
620                     pass
621                 return _name
622             # ---
623             if not theObj:
624                 return # null object
625             if not theName and not self.myMaxNbSubShapesAllowed:
626                 return # nothing to do: auto-publishing is disabled
627             if not theName and not theDefaultName:
628                 return # neither theName nor theDefaultName is given
629             import types
630             if type(theObj) in [types.ListType, types.TupleType]:
631                 # list of objects is being published
632                 idx = 0
633                 for obj in theObj:
634                     if not obj: continue # bad object
635                     ###if obj.GetStudyEntry(): continue # already published
636                     name = _item_name(theName, theDefaultName, idx)
637                     if obj.IsMainShape() or not obj.GetMainShape().GetStudyEntry():
638                         self.addToStudy(obj, name) # "%s_%d"%(aName, idx)
639                     else:
640                         self.addToStudyInFather(obj.GetMainShape(), obj, name) # "%s_%d"%(aName, idx)
641                         pass
642                     idx = idx+1
643                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
644                     pass
645                 pass
646             else:
647                 # single object is published
648                 ###if theObj.GetStudyEntry(): return # already published
649                 name = _item_name(theName, theDefaultName)
650                 if theObj.IsMainShape():
651                     self.addToStudy(theObj, name)
652                 else:
653                     self.addToStudyInFather(theObj.GetMainShape(), theObj, name)
654                     pass
655                 pass
656             pass
657
658         ## @addtogroup l1_geomBuilder_auxiliary
659         ## @{
660         def init_geom(self,theStudy):
661             self.myStudy = theStudy
662             self.myStudyId = self.myStudy._get_StudyId()
663             self.myBuilder = self.myStudy.NewBuilder()
664             self.father = self.myStudy.FindComponent("GEOM")
665             if self.father is None:
666                 self.father = self.myBuilder.NewComponent("GEOM")
667                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
668                 FName = A1._narrow(SALOMEDS.AttributeName)
669                 FName.SetValue("Geometry")
670                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
671                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
672                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
673                 self.myBuilder.DefineComponentInstance(self.father,self)
674                 pass
675             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
676             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
677             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
678             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
679             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
680             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
681             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
682             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
683             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
684             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
685             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
686             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
687             self.AdvOp    = self.GetIAdvancedOperations (self.myStudyId)
688             pass
689
690         ## Enable / disable results auto-publishing
691         # 
692         #  The automatic publishing is managed in the following way:
693         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
694         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
695         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
696         #  value passed as parameter has the same effect.
697         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
698         #  maximum number of sub-shapes allowed for publishing is set to specified value.
699         #
700         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
701         #  @ingroup l1_publish_data
702         def addToStudyAuto(self, maxNbSubShapes=-1):
703             """
704             Enable / disable results auto-publishing
705
706             The automatic publishing is managed in the following way:
707             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
708             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
709             maximum number of sub-shapes allowed for publishing is unlimited; any negative
710             value passed as parameter has the same effect.
711             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
712             maximum number of sub-shapes allowed for publishing is set to this value.
713
714             Parameters:
715                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
716
717             Example of usage:
718                 geompy.addToStudyAuto()   # enable auto-publishing
719                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
720                 geompy.addToStudyAuto(0)  # disable auto-publishing
721             """
722             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
723             pass
724
725         ## Dump component to the Python script
726         #  This method overrides IDL function to allow default values for the parameters.
727         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
728             """
729             Dump component to the Python script
730             This method overrides IDL function to allow default values for the parameters.
731             """
732             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
733
734         ## Get name for sub-shape aSubObj of shape aMainObj
735         #
736         # @ref swig_SubShapeName "Example"
737         def SubShapeName(self,aSubObj, aMainObj):
738             """
739             Get name for sub-shape aSubObj of shape aMainObj
740             """
741             # Example: see GEOM_TestAll.py
742
743             #aSubId  = orb.object_to_string(aSubObj)
744             #aMainId = orb.object_to_string(aMainObj)
745             #index = gg.getIndexTopology(aSubId, aMainId)
746             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
747             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
748             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
749             return name
750
751         ## Publish in study aShape with name aName
752         #
753         #  \param aShape the shape to be published
754         #  \param aName  the name for the shape
755         #  \param doRestoreSubShapes if True, finds and publishes also
756         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
757         #         and published sub-shapes of arguments
758         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
759         #                                                  these arguments description
760         #  \return study entry of the published shape in form of string
761         #
762         #  @ingroup l1_publish_data
763         #  @ref swig_all_addtostudy "Example"
764         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
765                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
766             """
767             Publish in study aShape with name aName
768
769             Parameters:
770                 aShape the shape to be published
771                 aName  the name for the shape
772                 doRestoreSubShapes if True, finds and publishes also
773                                    sub-shapes of aShape, corresponding to its arguments
774                                    and published sub-shapes of arguments
775                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
776                                                          these arguments description
777
778             Returns:
779                 study entry of the published shape in form of string
780
781             Example of usage:
782                 id_block1 = geompy.addToStudy(Block1, "Block 1")
783             """
784             # Example: see GEOM_TestAll.py
785             try:
786                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
787                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
788                 if doRestoreSubShapes:
789                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
790                                             theFindMethod, theInheritFirstArg, True )
791             except:
792                 print "addToStudy() failed"
793                 return ""
794             return aShape.GetStudyEntry()
795
796         ## Publish in study aShape with name aName as sub-object of previously published aFather
797         #  \param aFather previously published object
798         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
799         #  \param aName  the name for the shape
800         #
801         #  \return study entry of the published shape in form of string
802         #
803         #  @ingroup l1_publish_data
804         #  @ref swig_all_addtostudyInFather "Example"
805         def addToStudyInFather(self, aFather, aShape, aName):
806             """
807             Publish in study aShape with name aName as sub-object of previously published aFather
808
809             Parameters:
810                 aFather previously published object
811                 aShape the shape to be published as sub-object of aFather
812                 aName  the name for the shape
813
814             Returns:
815                 study entry of the published shape in form of string
816             """
817             # Example: see GEOM_TestAll.py
818             try:
819                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
820                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
821             except:
822                 print "addToStudyInFather() failed"
823                 return ""
824             return aShape.GetStudyEntry()
825
826         ## Unpublish object in study
827         #
828         #  \param obj the object to be unpublished
829         def hideInStudy(self, obj):
830             """
831             Unpublish object in study
832
833             Parameters:
834                 obj the object to be unpublished
835             """
836             ior = salome.orb.object_to_string(obj)
837             aSObject = self.myStudy.FindObjectIOR(ior)
838             if aSObject is not None:
839                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
840                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
841                 drwAttribute.SetDrawable(False)
842                 pass
843
844         # end of l1_geomBuilder_auxiliary
845         ## @}
846
847         ## @addtogroup l3_restore_ss
848         ## @{
849
850         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
851         #  To be used from python scripts out of addToStudy() (non-default usage)
852         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
853         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
854         #                   If this list is empty, all operation arguments will be published
855         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
856         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
857         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
858         #                            Do not publish sub-shapes in place of arguments, but only
859         #                            in place of sub-shapes of the first argument,
860         #                            because the whole shape corresponds to the first argument.
861         #                            Mainly to be used after transformations, but it also can be
862         #                            usefull after partition with one object shape, and some other
863         #                            operations, where only the first argument has to be considered.
864         #                            If theObject has only one argument shape, this flag is automatically
865         #                            considered as True, not regarding really passed value.
866         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
867         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
868         #  \return list of published sub-shapes
869         #
870         #  @ref tui_restore_prs_params "Example"
871         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
872                               theInheritFirstArg=False, theAddPrefix=True):
873             """
874             Publish sub-shapes, standing for arguments and sub-shapes of arguments
875             To be used from python scripts out of geompy.addToStudy (non-default usage)
876
877             Parameters:
878                 theObject published GEOM.GEOM_Object, arguments of which will be published
879                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
880                           If this list is empty, all operation arguments will be published
881                 theFindMethod method to search sub-shapes, corresponding to arguments and
882                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
883                 theInheritFirstArg set properties of the first argument for theObject.
884                                    Do not publish sub-shapes in place of arguments, but only
885                                    in place of sub-shapes of the first argument,
886                                    because the whole shape corresponds to the first argument.
887                                    Mainly to be used after transformations, but it also can be
888                                    usefull after partition with one object shape, and some other
889                                    operations, where only the first argument has to be considered.
890                                    If theObject has only one argument shape, this flag is automatically
891                                    considered as True, not regarding really passed value.
892                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
893                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
894             Returns:
895                 list of published sub-shapes
896             """
897             # Example: see GEOM_TestAll.py
898             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
899                                           theFindMethod, theInheritFirstArg, theAddPrefix)
900
901         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
902         #  To be used from python scripts out of addToStudy() (non-default usage)
903         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
904         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
905         #                   If this list is empty, all operation arguments will be published
906         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
907         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
908         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
909         #                            Do not publish sub-shapes in place of arguments, but only
910         #                            in place of sub-shapes of the first argument,
911         #                            because the whole shape corresponds to the first argument.
912         #                            Mainly to be used after transformations, but it also can be
913         #                            usefull after partition with one object shape, and some other
914         #                            operations, where only the first argument has to be considered.
915         #                            If theObject has only one argument shape, this flag is automatically
916         #                            considered as True, not regarding really passed value.
917         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
918         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
919         #  \return list of published sub-shapes
920         #
921         #  @ref tui_restore_prs_params "Example"
922         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
923                                    theInheritFirstArg=False, theAddPrefix=True):
924             """
925             Publish sub-shapes, standing for arguments and sub-shapes of arguments
926             To be used from python scripts out of geompy.addToStudy() (non-default usage)
927
928             Parameters:
929                 theObject published GEOM.GEOM_Object, arguments of which will be published
930                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
931                           If this list is empty, all operation arguments will be published
932                 theFindMethod method to search sub-shapes, corresponding to arguments and
933                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
934                 theInheritFirstArg set properties of the first argument for theObject.
935                                    Do not publish sub-shapes in place of arguments, but only
936                                    in place of sub-shapes of the first argument,
937                                    because the whole shape corresponds to the first argument.
938                                    Mainly to be used after transformations, but it also can be
939                                    usefull after partition with one object shape, and some other
940                                    operations, where only the first argument has to be considered.
941                                    If theObject has only one argument shape, this flag is automatically
942                                    considered as True, not regarding really passed value.
943                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
944                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
945
946             Returns: 
947                 list of published sub-shapes
948             """
949             # Example: see GEOM_TestAll.py
950             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
951                                                theFindMethod, theInheritFirstArg, theAddPrefix)
952
953         # end of l3_restore_ss
954         ## @}
955
956         ## @addtogroup l3_basic_go
957         ## @{
958
959         ## Create point by three coordinates.
960         #  @param theX The X coordinate of the point.
961         #  @param theY The Y coordinate of the point.
962         #  @param theZ The Z coordinate of the point.
963         #  @param theName Object name; when specified, this parameter is used
964         #         for result publication in the study. Otherwise, if automatic
965         #         publication is switched on, default value is used for result name.
966         #
967         #  @return New GEOM.GEOM_Object, containing the created point.
968         #
969         #  @ref tui_creation_point "Example"
970         def MakeVertex(self, theX, theY, theZ, theName=None):
971             """
972             Create point by three coordinates.
973
974             Parameters:
975                 theX The X coordinate of the point.
976                 theY The Y coordinate of the point.
977                 theZ The Z coordinate of the point.
978                 theName Object name; when specified, this parameter is used
979                         for result publication in the study. Otherwise, if automatic
980                         publication is switched on, default value is used for result name.
981                 
982             Returns: 
983                 New GEOM.GEOM_Object, containing the created point.
984             """
985             # Example: see GEOM_TestAll.py
986             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
987             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
988             RaiseIfFailed("MakePointXYZ", self.BasicOp)
989             anObj.SetParameters(Parameters)
990             self._autoPublish(anObj, theName, "vertex")
991             return anObj
992
993         ## Create a point, distant from the referenced point
994         #  on the given distances along the coordinate axes.
995         #  @param theReference The referenced point.
996         #  @param theX Displacement from the referenced point along OX axis.
997         #  @param theY Displacement from the referenced point along OY axis.
998         #  @param theZ Displacement from the referenced point along OZ axis.
999         #  @param theName Object name; when specified, this parameter is used
1000         #         for result publication in the study. Otherwise, if automatic
1001         #         publication is switched on, default value is used for result name.
1002         #
1003         #  @return New GEOM.GEOM_Object, containing the created point.
1004         #
1005         #  @ref tui_creation_point "Example"
1006         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1007             """
1008             Create a point, distant from the referenced point
1009             on the given distances along the coordinate axes.
1010
1011             Parameters:
1012                 theReference The referenced point.
1013                 theX Displacement from the referenced point along OX axis.
1014                 theY Displacement from the referenced point along OY axis.
1015                 theZ Displacement from the referenced point along OZ axis.
1016                 theName Object name; when specified, this parameter is used
1017                         for result publication in the study. Otherwise, if automatic
1018                         publication is switched on, default value is used for result name.
1019
1020             Returns:
1021                 New GEOM.GEOM_Object, containing the created point.
1022             """
1023             # Example: see GEOM_TestAll.py
1024             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1025             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1026             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1027             anObj.SetParameters(Parameters)
1028             self._autoPublish(anObj, theName, "vertex")
1029             return anObj
1030
1031         ## Create a point, corresponding to the given parameter on the given curve.
1032         #  @param theRefCurve The referenced curve.
1033         #  @param theParameter Value of parameter on the referenced curve.
1034         #  @param theName Object name; when specified, this parameter is used
1035         #         for result publication in the study. Otherwise, if automatic
1036         #         publication is switched on, default value is used for result name.
1037         #
1038         #  @return New GEOM.GEOM_Object, containing the created point.
1039         #
1040         #  @ref tui_creation_point "Example"
1041         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1042             """
1043             Create a point, corresponding to the given parameter on the given curve.
1044
1045             Parameters:
1046                 theRefCurve The referenced curve.
1047                 theParameter Value of parameter on the referenced curve.
1048                 theName Object name; when specified, this parameter is used
1049                         for result publication in the study. Otherwise, if automatic
1050                         publication is switched on, default value is used for result name.
1051
1052             Returns:
1053                 New GEOM.GEOM_Object, containing the created point.
1054
1055             Example of usage:
1056                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1057             """
1058             # Example: see GEOM_TestAll.py
1059             theParameter, Parameters = ParseParameters(theParameter)
1060             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1061             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1062             anObj.SetParameters(Parameters)
1063             self._autoPublish(anObj, theName, "vertex")
1064             return anObj
1065
1066         ## Create a point by projection give coordinates on the given curve
1067         #  @param theRefCurve The referenced curve.
1068         #  @param theX X-coordinate in 3D space
1069         #  @param theY Y-coordinate in 3D space
1070         #  @param theZ Z-coordinate in 3D space
1071         #  @param theName Object name; when specified, this parameter is used
1072         #         for result publication in the study. Otherwise, if automatic
1073         #         publication is switched on, default value is used for result name.
1074         #
1075         #  @return New GEOM.GEOM_Object, containing the created point.
1076         #
1077         #  @ref tui_creation_point "Example"
1078         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1079             """
1080             Create a point by projection give coordinates on the given curve
1081             
1082             Parameters:
1083                 theRefCurve The referenced curve.
1084                 theX X-coordinate in 3D space
1085                 theY Y-coordinate in 3D space
1086                 theZ Z-coordinate in 3D space
1087                 theName Object name; when specified, this parameter is used
1088                         for result publication in the study. Otherwise, if automatic
1089                         publication is switched on, default value is used for result name.
1090
1091             Returns:
1092                 New GEOM.GEOM_Object, containing the created point.
1093
1094             Example of usage:
1095                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1096             """
1097             # Example: see GEOM_TestAll.py
1098             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1099             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1100             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1101             anObj.SetParameters(Parameters)
1102             self._autoPublish(anObj, theName, "vertex")
1103             return anObj
1104
1105         ## Create a point, corresponding to the given length on the given curve.
1106         #  @param theRefCurve The referenced curve.
1107         #  @param theLength Length on the referenced curve. It can be negative.
1108         #  @param theStartPoint Point allowing to choose the direction for the calculation
1109         #                       of the length. If None, start from the first point of theRefCurve.
1110         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created point.
1115         #
1116         #  @ref tui_creation_point "Example"
1117         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1118             """
1119             Create a point, corresponding to the given length on the given curve.
1120
1121             Parameters:
1122                 theRefCurve The referenced curve.
1123                 theLength Length on the referenced curve. It can be negative.
1124                 theStartPoint Point allowing to choose the direction for the calculation
1125                               of the length. If None, start from the first point of theRefCurve.
1126                 theName Object name; when specified, this parameter is used
1127                         for result publication in the study. Otherwise, if automatic
1128                         publication is switched on, default value is used for result name.
1129
1130             Returns:
1131                 New GEOM.GEOM_Object, containing the created point.
1132             """
1133             # Example: see GEOM_TestAll.py
1134             theLength, Parameters = ParseParameters(theLength)
1135             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1136             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1137             anObj.SetParameters(Parameters)
1138             self._autoPublish(anObj, theName, "vertex")
1139             return anObj
1140
1141         ## Create a point, corresponding to the given parameters on the
1142         #    given surface.
1143         #  @param theRefSurf The referenced surface.
1144         #  @param theUParameter Value of U-parameter on the referenced surface.
1145         #  @param theVParameter Value of V-parameter on the referenced surface.
1146         #  @param theName Object name; when specified, this parameter is used
1147         #         for result publication in the study. Otherwise, if automatic
1148         #         publication is switched on, default value is used for result name.
1149         #
1150         #  @return New GEOM.GEOM_Object, containing the created point.
1151         #
1152         #  @ref swig_MakeVertexOnSurface "Example"
1153         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1154             """
1155             Create a point, corresponding to the given parameters on the
1156             given surface.
1157
1158             Parameters:
1159                 theRefSurf The referenced surface.
1160                 theUParameter Value of U-parameter on the referenced surface.
1161                 theVParameter Value of V-parameter on the referenced surface.
1162                 theName Object name; when specified, this parameter is used
1163                         for result publication in the study. Otherwise, if automatic
1164                         publication is switched on, default value is used for result name.
1165
1166             Returns:
1167                 New GEOM.GEOM_Object, containing the created point.
1168
1169             Example of usage:
1170                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1171             """
1172             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1173             # Example: see GEOM_TestAll.py
1174             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1175             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1176             anObj.SetParameters(Parameters);
1177             self._autoPublish(anObj, theName, "vertex")
1178             return anObj
1179
1180         ## Create a point by projection give coordinates on the given surface
1181         #  @param theRefSurf The referenced surface.
1182         #  @param theX X-coordinate in 3D space
1183         #  @param theY Y-coordinate in 3D space
1184         #  @param theZ Z-coordinate in 3D space
1185         #  @param theName Object name; when specified, this parameter is used
1186         #         for result publication in the study. Otherwise, if automatic
1187         #         publication is switched on, default value is used for result name.
1188         #
1189         #  @return New GEOM.GEOM_Object, containing the created point.
1190         #
1191         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1192         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1193             """
1194             Create a point by projection give coordinates on the given surface
1195
1196             Parameters:
1197                 theRefSurf The referenced surface.
1198                 theX X-coordinate in 3D space
1199                 theY Y-coordinate in 3D space
1200                 theZ Z-coordinate in 3D space
1201                 theName Object name; when specified, this parameter is used
1202                         for result publication in the study. Otherwise, if automatic
1203                         publication is switched on, default value is used for result name.
1204
1205             Returns:
1206                 New GEOM.GEOM_Object, containing the created point.
1207
1208             Example of usage:
1209                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1210             """
1211             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1212             # Example: see GEOM_TestAll.py
1213             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1214             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1215             anObj.SetParameters(Parameters);
1216             self._autoPublish(anObj, theName, "vertex")
1217             return anObj
1218
1219         ## Create a point, which lays on the given face.
1220         #  The point will lay in arbitrary place of the face.
1221         #  The only condition on it is a non-zero distance to the face boundary.
1222         #  Such point can be used to uniquely identify the face inside any
1223         #  shape in case, when the shape does not contain overlapped faces.
1224         #  @param theFace The referenced face.
1225         #  @param theName Object name; when specified, this parameter is used
1226         #         for result publication in the study. Otherwise, if automatic
1227         #         publication is switched on, default value is used for result name.
1228         #
1229         #  @return New GEOM.GEOM_Object, containing the created point.
1230         #
1231         #  @ref swig_MakeVertexInsideFace "Example"
1232         def MakeVertexInsideFace (self, theFace, theName=None):
1233             """
1234             Create a point, which lays on the given face.
1235             The point will lay in arbitrary place of the face.
1236             The only condition on it is a non-zero distance to the face boundary.
1237             Such point can be used to uniquely identify the face inside any
1238             shape in case, when the shape does not contain overlapped faces.
1239
1240             Parameters:
1241                 theFace The referenced face.
1242                 theName Object name; when specified, this parameter is used
1243                         for result publication in the study. Otherwise, if automatic
1244                         publication is switched on, default value is used for result name.
1245
1246             Returns:
1247                 New GEOM.GEOM_Object, containing the created point.
1248
1249             Example of usage:
1250                 p_on_face = geompy.MakeVertexInsideFace(Face)
1251             """
1252             # Example: see GEOM_TestAll.py
1253             anObj = self.BasicOp.MakePointOnFace(theFace)
1254             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1255             self._autoPublish(anObj, theName, "vertex")
1256             return anObj
1257
1258         ## Create a point on intersection of two lines.
1259         #  @param theRefLine1, theRefLine2 The referenced lines.
1260         #  @param theName Object name; when specified, this parameter is used
1261         #         for result publication in the study. Otherwise, if automatic
1262         #         publication is switched on, default value is used for result name.
1263         #
1264         #  @return New GEOM.GEOM_Object, containing the created point.
1265         #
1266         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1267         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1268             """
1269             Create a point on intersection of two lines.
1270
1271             Parameters:
1272                 theRefLine1, theRefLine2 The referenced lines.
1273                 theName Object name; when specified, this parameter is used
1274                         for result publication in the study. Otherwise, if automatic
1275                         publication is switched on, default value is used for result name.
1276
1277             Returns:
1278                 New GEOM.GEOM_Object, containing the created point.
1279             """
1280             # Example: see GEOM_TestAll.py
1281             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1282             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1283             self._autoPublish(anObj, theName, "vertex")
1284             return anObj
1285
1286         ## Create a tangent, corresponding to the given parameter on the given curve.
1287         #  @param theRefCurve The referenced curve.
1288         #  @param theParameter Value of parameter on the referenced curve.
1289         #  @param theName Object name; when specified, this parameter is used
1290         #         for result publication in the study. Otherwise, if automatic
1291         #         publication is switched on, default value is used for result name.
1292         #
1293         #  @return New GEOM.GEOM_Object, containing the created tangent.
1294         #
1295         #  @ref swig_MakeTangentOnCurve "Example"
1296         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1297             """
1298             Create a tangent, corresponding to the given parameter on the given curve.
1299
1300             Parameters:
1301                 theRefCurve The referenced curve.
1302                 theParameter Value of parameter on the referenced curve.
1303                 theName Object name; when specified, this parameter is used
1304                         for result publication in the study. Otherwise, if automatic
1305                         publication is switched on, default value is used for result name.
1306
1307             Returns:
1308                 New GEOM.GEOM_Object, containing the created tangent.
1309
1310             Example of usage:
1311                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1312             """
1313             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1314             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1315             self._autoPublish(anObj, theName, "tangent")
1316             return anObj
1317
1318         ## Create a tangent plane, corresponding to the given parameter on the given face.
1319         #  @param theFace The face for which tangent plane should be built.
1320         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1321         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1322         #  @param theTrimSize the size of plane.
1323         #  @param theName Object name; when specified, this parameter is used
1324         #         for result publication in the study. Otherwise, if automatic
1325         #         publication is switched on, default value is used for result name.
1326         #
1327         #  @return New GEOM.GEOM_Object, containing the created tangent.
1328         #
1329         #  @ref swig_MakeTangentPlaneOnFace "Example"
1330         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1331             """
1332             Create a tangent plane, corresponding to the given parameter on the given face.
1333
1334             Parameters:
1335                 theFace The face for which tangent plane should be built.
1336                 theParameterV vertical value of the center point (0.0 - 1.0).
1337                 theParameterU horisontal value of the center point (0.0 - 1.0).
1338                 theTrimSize the size of plane.
1339                 theName Object name; when specified, this parameter is used
1340                         for result publication in the study. Otherwise, if automatic
1341                         publication is switched on, default value is used for result name.
1342
1343            Returns: 
1344                 New GEOM.GEOM_Object, containing the created tangent.
1345
1346            Example of usage:
1347                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1348             """
1349             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1350             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1351             self._autoPublish(anObj, theName, "tangent")
1352             return anObj
1353
1354         ## Create a vector with the given components.
1355         #  @param theDX X component of the vector.
1356         #  @param theDY Y component of the vector.
1357         #  @param theDZ Z component of the vector.
1358         #  @param theName Object name; when specified, this parameter is used
1359         #         for result publication in the study. Otherwise, if automatic
1360         #         publication is switched on, default value is used for result name.
1361         #
1362         #  @return New GEOM.GEOM_Object, containing the created vector.
1363         #
1364         #  @ref tui_creation_vector "Example"
1365         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1366             """
1367             Create a vector with the given components.
1368
1369             Parameters:
1370                 theDX X component of the vector.
1371                 theDY Y component of the vector.
1372                 theDZ Z component of the vector.
1373                 theName Object name; when specified, this parameter is used
1374                         for result publication in the study. Otherwise, if automatic
1375                         publication is switched on, default value is used for result name.
1376
1377             Returns:     
1378                 New GEOM.GEOM_Object, containing the created vector.
1379             """
1380             # Example: see GEOM_TestAll.py
1381             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1382             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1383             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1384             anObj.SetParameters(Parameters)
1385             self._autoPublish(anObj, theName, "vector")
1386             return anObj
1387
1388         ## Create a vector between two points.
1389         #  @param thePnt1 Start point for the vector.
1390         #  @param thePnt2 End point for the vector.
1391         #  @param theName Object name; when specified, this parameter is used
1392         #         for result publication in the study. Otherwise, if automatic
1393         #         publication is switched on, default value is used for result name.
1394         #
1395         #  @return New GEOM.GEOM_Object, containing the created vector.
1396         #
1397         #  @ref tui_creation_vector "Example"
1398         def MakeVector(self, thePnt1, thePnt2, theName=None):
1399             """
1400             Create a vector between two points.
1401
1402             Parameters:
1403                 thePnt1 Start point for the vector.
1404                 thePnt2 End point for the vector.
1405                 theName Object name; when specified, this parameter is used
1406                         for result publication in the study. Otherwise, if automatic
1407                         publication is switched on, default value is used for result name.
1408
1409             Returns:        
1410                 New GEOM.GEOM_Object, containing the created vector.
1411             """
1412             # Example: see GEOM_TestAll.py
1413             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1414             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1415             self._autoPublish(anObj, theName, "vector")
1416             return anObj
1417
1418         ## Create a line, passing through the given point
1419         #  and parrallel to the given direction
1420         #  @param thePnt Point. The resulting line will pass through it.
1421         #  @param theDir Direction. The resulting line will be parallel to it.
1422         #  @param theName Object name; when specified, this parameter is used
1423         #         for result publication in the study. Otherwise, if automatic
1424         #         publication is switched on, default value is used for result name.
1425         #
1426         #  @return New GEOM.GEOM_Object, containing the created line.
1427         #
1428         #  @ref tui_creation_line "Example"
1429         def MakeLine(self, thePnt, theDir, theName=None):
1430             """
1431             Create a line, passing through the given point
1432             and parrallel to the given direction
1433
1434             Parameters:
1435                 thePnt Point. The resulting line will pass through it.
1436                 theDir Direction. The resulting line will be parallel to it.
1437                 theName Object name; when specified, this parameter is used
1438                         for result publication in the study. Otherwise, if automatic
1439                         publication is switched on, default value is used for result name.
1440
1441             Returns:
1442                 New GEOM.GEOM_Object, containing the created line.
1443             """
1444             # Example: see GEOM_TestAll.py
1445             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1446             RaiseIfFailed("MakeLine", self.BasicOp)
1447             self._autoPublish(anObj, theName, "line")
1448             return anObj
1449
1450         ## Create a line, passing through the given points
1451         #  @param thePnt1 First of two points, defining the line.
1452         #  @param thePnt2 Second of two points, defining the line.
1453         #  @param theName Object name; when specified, this parameter is used
1454         #         for result publication in the study. Otherwise, if automatic
1455         #         publication is switched on, default value is used for result name.
1456         #
1457         #  @return New GEOM.GEOM_Object, containing the created line.
1458         #
1459         #  @ref tui_creation_line "Example"
1460         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1461             """
1462             Create a line, passing through the given points
1463
1464             Parameters:
1465                 thePnt1 First of two points, defining the line.
1466                 thePnt2 Second of two points, defining the line.
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 line.
1473             """
1474             # Example: see GEOM_TestAll.py
1475             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1476             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1477             self._autoPublish(anObj, theName, "line")
1478             return anObj
1479
1480         ## Create a line on two faces intersection.
1481         #  @param theFace1 First of two faces, defining the line.
1482         #  @param theFace2 Second of two faces, defining the line.
1483         #  @param theName Object name; when specified, this parameter is used
1484         #         for result publication in the study. Otherwise, if automatic
1485         #         publication is switched on, default value is used for result name.
1486         #
1487         #  @return New GEOM.GEOM_Object, containing the created line.
1488         #
1489         #  @ref swig_MakeLineTwoFaces "Example"
1490         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1491             """
1492             Create a line on two faces intersection.
1493
1494             Parameters:
1495                 theFace1 First of two faces, defining the line.
1496                 theFace2 Second of two faces, defining the line.
1497                 theName Object name; when specified, this parameter is used
1498                         for result publication in the study. Otherwise, if automatic
1499                         publication is switched on, default value is used for result name.
1500
1501             Returns:
1502                 New GEOM.GEOM_Object, containing the created line.
1503             """
1504             # Example: see GEOM_TestAll.py
1505             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1506             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1507             self._autoPublish(anObj, theName, "line")
1508             return anObj
1509
1510         ## Create a plane, passing through the given point
1511         #  and normal to the given vector.
1512         #  @param thePnt Point, the plane has to pass through.
1513         #  @param theVec Vector, defining the plane normal direction.
1514         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1515         #  @param theName Object name; when specified, this parameter is used
1516         #         for result publication in the study. Otherwise, if automatic
1517         #         publication is switched on, default value is used for result name.
1518         #
1519         #  @return New GEOM.GEOM_Object, containing the created plane.
1520         #
1521         #  @ref tui_creation_plane "Example"
1522         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1523             """
1524             Create a plane, passing through the given point
1525             and normal to the given vector.
1526
1527             Parameters:
1528                 thePnt Point, the plane has to pass through.
1529                 theVec Vector, defining the plane normal direction.
1530                 theTrimSize Half size of a side of quadrangle face, representing the plane.
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 plane.
1537             """
1538             # Example: see GEOM_TestAll.py
1539             theTrimSize, Parameters = ParseParameters(theTrimSize);
1540             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1541             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1542             anObj.SetParameters(Parameters)
1543             self._autoPublish(anObj, theName, "plane")
1544             return anObj
1545
1546         ## Create a plane, passing through the three given points
1547         #  @param thePnt1 First of three points, defining the plane.
1548         #  @param thePnt2 Second of three points, defining the plane.
1549         #  @param thePnt3 Fird of three points, defining the plane.
1550         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1551         #  @param theName Object name; when specified, this parameter is used
1552         #         for result publication in the study. Otherwise, if automatic
1553         #         publication is switched on, default value is used for result name.
1554         #
1555         #  @return New GEOM.GEOM_Object, containing the created plane.
1556         #
1557         #  @ref tui_creation_plane "Example"
1558         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1559             """
1560             Create a plane, passing through the three given points
1561
1562             Parameters:
1563                 thePnt1 First of three points, defining the plane.
1564                 thePnt2 Second of three points, defining the plane.
1565                 thePnt3 Fird of three points, defining the plane.
1566                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1567                 theName Object name; when specified, this parameter is used
1568                         for result publication in the study. Otherwise, if automatic
1569                         publication is switched on, default value is used for result name.
1570
1571             Returns:
1572                 New GEOM.GEOM_Object, containing the created plane.
1573             """
1574             # Example: see GEOM_TestAll.py
1575             theTrimSize, Parameters = ParseParameters(theTrimSize);
1576             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1577             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1578             anObj.SetParameters(Parameters)
1579             self._autoPublish(anObj, theName, "plane")
1580             return anObj
1581
1582         ## Create a plane, similar to the existing one, but with another size of representing face.
1583         #  @param theFace Referenced plane or LCS(Marker).
1584         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1585         #  @param theName Object name; when specified, this parameter is used
1586         #         for result publication in the study. Otherwise, if automatic
1587         #         publication is switched on, default value is used for result name.
1588         #
1589         #  @return New GEOM.GEOM_Object, containing the created plane.
1590         #
1591         #  @ref tui_creation_plane "Example"
1592         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1593             """
1594             Create a plane, similar to the existing one, but with another size of representing face.
1595
1596             Parameters:
1597                 theFace Referenced plane or LCS(Marker).
1598                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1599                 theName Object name; when specified, this parameter is used
1600                         for result publication in the study. Otherwise, if automatic
1601                         publication is switched on, default value is used for result name.
1602
1603             Returns:
1604                 New GEOM.GEOM_Object, containing the created plane.
1605             """
1606             # Example: see GEOM_TestAll.py
1607             theTrimSize, Parameters = ParseParameters(theTrimSize);
1608             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1609             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1610             anObj.SetParameters(Parameters)
1611             self._autoPublish(anObj, theName, "plane")
1612             return anObj
1613
1614         ## Create a plane, passing through the 2 vectors
1615         #  with center in a start point of the first vector.
1616         #  @param theVec1 Vector, defining center point and plane direction.
1617         #  @param theVec2 Vector, defining the plane normal direction.
1618         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1619         #  @param theName Object name; when specified, this parameter is used
1620         #         for result publication in the study. Otherwise, if automatic
1621         #         publication is switched on, default value is used for result name.
1622         #
1623         #  @return New GEOM.GEOM_Object, containing the created plane.
1624         #
1625         #  @ref tui_creation_plane "Example"
1626         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1627             """
1628             Create a plane, passing through the 2 vectors
1629             with center in a start point of the first vector.
1630
1631             Parameters:
1632                 theVec1 Vector, defining center point and plane direction.
1633                 theVec2 Vector, defining the plane normal direction.
1634                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1635                 theName Object name; when specified, this parameter is used
1636                         for result publication in the study. Otherwise, if automatic
1637                         publication is switched on, default value is used for result name.
1638
1639             Returns: 
1640                 New GEOM.GEOM_Object, containing the created plane.
1641             """
1642             # Example: see GEOM_TestAll.py
1643             theTrimSize, Parameters = ParseParameters(theTrimSize);
1644             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1645             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1646             anObj.SetParameters(Parameters)
1647             self._autoPublish(anObj, theName, "plane")
1648             return anObj
1649
1650         ## Create a plane, based on a Local coordinate system.
1651         #  @param theLCS  coordinate system, defining plane.
1652         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1653         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1654         #  @param theName Object name; when specified, this parameter is used
1655         #         for result publication in the study. Otherwise, if automatic
1656         #         publication is switched on, default value is used for result name.
1657         #
1658         #  @return New GEOM.GEOM_Object, containing the created plane.
1659         #
1660         #  @ref tui_creation_plane "Example"
1661         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1662             """
1663             Create a plane, based on a Local coordinate system.
1664
1665            Parameters: 
1666                 theLCS  coordinate system, defining plane.
1667                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1668                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1669                 theName Object name; when specified, this parameter is used
1670                         for result publication in the study. Otherwise, if automatic
1671                         publication is switched on, default value is used for result name.
1672
1673             Returns: 
1674                 New GEOM.GEOM_Object, containing the created plane.
1675             """
1676             # Example: see GEOM_TestAll.py
1677             theTrimSize, Parameters = ParseParameters(theTrimSize);
1678             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1679             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1680             anObj.SetParameters(Parameters)
1681             self._autoPublish(anObj, theName, "plane")
1682             return anObj
1683
1684         ## Create a local coordinate system.
1685         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1686         #  @param XDX,XDY,XDZ Three components of OX direction
1687         #  @param YDX,YDY,YDZ Three components of OY direction
1688         #  @param theName Object name; when specified, this parameter is used
1689         #         for result publication in the study. Otherwise, if automatic
1690         #         publication is switched on, default value is used for result name.
1691         #
1692         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1693         #
1694         #  @ref swig_MakeMarker "Example"
1695         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1696             """
1697             Create a local coordinate system.
1698
1699             Parameters: 
1700                 OX,OY,OZ Three coordinates of coordinate system origin.
1701                 XDX,XDY,XDZ Three components of OX direction
1702                 YDX,YDY,YDZ Three components of OY direction
1703                 theName Object name; when specified, this parameter is used
1704                         for result publication in the study. Otherwise, if automatic
1705                         publication is switched on, default value is used for result name.
1706
1707             Returns: 
1708                 New GEOM.GEOM_Object, containing the created coordinate system.
1709             """
1710             # Example: see GEOM_TestAll.py
1711             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1712             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1713             RaiseIfFailed("MakeMarker", self.BasicOp)
1714             anObj.SetParameters(Parameters)
1715             self._autoPublish(anObj, theName, "lcs")
1716             return anObj
1717
1718         ## Create a local coordinate system from shape.
1719         #  @param theShape The initial shape to detect the coordinate system.
1720         #  @param theName Object name; when specified, this parameter is used
1721         #         for result publication in the study. Otherwise, if automatic
1722         #         publication is switched on, default value is used for result name.
1723         #
1724         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1725         #
1726         #  @ref tui_creation_lcs "Example"
1727         def MakeMarkerFromShape(self, theShape, theName=None):
1728             """
1729             Create a local coordinate system from shape.
1730
1731             Parameters:
1732                 theShape The initial shape to detect the coordinate system.
1733                 theName Object name; when specified, this parameter is used
1734                         for result publication in the study. Otherwise, if automatic
1735                         publication is switched on, default value is used for result name.
1736                 
1737             Returns: 
1738                 New GEOM.GEOM_Object, containing the created coordinate system.
1739             """
1740             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1741             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1742             self._autoPublish(anObj, theName, "lcs")
1743             return anObj
1744
1745         ## Create a local coordinate system from point and two vectors.
1746         #  @param theOrigin Point of coordinate system origin.
1747         #  @param theXVec Vector of X direction
1748         #  @param theYVec Vector of Y direction
1749         #  @param theName Object name; when specified, this parameter is used
1750         #         for result publication in the study. Otherwise, if automatic
1751         #         publication is switched on, default value is used for result name.
1752         #
1753         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1754         #
1755         #  @ref tui_creation_lcs "Example"
1756         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1757             """
1758             Create a local coordinate system from point and two vectors.
1759
1760             Parameters:
1761                 theOrigin Point of coordinate system origin.
1762                 theXVec Vector of X direction
1763                 theYVec Vector of Y direction
1764                 theName Object name; when specified, this parameter is used
1765                         for result publication in the study. Otherwise, if automatic
1766                         publication is switched on, default value is used for result name.
1767
1768             Returns: 
1769                 New GEOM.GEOM_Object, containing the created coordinate system.
1770
1771             """
1772             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1773             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1774             self._autoPublish(anObj, theName, "lcs")
1775             return anObj
1776
1777         # end of l3_basic_go
1778         ## @}
1779
1780         ## @addtogroup l4_curves
1781         ## @{
1782
1783         ##  Create an arc of circle, passing through three given points.
1784         #  @param thePnt1 Start point of the arc.
1785         #  @param thePnt2 Middle point of the arc.
1786         #  @param thePnt3 End point of the arc.
1787         #  @param theName Object name; when specified, this parameter is used
1788         #         for result publication in the study. Otherwise, if automatic
1789         #         publication is switched on, default value is used for result name.
1790         #
1791         #  @return New GEOM.GEOM_Object, containing the created arc.
1792         #
1793         #  @ref swig_MakeArc "Example"
1794         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1795             """
1796             Create an arc of circle, passing through three given points.
1797
1798             Parameters:
1799                 thePnt1 Start point of the arc.
1800                 thePnt2 Middle point of the arc.
1801                 thePnt3 End point of the arc.
1802                 theName Object name; when specified, this parameter is used
1803                         for result publication in the study. Otherwise, if automatic
1804                         publication is switched on, default value is used for result name.
1805
1806             Returns: 
1807                 New GEOM.GEOM_Object, containing the created arc.
1808             """
1809             # Example: see GEOM_TestAll.py
1810             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1811             RaiseIfFailed("MakeArc", self.CurvesOp)
1812             self._autoPublish(anObj, theName, "arc")
1813             return anObj
1814
1815         ##  Create an arc of circle from a center and 2 points.
1816         #  @param thePnt1 Center of the arc
1817         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1818         #  @param thePnt3 End point of the arc (Gives also a direction)
1819         #  @param theSense Orientation of the arc
1820         #  @param theName Object name; when specified, this parameter is used
1821         #         for result publication in the study. Otherwise, if automatic
1822         #         publication is switched on, default value is used for result name.
1823         #
1824         #  @return New GEOM.GEOM_Object, containing the created arc.
1825         #
1826         #  @ref swig_MakeArc "Example"
1827         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1828             """
1829             Create an arc of circle from a center and 2 points.
1830
1831             Parameters:
1832                 thePnt1 Center of the arc
1833                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1834                 thePnt3 End point of the arc (Gives also a direction)
1835                 theSense Orientation of the arc
1836                 theName Object name; when specified, this parameter is used
1837                         for result publication in the study. Otherwise, if automatic
1838                         publication is switched on, default value is used for result name.
1839
1840             Returns:
1841                 New GEOM.GEOM_Object, containing the created arc.
1842             """
1843             # Example: see GEOM_TestAll.py
1844             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1845             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1846             self._autoPublish(anObj, theName, "arc")
1847             return anObj
1848
1849         ##  Create an arc of ellipse, of center and two points.
1850         #  @param theCenter Center of the arc.
1851         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1852         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1853         #  @param theName Object name; when specified, this parameter is used
1854         #         for result publication in the study. Otherwise, if automatic
1855         #         publication is switched on, default value is used for result name.
1856         #
1857         #  @return New GEOM.GEOM_Object, containing the created arc.
1858         #
1859         #  @ref swig_MakeArc "Example"
1860         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
1861             """
1862             Create an arc of ellipse, of center and two points.
1863
1864             Parameters:
1865                 theCenter Center of the arc.
1866                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1867                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1868                 theName Object name; when specified, this parameter is used
1869                         for result publication in the study. Otherwise, if automatic
1870                         publication is switched on, default value is used for result name.
1871
1872             Returns:
1873                 New GEOM.GEOM_Object, containing the created arc.
1874             """
1875             # Example: see GEOM_TestAll.py
1876             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
1877             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
1878             self._autoPublish(anObj, theName, "arc")
1879             return anObj
1880
1881         ## Create a circle with given center, normal vector and radius.
1882         #  @param thePnt Circle center.
1883         #  @param theVec Vector, normal to the plane of the circle.
1884         #  @param theR Circle radius.
1885         #  @param theName Object name; when specified, this parameter is used
1886         #         for result publication in the study. Otherwise, if automatic
1887         #         publication is switched on, default value is used for result name.
1888         #
1889         #  @return New GEOM.GEOM_Object, containing the created circle.
1890         #
1891         #  @ref tui_creation_circle "Example"
1892         def MakeCircle(self, thePnt, theVec, theR, theName=None):
1893             """
1894             Create a circle with given center, normal vector and radius.
1895
1896             Parameters:
1897                 thePnt Circle center.
1898                 theVec Vector, normal to the plane of the circle.
1899                 theR Circle radius.
1900                 theName Object name; when specified, this parameter is used
1901                         for result publication in the study. Otherwise, if automatic
1902                         publication is switched on, default value is used for result name.
1903
1904             Returns:
1905                 New GEOM.GEOM_Object, containing the created circle.
1906             """
1907             # Example: see GEOM_TestAll.py
1908             theR, Parameters = ParseParameters(theR)
1909             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
1910             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1911             anObj.SetParameters(Parameters)
1912             self._autoPublish(anObj, theName, "circle")
1913             return anObj
1914
1915         ## Create a circle with given radius.
1916         #  Center of the circle will be in the origin of global
1917         #  coordinate system and normal vector will be codirected with Z axis
1918         #  @param theR Circle radius.
1919         #  @param theName Object name; when specified, this parameter is used
1920         #         for result publication in the study. Otherwise, if automatic
1921         #         publication is switched on, default value is used for result name.
1922         #
1923         #  @return New GEOM.GEOM_Object, containing the created circle.
1924         def MakeCircleR(self, theR, theName=None):
1925             """
1926             Create a circle with given radius.
1927             Center of the circle will be in the origin of global
1928             coordinate system and normal vector will be codirected with Z axis
1929
1930             Parameters:
1931                 theR Circle radius.
1932                 theName Object name; when specified, this parameter is used
1933                         for result publication in the study. Otherwise, if automatic
1934                         publication is switched on, default value is used for result name.
1935
1936             Returns:
1937                 New GEOM.GEOM_Object, containing the created circle.
1938             """
1939             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
1940             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1941             self._autoPublish(anObj, theName, "circle")
1942             return anObj
1943
1944         ## Create a circle, passing through three given points
1945         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1946         #  @param theName Object name; when specified, this parameter is used
1947         #         for result publication in the study. Otherwise, if automatic
1948         #         publication is switched on, default value is used for result name.
1949         #
1950         #  @return New GEOM.GEOM_Object, containing the created circle.
1951         #
1952         #  @ref tui_creation_circle "Example"
1953         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
1954             """
1955             Create a circle, passing through three given points
1956
1957             Parameters:
1958                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1959                 theName Object name; when specified, this parameter is used
1960                         for result publication in the study. Otherwise, if automatic
1961                         publication is switched on, default value is used for result name.
1962
1963             Returns:
1964                 New GEOM.GEOM_Object, containing the created circle.
1965             """
1966             # Example: see GEOM_TestAll.py
1967             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
1968             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
1969             self._autoPublish(anObj, theName, "circle")
1970             return anObj
1971
1972         ## Create a circle, with given point1 as center,
1973         #  passing through the point2 as radius and laying in the plane,
1974         #  defined by all three given points.
1975         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1976         #  @param theName Object name; when specified, this parameter is used
1977         #         for result publication in the study. Otherwise, if automatic
1978         #         publication is switched on, default value is used for result name.
1979         #
1980         #  @return New GEOM.GEOM_Object, containing the created circle.
1981         #
1982         #  @ref swig_MakeCircle "Example"
1983         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
1984             """
1985             Create a circle, with given point1 as center,
1986             passing through the point2 as radius and laying in the plane,
1987             defined by all three given points.
1988
1989             Parameters:
1990                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1991                 theName Object name; when specified, this parameter is used
1992                         for result publication in the study. Otherwise, if automatic
1993                         publication is switched on, default value is used for result name.
1994
1995             Returns:
1996                 New GEOM.GEOM_Object, containing the created circle.
1997             """
1998             # Example: see GEOM_example6.py
1999             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2000             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2001             self._autoPublish(anObj, theName, "circle")
2002             return anObj
2003
2004         ## Create an ellipse with given center, normal vector and radiuses.
2005         #  @param thePnt Ellipse center.
2006         #  @param theVec Vector, normal to the plane of the ellipse.
2007         #  @param theRMajor Major ellipse radius.
2008         #  @param theRMinor Minor ellipse radius.
2009         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2010         #  @param theName Object name; when specified, this parameter is used
2011         #         for result publication in the study. Otherwise, if automatic
2012         #         publication is switched on, default value is used for result name.
2013         #
2014         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2015         #
2016         #  @ref tui_creation_ellipse "Example"
2017         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2018             """
2019             Create an ellipse with given center, normal vector and radiuses.
2020
2021             Parameters:
2022                 thePnt Ellipse center.
2023                 theVec Vector, normal to the plane of the ellipse.
2024                 theRMajor Major ellipse radius.
2025                 theRMinor Minor ellipse radius.
2026                 theVecMaj Vector, direction of the ellipse's main axis.
2027                 theName Object name; when specified, this parameter is used
2028                         for result publication in the study. Otherwise, if automatic
2029                         publication is switched on, default value is used for result name.
2030
2031             Returns:    
2032                 New GEOM.GEOM_Object, containing the created ellipse.
2033             """
2034             # Example: see GEOM_TestAll.py
2035             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2036             if theVecMaj is not None:
2037                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2038             else:
2039                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2040                 pass
2041             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2042             anObj.SetParameters(Parameters)
2043             self._autoPublish(anObj, theName, "ellipse")
2044             return anObj
2045
2046         ## Create an ellipse with given radiuses.
2047         #  Center of the ellipse will be in the origin of global
2048         #  coordinate system and normal vector will be codirected with Z axis
2049         #  @param theRMajor Major ellipse radius.
2050         #  @param theRMinor Minor ellipse radius.
2051         #  @param theName Object name; when specified, this parameter is used
2052         #         for result publication in the study. Otherwise, if automatic
2053         #         publication is switched on, default value is used for result name.
2054         #
2055         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2056         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2057             """
2058             Create an ellipse with given radiuses.
2059             Center of the ellipse will be in the origin of global
2060             coordinate system and normal vector will be codirected with Z axis
2061
2062             Parameters:
2063                 theRMajor Major ellipse radius.
2064                 theRMinor Minor ellipse radius.
2065                 theName Object name; when specified, this parameter is used
2066                         for result publication in the study. Otherwise, if automatic
2067                         publication is switched on, default value is used for result name.
2068
2069             Returns:
2070             New GEOM.GEOM_Object, containing the created ellipse.
2071             """
2072             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2073             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2074             self._autoPublish(anObj, theName, "ellipse")
2075             return anObj
2076
2077         ## Create a polyline on the set of points.
2078         #  @param thePoints Sequence of points for the polyline.
2079         #  @param theIsClosed If True, build a closed wire.
2080         #  @param theName Object name; when specified, this parameter is used
2081         #         for result publication in the study. Otherwise, if automatic
2082         #         publication is switched on, default value is used for result name.
2083         #
2084         #  @return New GEOM.GEOM_Object, containing the created polyline.
2085         #
2086         #  @ref tui_creation_curve "Example"
2087         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2088             """
2089             Create a polyline on the set of points.
2090
2091             Parameters:
2092                 thePoints Sequence of points for the polyline.
2093                 theIsClosed If True, build a closed wire.
2094                 theName Object name; when specified, this parameter is used
2095                         for result publication in the study. Otherwise, if automatic
2096                         publication is switched on, default value is used for result name.
2097
2098             Returns:
2099                 New GEOM.GEOM_Object, containing the created polyline.
2100             """
2101             # Example: see GEOM_TestAll.py
2102             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2103             RaiseIfFailed("MakePolyline", self.CurvesOp)
2104             self._autoPublish(anObj, theName, "polyline")
2105             return anObj
2106
2107         ## Create bezier curve on the set of points.
2108         #  @param thePoints Sequence of points for the bezier curve.
2109         #  @param theIsClosed If True, build a closed curve.
2110         #  @param theName Object name; when specified, this parameter is used
2111         #         for result publication in the study. Otherwise, if automatic
2112         #         publication is switched on, default value is used for result name.
2113         #
2114         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2115         #
2116         #  @ref tui_creation_curve "Example"
2117         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2118             """
2119             Create bezier curve on the set of points.
2120
2121             Parameters:
2122                 thePoints Sequence of points for the bezier curve.
2123                 theIsClosed If True, build a closed curve.
2124                 theName Object name; when specified, this parameter is used
2125                         for result publication in the study. Otherwise, if automatic
2126                         publication is switched on, default value is used for result name.
2127
2128             Returns:
2129                 New GEOM.GEOM_Object, containing the created bezier curve.
2130             """
2131             # Example: see GEOM_TestAll.py
2132             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2133             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2134             self._autoPublish(anObj, theName, "bezier")
2135             return anObj
2136
2137         ## Create B-Spline curve on the set of points.
2138         #  @param thePoints Sequence of points for the B-Spline curve.
2139         #  @param theIsClosed If True, build a closed curve.
2140         #  @param theDoReordering If TRUE, the algo does not follow the order of
2141         #                         \a thePoints but searches for the closest vertex.
2142         #  @param theName Object name; when specified, this parameter is used
2143         #         for result publication in the study. Otherwise, if automatic
2144         #         publication is switched on, default value is used for result name.
2145         #
2146         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2147         #
2148         #  @ref tui_creation_curve "Example"
2149         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2150             """
2151             Create B-Spline curve on the set of points.
2152
2153             Parameters:
2154                 thePoints Sequence of points for the B-Spline curve.
2155                 theIsClosed If True, build a closed curve.
2156                 theDoReordering If True, the algo does not follow the order of
2157                                 thePoints but searches for the closest vertex.
2158                 theName Object name; when specified, this parameter is used
2159                         for result publication in the study. Otherwise, if automatic
2160                         publication is switched on, default value is used for result name.
2161
2162             Returns:                     
2163                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2164             """
2165             # Example: see GEOM_TestAll.py
2166             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2167             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2168             self._autoPublish(anObj, theName, "bspline")
2169             return anObj
2170
2171         ## Create B-Spline curve on the set of points.
2172         #  @param thePoints Sequence of points for the B-Spline curve.
2173         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2174         #  @param theLastVec Vector object, defining the curve direction at its last point.
2175         #  @param theName Object name; when specified, this parameter is used
2176         #         for result publication in the study. Otherwise, if automatic
2177         #         publication is switched on, default value is used for result name.
2178         #
2179         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2180         #
2181         #  @ref tui_creation_curve "Example"
2182         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2183             """
2184             Create B-Spline curve on the set of points.
2185
2186             Parameters:
2187                 thePoints Sequence of points for the B-Spline curve.
2188                 theFirstVec Vector object, defining the curve direction at its first point.
2189                 theLastVec Vector object, defining the curve direction at its last point.
2190                 theName Object name; when specified, this parameter is used
2191                         for result publication in the study. Otherwise, if automatic
2192                         publication is switched on, default value is used for result name.
2193
2194             Returns:                     
2195                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2196             """
2197             # Example: see GEOM_TestAll.py
2198             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2199             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2200             self._autoPublish(anObj, theName, "bspline")
2201             return anObj
2202
2203         ## Creates a curve using the parametric definition of the basic points.
2204         #  @param thexExpr parametric equation of the coordinates X.
2205         #  @param theyExpr parametric equation of the coordinates Y.
2206         #  @param thezExpr parametric equation of the coordinates Z.
2207         #  @param theParamMin the minimal value of the parameter.
2208         #  @param theParamMax the maximum value of the parameter.
2209         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2210         #  @param theCurveType the type of the curve.
2211         #  @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.
2212         #  @param theName Object name; when specified, this parameter is used
2213         #         for result publication in the study. Otherwise, if automatic
2214         #         publication is switched on, default value is used for result name.
2215         #
2216         #  @return New GEOM.GEOM_Object, containing the created curve.
2217         #
2218         #  @ref tui_creation_curve "Example"
2219         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2220                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2221             """
2222             Creates a curve using the parametric definition of the basic points.
2223
2224             Parameters:
2225                 thexExpr parametric equation of the coordinates X.
2226                 theyExpr parametric equation of the coordinates Y.
2227                 thezExpr parametric equation of the coordinates Z.
2228                 theParamMin the minimal value of the parameter.
2229                 theParamMax the maximum value of the parameter.
2230                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2231                 theCurveType the type of the curve.
2232                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2233                              method is used which can lead to a bug.
2234                 theName Object name; when specified, this parameter is used
2235                         for result publication in the study. Otherwise, if automatic
2236                         publication is switched on, default value is used for result name.
2237
2238             Returns:
2239                 New GEOM.GEOM_Object, containing the created curve.
2240             """
2241             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2242             if theNewMethod:
2243               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2244             else:
2245               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
2246             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2247             anObj.SetParameters(Parameters)
2248             self._autoPublish(anObj, theName, "curve")
2249             return anObj
2250
2251         # end of l4_curves
2252         ## @}
2253
2254         ## @addtogroup l3_sketcher
2255         ## @{
2256
2257         ## Create a sketcher (wire or face), following the textual description,
2258         #  passed through <VAR>theCommand</VAR> argument. \n
2259         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2260         #  Format of the description string have to be the following:
2261         #
2262         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2263         #
2264         #  Where:
2265         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2266         #  - CMD is one of
2267         #     - "R angle" : Set the direction by angle
2268         #     - "D dx dy" : Set the direction by DX & DY
2269         #     .
2270         #       \n
2271         #     - "TT x y" : Create segment by point at X & Y
2272         #     - "T dx dy" : Create segment by point with DX & DY
2273         #     - "L length" : Create segment by direction & Length
2274         #     - "IX x" : Create segment by direction & Intersect. X
2275         #     - "IY y" : Create segment by direction & Intersect. Y
2276         #     .
2277         #       \n
2278         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2279         #     - "AA x y": Create arc by point at X & Y
2280         #     - "A dx dy" : Create arc by point with DX & DY
2281         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2282         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2283         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2284         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2285         #     .
2286         #       \n
2287         #     - "WW" : Close Wire (to finish)
2288         #     - "WF" : Close Wire and build face (to finish)
2289         #     .
2290         #        \n
2291         #  - Flag1 (= reverse) is 0 or 2 ...
2292         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2293         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2294         #     .
2295         #        \n
2296         #  - Flag2 (= control tolerance) is 0 or 1 ...
2297         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2298         #     - if 1 the wire is built only if the end point is on the arc
2299         #       with a tolerance of 10^-7 on the distance else the creation fails
2300         #
2301         #  @param theCommand String, defining the sketcher in local
2302         #                    coordinates of the working plane.
2303         #  @param theWorkingPlane Nine double values, defining origin,
2304         #                         OZ and OX directions of the working plane.
2305         #  @param theName Object name; when specified, this parameter is used
2306         #         for result publication in the study. Otherwise, if automatic
2307         #         publication is switched on, default value is used for result name.
2308         #
2309         #  @return New GEOM.GEOM_Object, containing the created wire.
2310         #
2311         #  @ref tui_sketcher_page "Example"
2312         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2313             """
2314             Create a sketcher (wire or face), following the textual description, passed
2315             through theCommand argument.
2316             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2317             Format of the description string have to be the following:
2318                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2319             Where:
2320             - x1, y1 are coordinates of the first sketcher point (zero by default),
2321             - CMD is one of
2322                - "R angle" : Set the direction by angle
2323                - "D dx dy" : Set the direction by DX & DY
2324                
2325                - "TT x y" : Create segment by point at X & Y
2326                - "T dx dy" : Create segment by point with DX & DY
2327                - "L length" : Create segment by direction & Length
2328                - "IX x" : Create segment by direction & Intersect. X
2329                - "IY y" : Create segment by direction & Intersect. Y
2330
2331                - "C radius length" : Create arc by direction, radius and length(in degree)
2332                - "AA x y": Create arc by point at X & Y
2333                - "A dx dy" : Create arc by point with DX & DY
2334                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2335                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2336                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2337                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2338
2339                - "WW" : Close Wire (to finish)
2340                - "WF" : Close Wire and build face (to finish)
2341             
2342             - Flag1 (= reverse) is 0 or 2 ...
2343                - if 0 the drawn arc is the one of lower angle (< Pi)
2344                - if 2 the drawn arc ius the one of greater angle (> Pi)
2345         
2346             - Flag2 (= control tolerance) is 0 or 1 ...
2347                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2348                - if 1 the wire is built only if the end point is on the arc
2349                  with a tolerance of 10^-7 on the distance else the creation fails
2350
2351             Parameters:
2352                 theCommand String, defining the sketcher in local
2353                            coordinates of the working plane.
2354                 theWorkingPlane Nine double values, defining origin,
2355                                 OZ and OX directions of the working plane.
2356                 theName Object name; when specified, this parameter is used
2357                         for result publication in the study. Otherwise, if automatic
2358                         publication is switched on, default value is used for result name.
2359
2360             Returns:
2361                 New GEOM.GEOM_Object, containing the created wire.
2362             """
2363             # Example: see GEOM_TestAll.py
2364             theCommand,Parameters = ParseSketcherCommand(theCommand)
2365             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2366             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2367             anObj.SetParameters(Parameters)
2368             self._autoPublish(anObj, theName, "wire")
2369             return anObj
2370
2371         ## Create a sketcher (wire or face), following the textual description,
2372         #  passed through <VAR>theCommand</VAR> argument. \n
2373         #  For format of the description string see MakeSketcher() method.\n
2374         #  @param theCommand String, defining the sketcher in local
2375         #                    coordinates of the working plane.
2376         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2377         #  @param theName Object name; when specified, this parameter is used
2378         #         for result publication in the study. Otherwise, if automatic
2379         #         publication is switched on, default value is used for result name.
2380         #
2381         #  @return New GEOM.GEOM_Object, containing the created wire.
2382         #
2383         #  @ref tui_sketcher_page "Example"
2384         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2385             """
2386             Create a sketcher (wire or face), following the textual description,
2387             passed through theCommand argument.
2388             For format of the description string see geompy.MakeSketcher() method.
2389
2390             Parameters:
2391                 theCommand String, defining the sketcher in local
2392                            coordinates of the working plane.
2393                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2394                 theName Object name; when specified, this parameter is used
2395                         for result publication in the study. Otherwise, if automatic
2396                         publication is switched on, default value is used for result name.
2397
2398             Returns:
2399                 New GEOM.GEOM_Object, containing the created wire.
2400             """
2401             theCommand,Parameters = ParseSketcherCommand(theCommand)
2402             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2403             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2404             anObj.SetParameters(Parameters)
2405             self._autoPublish(anObj, theName, "wire")
2406             return anObj
2407
2408         ## Obtain a 2D sketcher interface
2409         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface      
2410         def Sketcher2D (self):
2411             """
2412             Obtain a 2D sketcher interface.
2413
2414             Example of usage:
2415                sk = geompy.Sketcher2D()
2416                sk.addPoint(20, 20)
2417                sk.addSegmentRelative(15, 70)
2418                sk.addSegmentPerpY(50)
2419                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2420                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2421                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2422                sk.close()
2423                Sketch_1 = sk.wire(geomObj_1)
2424             """
2425             sk = Sketcher2D (self)
2426             return sk
2427         
2428         ## Create a sketcher wire, following the numerical description,
2429         #  passed through <VAR>theCoordinates</VAR> argument. \n
2430         #  @param theCoordinates double values, defining points to create a wire,
2431         #                                                      passing from it.
2432         #  @param theName Object name; when specified, this parameter is used
2433         #         for result publication in the study. Otherwise, if automatic
2434         #         publication is switched on, default value is used for result name.
2435         #
2436         #  @return New GEOM.GEOM_Object, containing the created wire.
2437         #
2438         #  @ref tui_3dsketcher_page "Example"
2439         def Make3DSketcher(self, theCoordinates, theName=None):
2440             """
2441             Create a sketcher wire, following the numerical description,
2442             passed through theCoordinates argument.
2443
2444             Parameters:
2445                 theCoordinates double values, defining points to create a wire,
2446                                passing from it.
2447                 theName Object name; when specified, this parameter is used
2448                         for result publication in the study. Otherwise, if automatic
2449                         publication is switched on, default value is used for result name.
2450
2451             Returns:
2452                 New GEOM_Object, containing the created wire.
2453             """
2454             theCoordinates,Parameters = ParseParameters(theCoordinates)
2455             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2456             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2457             anObj.SetParameters(Parameters)
2458             self._autoPublish(anObj, theName, "wire")
2459             return anObj
2460
2461         ## Obtain a 3D sketcher interface
2462         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2463         #
2464         #  @ref tui_3dsketcher_page "Example"
2465         def Sketcher3D (self):
2466             """
2467             Obtain a 3D sketcher interface.
2468
2469             Example of usage:
2470                 sk = geompy.Sketcher3D()
2471                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2472                 sk.addPointsRelative(0, 0, 130)
2473                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2474                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2475                 sk.close()
2476                 a3D_Sketcher_1 = sk.wire()
2477             """
2478             sk = Sketcher3D (self)
2479             return sk
2480
2481         # end of l3_sketcher
2482         ## @}
2483
2484         ## @addtogroup l3_3d_primitives
2485         ## @{
2486
2487         ## Create a box by coordinates of two opposite vertices.
2488         #
2489         #  @param x1,y1,z1 double values, defining first point it.
2490         #  @param x2,y2,z2 double values, defining first point it.
2491         #  @param theName Object name; when specified, this parameter is used
2492         #         for result publication in the study. Otherwise, if automatic
2493         #         publication is switched on, default value is used for result name.
2494         #
2495         #  @return New GEOM.GEOM_Object, containing the created box.
2496         #
2497         #  @ref tui_creation_box "Example"
2498         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2499             """
2500             Create a box by coordinates of two opposite vertices.
2501             
2502             Parameters:
2503                 x1,y1,z1 double values, defining first point.
2504                 x2,y2,z2 double values, defining second point.
2505                 theName Object name; when specified, this parameter is used
2506                         for result publication in the study. Otherwise, if automatic
2507                         publication is switched on, default value is used for result name.
2508                 
2509             Returns:
2510                 New GEOM.GEOM_Object, containing the created box.
2511             """
2512             # Example: see GEOM_TestAll.py
2513             pnt1 = self.MakeVertex(x1,y1,z1)
2514             pnt2 = self.MakeVertex(x2,y2,z2)
2515             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2516             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2517
2518         ## Create a box with specified dimensions along the coordinate axes
2519         #  and with edges, parallel to the coordinate axes.
2520         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2521         #  @param theDX Length of Box edges, parallel to OX axis.
2522         #  @param theDY Length of Box edges, parallel to OY axis.
2523         #  @param theDZ Length of Box edges, parallel to OZ axis.
2524         #  @param theName Object name; when specified, this parameter is used
2525         #         for result publication in the study. Otherwise, if automatic
2526         #         publication is switched on, default value is used for result name.
2527         #
2528         #  @return New GEOM.GEOM_Object, containing the created box.
2529         #
2530         #  @ref tui_creation_box "Example"
2531         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2532             """
2533             Create a box with specified dimensions along the coordinate axes
2534             and with edges, parallel to the coordinate axes.
2535             Center of the box will be at point (DX/2, DY/2, DZ/2).
2536
2537             Parameters:
2538                 theDX Length of Box edges, parallel to OX axis.
2539                 theDY Length of Box edges, parallel to OY axis.
2540                 theDZ Length of Box edges, parallel to OZ axis.
2541                 theName Object name; when specified, this parameter is used
2542                         for result publication in the study. Otherwise, if automatic
2543                         publication is switched on, default value is used for result name.
2544
2545             Returns:   
2546                 New GEOM.GEOM_Object, containing the created box.
2547             """
2548             # Example: see GEOM_TestAll.py
2549             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2550             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2551             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2552             anObj.SetParameters(Parameters)
2553             self._autoPublish(anObj, theName, "box")
2554             return anObj
2555
2556         ## Create a box with two specified opposite vertices,
2557         #  and with edges, parallel to the coordinate axes
2558         #  @param thePnt1 First of two opposite vertices.
2559         #  @param thePnt2 Second of two opposite vertices.
2560         #  @param theName Object name; when specified, this parameter is used
2561         #         for result publication in the study. Otherwise, if automatic
2562         #         publication is switched on, default value is used for result name.
2563         #
2564         #  @return New GEOM.GEOM_Object, containing the created box.
2565         #
2566         #  @ref tui_creation_box "Example"
2567         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2568             """
2569             Create a box with two specified opposite vertices,
2570             and with edges, parallel to the coordinate axes
2571
2572             Parameters:
2573                 thePnt1 First of two opposite vertices.
2574                 thePnt2 Second of two opposite vertices.
2575                 theName Object name; when specified, this parameter is used
2576                         for result publication in the study. Otherwise, if automatic
2577                         publication is switched on, default value is used for result name.
2578
2579             Returns:
2580                 New GEOM.GEOM_Object, containing the created box.
2581             """
2582             # Example: see GEOM_TestAll.py
2583             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2584             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2585             self._autoPublish(anObj, theName, "box")
2586             return anObj
2587
2588         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2589         #  @param theH height of Face.
2590         #  @param theW width of Face.
2591         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2592         #  @param theName Object name; when specified, this parameter is used
2593         #         for result publication in the study. Otherwise, if automatic
2594         #         publication is switched on, default value is used for result name.
2595         #
2596         #  @return New GEOM.GEOM_Object, containing the created face.
2597         #
2598         #  @ref tui_creation_face "Example"
2599         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2600             """
2601             Create a face with specified dimensions with edges parallel to coordinate axes.
2602
2603             Parameters:
2604                 theH height of Face.
2605                 theW width of Face.
2606                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2607                 theName Object name; when specified, this parameter is used
2608                         for result publication in the study. Otherwise, if automatic
2609                         publication is switched on, default value is used for result name.
2610
2611             Returns:
2612                 New GEOM.GEOM_Object, containing the created face.
2613             """
2614             # Example: see GEOM_TestAll.py
2615             theH,theW,Parameters = ParseParameters(theH, theW)
2616             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2617             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2618             anObj.SetParameters(Parameters)
2619             self._autoPublish(anObj, theName, "rectangle")
2620             return anObj
2621
2622         ## Create a face from another plane and two sizes,
2623         #  vertical size and horisontal size.
2624         #  @param theObj   Normale vector to the creating face or
2625         #  the face object.
2626         #  @param theH     Height (vertical size).
2627         #  @param theW     Width (horisontal size).
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 face.
2633         #
2634         #  @ref tui_creation_face "Example"
2635         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2636             """
2637             Create a face from another plane and two sizes,
2638             vertical size and horisontal size.
2639
2640             Parameters:
2641                 theObj   Normale vector to the creating face or
2642                          the face object.
2643                 theH     Height (vertical size).
2644                 theW     Width (horisontal size).
2645                 theName Object name; when specified, this parameter is used
2646                         for result publication in the study. Otherwise, if automatic
2647                         publication is switched on, default value is used for result name.
2648
2649             Returns:
2650                 New GEOM_Object, containing the created face.
2651             """
2652             # Example: see GEOM_TestAll.py
2653             theH,theW,Parameters = ParseParameters(theH, theW)
2654             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2655             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2656             anObj.SetParameters(Parameters)
2657             self._autoPublish(anObj, theName, "rectangle")
2658             return anObj
2659
2660         ## Create a disk with given center, normal vector and radius.
2661         #  @param thePnt Disk center.
2662         #  @param theVec Vector, normal to the plane of the disk.
2663         #  @param theR Disk radius.
2664         #  @param theName Object name; when specified, this parameter is used
2665         #         for result publication in the study. Otherwise, if automatic
2666         #         publication is switched on, default value is used for result name.
2667         #
2668         #  @return New GEOM.GEOM_Object, containing the created disk.
2669         #
2670         #  @ref tui_creation_disk "Example"
2671         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2672             """
2673             Create a disk with given center, normal vector and radius.
2674
2675             Parameters:
2676                 thePnt Disk center.
2677                 theVec Vector, normal to the plane of the disk.
2678                 theR Disk radius.
2679                 theName Object name; when specified, this parameter is used
2680                         for result publication in the study. Otherwise, if automatic
2681                         publication is switched on, default value is used for result name.
2682
2683             Returns:    
2684                 New GEOM.GEOM_Object, containing the created disk.
2685             """
2686             # Example: see GEOM_TestAll.py
2687             theR,Parameters = ParseParameters(theR)
2688             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2689             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2690             anObj.SetParameters(Parameters)
2691             self._autoPublish(anObj, theName, "disk")
2692             return anObj
2693
2694         ## Create a disk, passing through three given points
2695         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2696         #  @param theName Object name; when specified, this parameter is used
2697         #         for result publication in the study. Otherwise, if automatic
2698         #         publication is switched on, default value is used for result name.
2699         #
2700         #  @return New GEOM.GEOM_Object, containing the created disk.
2701         #
2702         #  @ref tui_creation_disk "Example"
2703         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2704             """
2705             Create a disk, passing through three given points
2706
2707             Parameters:
2708                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2709                 theName Object name; when specified, this parameter is used
2710                         for result publication in the study. Otherwise, if automatic
2711                         publication is switched on, default value is used for result name.
2712
2713             Returns:    
2714                 New GEOM.GEOM_Object, containing the created disk.
2715             """
2716             # Example: see GEOM_TestAll.py
2717             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2718             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2719             self._autoPublish(anObj, theName, "disk")
2720             return anObj
2721
2722         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2723         #  @param theR Radius of Face.
2724         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2725         #  @param theName Object name; when specified, this parameter is used
2726         #         for result publication in the study. Otherwise, if automatic
2727         #         publication is switched on, default value is used for result name.
2728         #
2729         #  @return New GEOM.GEOM_Object, containing the created disk.
2730         #
2731         #  @ref tui_creation_face "Example"
2732         def MakeDiskR(self, theR, theOrientation, theName=None):
2733             """
2734             Create a disk with specified dimensions along OX-OY coordinate axes.
2735
2736             Parameters:
2737                 theR Radius of Face.
2738                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2739                 theName Object name; when specified, this parameter is used
2740                         for result publication in the study. Otherwise, if automatic
2741                         publication is switched on, default value is used for result name.
2742
2743             Returns: 
2744                 New GEOM.GEOM_Object, containing the created disk.
2745
2746             Example of usage:
2747                 Disk3 = geompy.MakeDiskR(100., 1)
2748             """
2749             # Example: see GEOM_TestAll.py
2750             theR,Parameters = ParseParameters(theR)
2751             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2752             RaiseIfFailed("MakeDiskR", self.PrimOp)
2753             anObj.SetParameters(Parameters)
2754             self._autoPublish(anObj, theName, "disk")
2755             return anObj
2756
2757         ## Create a cylinder with given base point, axis, radius and height.
2758         #  @param thePnt Central point of cylinder base.
2759         #  @param theAxis Cylinder axis.
2760         #  @param theR Cylinder radius.
2761         #  @param theH Cylinder height.
2762         #  @param theName Object name; when specified, this parameter is used
2763         #         for result publication in the study. Otherwise, if automatic
2764         #         publication is switched on, default value is used for result name.
2765         #
2766         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2767         #
2768         #  @ref tui_creation_cylinder "Example"
2769         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2770             """
2771             Create a cylinder with given base point, axis, radius and height.
2772
2773             Parameters:
2774                 thePnt Central point of cylinder base.
2775                 theAxis Cylinder axis.
2776                 theR Cylinder radius.
2777                 theH Cylinder height.
2778                 theName Object name; when specified, this parameter is used
2779                         for result publication in the study. Otherwise, if automatic
2780                         publication is switched on, default value is used for result name.
2781
2782             Returns: 
2783                 New GEOM.GEOM_Object, containing the created cylinder.
2784             """
2785             # Example: see GEOM_TestAll.py
2786             theR,theH,Parameters = ParseParameters(theR, theH)
2787             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
2788             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
2789             anObj.SetParameters(Parameters)
2790             self._autoPublish(anObj, theName, "cylinder")
2791             return anObj
2792
2793         ## Create a cylinder with given radius and height at
2794         #  the origin of coordinate system. Axis of the cylinder
2795         #  will be collinear to the OZ axis of the coordinate system.
2796         #  @param theR Cylinder radius.
2797         #  @param theH Cylinder height.
2798         #  @param theName Object name; when specified, this parameter is used
2799         #         for result publication in the study. Otherwise, if automatic
2800         #         publication is switched on, default value is used for result name.
2801         #
2802         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2803         #
2804         #  @ref tui_creation_cylinder "Example"
2805         def MakeCylinderRH(self, theR, theH, theName=None):
2806             """
2807             Create a cylinder with given radius and height at
2808             the origin of coordinate system. Axis of the cylinder
2809             will be collinear to the OZ axis of the coordinate system.
2810
2811             Parameters:
2812                 theR Cylinder radius.
2813                 theH Cylinder height.
2814                 theName Object name; when specified, this parameter is used
2815                         for result publication in the study. Otherwise, if automatic
2816                         publication is switched on, default value is used for result name.
2817
2818             Returns:    
2819                 New GEOM.GEOM_Object, containing the created cylinder.
2820             """
2821             # Example: see GEOM_TestAll.py
2822             theR,theH,Parameters = ParseParameters(theR, theH)
2823             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
2824             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
2825             anObj.SetParameters(Parameters)
2826             self._autoPublish(anObj, theName, "cylinder")
2827             return anObj
2828
2829         ## Create a sphere with given center and radius.
2830         #  @param thePnt Sphere center.
2831         #  @param theR Sphere radius.
2832         #  @param theName Object name; when specified, this parameter is used
2833         #         for result publication in the study. Otherwise, if automatic
2834         #         publication is switched on, default value is used for result name.
2835         #
2836         #  @return New GEOM.GEOM_Object, containing the created sphere.
2837         #
2838         #  @ref tui_creation_sphere "Example"
2839         def MakeSpherePntR(self, thePnt, theR, theName=None):
2840             """
2841             Create a sphere with given center and radius.
2842
2843             Parameters:
2844                 thePnt Sphere center.
2845                 theR Sphere radius.
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 sphere.            
2852             """
2853             # Example: see GEOM_TestAll.py
2854             theR,Parameters = ParseParameters(theR)
2855             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
2856             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
2857             anObj.SetParameters(Parameters)
2858             self._autoPublish(anObj, theName, "sphere")
2859             return anObj
2860
2861         ## Create a sphere with given center and radius.
2862         #  @param x,y,z Coordinates of sphere center.
2863         #  @param theR Sphere radius.
2864         #  @param theName Object name; when specified, this parameter is used
2865         #         for result publication in the study. Otherwise, if automatic
2866         #         publication is switched on, default value is used for result name.
2867         #
2868         #  @return New GEOM.GEOM_Object, containing the created sphere.
2869         #
2870         #  @ref tui_creation_sphere "Example"
2871         def MakeSphere(self, x, y, z, theR, theName=None):
2872             """
2873             Create a sphere with given center and radius.
2874
2875             Parameters: 
2876                 x,y,z Coordinates of sphere center.
2877                 theR Sphere radius.
2878                 theName Object name; when specified, this parameter is used
2879                         for result publication in the study. Otherwise, if automatic
2880                         publication is switched on, default value is used for result name.
2881
2882             Returns:
2883                 New GEOM.GEOM_Object, containing the created sphere.
2884             """
2885             # Example: see GEOM_TestAll.py
2886             point = self.MakeVertex(x, y, z)
2887             # note: auto-publishing is done in self.MakeSpherePntR()
2888             anObj = self.MakeSpherePntR(point, theR, theName)
2889             return anObj
2890
2891         ## Create a sphere with given radius at the origin of coordinate system.
2892         #  @param theR Sphere radius.
2893         #  @param theName Object name; when specified, this parameter is used
2894         #         for result publication in the study. Otherwise, if automatic
2895         #         publication is switched on, default value is used for result name.
2896         #
2897         #  @return New GEOM.GEOM_Object, containing the created sphere.
2898         #
2899         #  @ref tui_creation_sphere "Example"
2900         def MakeSphereR(self, theR, theName=None):
2901             """
2902             Create a sphere with given radius at the origin of coordinate system.
2903
2904             Parameters: 
2905                 theR Sphere radius.
2906                 theName Object name; when specified, this parameter is used
2907                         for result publication in the study. Otherwise, if automatic
2908                         publication is switched on, default value is used for result name.
2909
2910             Returns:
2911                 New GEOM.GEOM_Object, containing the created sphere.            
2912             """
2913             # Example: see GEOM_TestAll.py
2914             theR,Parameters = ParseParameters(theR)
2915             anObj = self.PrimOp.MakeSphereR(theR)
2916             RaiseIfFailed("MakeSphereR", self.PrimOp)
2917             anObj.SetParameters(Parameters)
2918             self._autoPublish(anObj, theName, "sphere")
2919             return anObj
2920
2921         ## Create a cone with given base point, axis, height and radiuses.
2922         #  @param thePnt Central point of the first cone base.
2923         #  @param theAxis Cone axis.
2924         #  @param theR1 Radius of the first cone base.
2925         #  @param theR2 Radius of the second cone base.
2926         #    \note If both radiuses are non-zero, the cone will be truncated.
2927         #    \note If the radiuses are equal, a cylinder will be created instead.
2928         #  @param theH Cone height.
2929         #  @param theName Object name; when specified, this parameter is used
2930         #         for result publication in the study. Otherwise, if automatic
2931         #         publication is switched on, default value is used for result name.
2932         #
2933         #  @return New GEOM.GEOM_Object, containing the created cone.
2934         #
2935         #  @ref tui_creation_cone "Example"
2936         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
2937             """
2938             Create a cone with given base point, axis, height and radiuses.
2939
2940             Parameters: 
2941                 thePnt Central point of the first cone base.
2942                 theAxis Cone axis.
2943                 theR1 Radius of the first cone base.
2944                 theR2 Radius of the second cone base.
2945                 theH Cone height.
2946                 theName Object name; when specified, this parameter is used
2947                         for result publication in the study. Otherwise, if automatic
2948                         publication is switched on, default value is used for result name.
2949
2950             Note:
2951                 If both radiuses are non-zero, the cone will be truncated.
2952                 If the radiuses are equal, a cylinder will be created instead.
2953
2954             Returns:
2955                 New GEOM.GEOM_Object, containing the created cone.
2956             """
2957             # Example: see GEOM_TestAll.py
2958             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
2959             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
2960             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
2961             anObj.SetParameters(Parameters)
2962             self._autoPublish(anObj, theName, "cone")
2963             return anObj
2964
2965         ## Create a cone with given height and radiuses at
2966         #  the origin of coordinate system. Axis of the cone will
2967         #  be collinear to the OZ axis of the coordinate system.
2968         #  @param theR1 Radius of the first cone base.
2969         #  @param theR2 Radius of the second cone base.
2970         #    \note If both radiuses are non-zero, the cone will be truncated.
2971         #    \note If the radiuses are equal, a cylinder will be created instead.
2972         #  @param theH Cone height.
2973         #  @param theName Object name; when specified, this parameter is used
2974         #         for result publication in the study. Otherwise, if automatic
2975         #         publication is switched on, default value is used for result name.
2976         #
2977         #  @return New GEOM.GEOM_Object, containing the created cone.
2978         #
2979         #  @ref tui_creation_cone "Example"
2980         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
2981             """
2982             Create a cone with given height and radiuses at
2983             the origin of coordinate system. Axis of the cone will
2984             be collinear to the OZ axis of the coordinate system.
2985
2986             Parameters: 
2987                 theR1 Radius of the first cone base.
2988                 theR2 Radius of the second cone base.
2989                 theH Cone height.
2990                 theName Object name; when specified, this parameter is used
2991                         for result publication in the study. Otherwise, if automatic
2992                         publication is switched on, default value is used for result name.
2993
2994             Note:
2995                 If both radiuses are non-zero, the cone will be truncated.
2996                 If the radiuses are equal, a cylinder will be created instead.
2997
2998             Returns:
2999                 New GEOM.GEOM_Object, containing the created cone.
3000             """
3001             # Example: see GEOM_TestAll.py
3002             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3003             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3004             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3005             anObj.SetParameters(Parameters)
3006             self._autoPublish(anObj, theName, "cone")
3007             return anObj
3008
3009         ## Create a torus with given center, normal vector and radiuses.
3010         #  @param thePnt Torus central point.
3011         #  @param theVec Torus axis of symmetry.
3012         #  @param theRMajor Torus major radius.
3013         #  @param theRMinor Torus minor radius.
3014         #  @param theName Object name; when specified, this parameter is used
3015         #         for result publication in the study. Otherwise, if automatic
3016         #         publication is switched on, default value is used for result name.
3017         #
3018         #  @return New GEOM.GEOM_Object, containing the created torus.
3019         #
3020         #  @ref tui_creation_torus "Example"
3021         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3022             """
3023             Create a torus with given center, normal vector and radiuses.
3024
3025             Parameters: 
3026                 thePnt Torus central point.
3027                 theVec Torus axis of symmetry.
3028                 theRMajor Torus major radius.
3029                 theRMinor Torus minor radius.
3030                 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            Returns:
3035                 New GEOM.GEOM_Object, containing the created torus.
3036             """
3037             # Example: see GEOM_TestAll.py
3038             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3039             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3040             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3041             anObj.SetParameters(Parameters)
3042             self._autoPublish(anObj, theName, "torus")
3043             return anObj
3044
3045         ## Create a torus with given radiuses at the origin of coordinate system.
3046         #  @param theRMajor Torus major radius.
3047         #  @param theRMinor Torus minor radius.
3048         #  @param theName Object name; when specified, this parameter is used
3049         #         for result publication in the study. Otherwise, if automatic
3050         #         publication is switched on, default value is used for result name.
3051         #
3052         #  @return New GEOM.GEOM_Object, containing the created torus.
3053         #
3054         #  @ref tui_creation_torus "Example"
3055         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3056             """
3057            Create a torus with given radiuses at the origin of coordinate system.
3058
3059            Parameters: 
3060                 theRMajor Torus major radius.
3061                 theRMinor Torus minor radius.
3062                 theName Object name; when specified, this parameter is used
3063                         for result publication in the study. Otherwise, if automatic
3064                         publication is switched on, default value is used for result name.
3065
3066            Returns:
3067                 New GEOM.GEOM_Object, containing the created torus.            
3068             """
3069             # Example: see GEOM_TestAll.py
3070             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3071             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3072             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3073             anObj.SetParameters(Parameters)
3074             self._autoPublish(anObj, theName, "torus")
3075             return anObj
3076
3077         # end of l3_3d_primitives
3078         ## @}
3079
3080         ## @addtogroup l3_complex
3081         ## @{
3082
3083         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3084         #  @param theBase Base shape to be extruded.
3085         #  @param thePoint1 First end of extrusion vector.
3086         #  @param thePoint2 Second end of extrusion vector.
3087         #  @param theScaleFactor Use it to make prism with scaled second base.
3088         #                        Nagative value means not scaled second base.
3089         #  @param theName Object name; when specified, this parameter is used
3090         #         for result publication in the study. Otherwise, if automatic
3091         #         publication is switched on, default value is used for result name.
3092         #
3093         #  @return New GEOM.GEOM_Object, containing the created prism.
3094         #
3095         #  @ref tui_creation_prism "Example"
3096         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3097             """
3098             Create a shape by extrusion of the base shape along a vector, defined by two points.
3099
3100             Parameters: 
3101                 theBase Base shape to be extruded.
3102                 thePoint1 First end of extrusion vector.
3103                 thePoint2 Second end of extrusion vector.
3104                 theScaleFactor Use it to make prism with scaled second base.
3105                                Nagative value means not scaled second base.
3106                 theName Object name; when specified, this parameter is used
3107                         for result publication in the study. Otherwise, if automatic
3108                         publication is switched on, default value is used for result name.
3109
3110             Returns:
3111                 New GEOM.GEOM_Object, containing the created prism.
3112             """
3113             # Example: see GEOM_TestAll.py
3114             anObj = None
3115             Parameters = ""
3116             if theScaleFactor > 0:
3117                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3118                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3119             else:
3120                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3121             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3122             anObj.SetParameters(Parameters)
3123             self._autoPublish(anObj, theName, "prism")
3124             return anObj
3125
3126         ## Create a shape by extrusion of the base shape along a
3127         #  vector, defined by two points, in 2 Ways (forward/backward).
3128         #  @param theBase Base shape to be extruded.
3129         #  @param thePoint1 First end of extrusion vector.
3130         #  @param thePoint2 Second end of extrusion vector.
3131         #  @param theName Object name; when specified, this parameter is used
3132         #         for result publication in the study. Otherwise, if automatic
3133         #         publication is switched on, default value is used for result name.
3134         #
3135         #  @return New GEOM.GEOM_Object, containing the created prism.
3136         #
3137         #  @ref tui_creation_prism "Example"
3138         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3139             """
3140             Create a shape by extrusion of the base shape along a
3141             vector, defined by two points, in 2 Ways (forward/backward).
3142
3143             Parameters: 
3144                 theBase Base shape to be extruded.
3145                 thePoint1 First end of extrusion vector.
3146                 thePoint2 Second end of extrusion vector.
3147                 theName Object name; when specified, this parameter is used
3148                         for result publication in the study. Otherwise, if automatic
3149                         publication is switched on, default value is used for result name.
3150
3151             Returns:
3152                 New GEOM.GEOM_Object, containing the created prism.
3153             """
3154             # Example: see GEOM_TestAll.py
3155             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3156             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3157             self._autoPublish(anObj, theName, "prism")
3158             return anObj
3159
3160         ## Create a shape by extrusion of the base shape along the vector,
3161         #  i.e. all the space, transfixed by the base shape during its translation
3162         #  along the vector on the given distance.
3163         #  @param theBase Base shape to be extruded.
3164         #  @param theVec Direction of extrusion.
3165         #  @param theH Prism dimension along theVec.
3166         #  @param theScaleFactor Use it to make prism with scaled second base.
3167         #                        Negative value means not scaled second base.
3168         #  @param theName Object name; when specified, this parameter is used
3169         #         for result publication in the study. Otherwise, if automatic
3170         #         publication is switched on, default value is used for result name.
3171         #
3172         #  @return New GEOM.GEOM_Object, containing the created prism.
3173         #
3174         #  @ref tui_creation_prism "Example"
3175         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3176             """
3177             Create a shape by extrusion of the base shape along the vector,
3178             i.e. all the space, transfixed by the base shape during its translation
3179             along the vector on the given distance.
3180
3181             Parameters: 
3182                 theBase Base shape to be extruded.
3183                 theVec Direction of extrusion.
3184                 theH Prism dimension along theVec.
3185                 theScaleFactor Use it to make prism with scaled second base.
3186                                Negative value means not scaled second base.
3187                 theName Object name; when specified, this parameter is used
3188                         for result publication in the study. Otherwise, if automatic
3189                         publication is switched on, default value is used for result name.
3190
3191             Returns:
3192                 New GEOM.GEOM_Object, containing the created prism.
3193             """
3194             # Example: see GEOM_TestAll.py
3195             anObj = None
3196             Parameters = ""
3197             if theScaleFactor > 0:
3198                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3199                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3200             else:
3201                 theH,Parameters = ParseParameters(theH)
3202                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3203             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3204             anObj.SetParameters(Parameters)
3205             self._autoPublish(anObj, theName, "prism")
3206             return anObj
3207
3208         ## Create a shape by extrusion of the base shape along the vector,
3209         #  i.e. all the space, transfixed by the base shape during its translation
3210         #  along the vector on the given distance in 2 Ways (forward/backward).
3211         #  @param theBase Base shape to be extruded.
3212         #  @param theVec Direction of extrusion.
3213         #  @param theH Prism dimension along theVec in forward direction.
3214         #  @param theName Object name; when specified, this parameter is used
3215         #         for result publication in the study. Otherwise, if automatic
3216         #         publication is switched on, default value is used for result name.
3217         #
3218         #  @return New GEOM.GEOM_Object, containing the created prism.
3219         #
3220         #  @ref tui_creation_prism "Example"
3221         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3222             """
3223             Create a shape by extrusion of the base shape along the vector,
3224             i.e. all the space, transfixed by the base shape during its translation
3225             along the vector on the given distance in 2 Ways (forward/backward).
3226
3227             Parameters:
3228                 theBase Base shape to be extruded.
3229                 theVec Direction of extrusion.
3230                 theH Prism dimension along theVec in forward direction.
3231                 theName Object name; when specified, this parameter is used
3232                         for result publication in the study. Otherwise, if automatic
3233                         publication is switched on, default value is used for result name.
3234
3235             Returns:
3236                 New GEOM.GEOM_Object, containing the created prism.
3237             """
3238             # Example: see GEOM_TestAll.py
3239             theH,Parameters = ParseParameters(theH)
3240             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3241             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3242             anObj.SetParameters(Parameters)
3243             self._autoPublish(anObj, theName, "prism")
3244             return anObj
3245
3246         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3247         #  @param theBase Base shape to be extruded.
3248         #  @param theDX, theDY, theDZ Directions of extrusion.
3249         #  @param theScaleFactor Use it to make prism with scaled second base.
3250         #                        Nagative value means not scaled second base.
3251         #  @param theName Object name; when specified, this parameter is used
3252         #         for result publication in the study. Otherwise, if automatic
3253         #         publication is switched on, default value is used for result name.
3254         #
3255         #  @return New GEOM.GEOM_Object, containing the created prism.
3256         #
3257         #  @ref tui_creation_prism "Example"
3258         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3259             """
3260             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3261
3262             Parameters:
3263                 theBase Base shape to be extruded.
3264                 theDX, theDY, theDZ Directions of extrusion.
3265                 theScaleFactor Use it to make prism with scaled second base.
3266                                Nagative value means not scaled second base.
3267                 theName Object name; when specified, this parameter is used
3268                         for result publication in the study. Otherwise, if automatic
3269                         publication is switched on, default value is used for result name.
3270
3271             Returns: 
3272                 New GEOM.GEOM_Object, containing the created prism.
3273             """
3274             # Example: see GEOM_TestAll.py
3275             anObj = None
3276             Parameters = ""
3277             if theScaleFactor > 0:
3278                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3279                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3280             else:
3281                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3282                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3283             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3284             anObj.SetParameters(Parameters)
3285             self._autoPublish(anObj, theName, "prism")
3286             return anObj
3287
3288         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3289         #  i.e. all the space, transfixed by the base shape during its translation
3290         #  along the vector on the given distance in 2 Ways (forward/backward).
3291         #  @param theBase Base shape to be extruded.
3292         #  @param theDX, theDY, theDZ Directions of extrusion.
3293         #  @param theName Object name; when specified, this parameter is used
3294         #         for result publication in the study. Otherwise, if automatic
3295         #         publication is switched on, default value is used for result name.
3296         #
3297         #  @return New GEOM.GEOM_Object, containing the created prism.
3298         #
3299         #  @ref tui_creation_prism "Example"
3300         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3301             """
3302             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3303             i.e. all the space, transfixed by the base shape during its translation
3304             along the vector on the given distance in 2 Ways (forward/backward).
3305
3306             Parameters:
3307                 theBase Base shape to be extruded.
3308                 theDX, theDY, theDZ Directions of extrusion.
3309                 theName Object name; when specified, this parameter is used
3310                         for result publication in the study. Otherwise, if automatic
3311                         publication is switched on, default value is used for result name.
3312
3313             Returns:
3314                 New GEOM.GEOM_Object, containing the created prism.
3315             """
3316             # Example: see GEOM_TestAll.py
3317             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3318             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3319             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3320             anObj.SetParameters(Parameters)
3321             self._autoPublish(anObj, theName, "prism")
3322             return anObj
3323
3324         ## Create a shape by revolution of the base shape around the axis
3325         #  on the given angle, i.e. all the space, transfixed by the base
3326         #  shape during its rotation around the axis on the given angle.
3327         #  @param theBase Base shape to be rotated.
3328         #  @param theAxis Rotation axis.
3329         #  @param theAngle Rotation angle in radians.
3330         #  @param theName Object name; when specified, this parameter is used
3331         #         for result publication in the study. Otherwise, if automatic
3332         #         publication is switched on, default value is used for result name.
3333         #
3334         #  @return New GEOM.GEOM_Object, containing the created revolution.
3335         #
3336         #  @ref tui_creation_revolution "Example"
3337         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3338             """
3339             Create a shape by revolution of the base shape around the axis
3340             on the given angle, i.e. all the space, transfixed by the base
3341             shape during its rotation around the axis on the given angle.
3342
3343             Parameters:
3344                 theBase Base shape to be rotated.
3345                 theAxis Rotation axis.
3346                 theAngle Rotation angle in radians.
3347                 theName Object name; when specified, this parameter is used
3348                         for result publication in the study. Otherwise, if automatic
3349                         publication is switched on, default value is used for result name.
3350
3351             Returns: 
3352                 New GEOM.GEOM_Object, containing the created revolution.
3353             """
3354             # Example: see GEOM_TestAll.py
3355             theAngle,Parameters = ParseParameters(theAngle)
3356             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3357             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3358             anObj.SetParameters(Parameters)
3359             self._autoPublish(anObj, theName, "revolution")
3360             return anObj
3361
3362         ## Create a shape by revolution of the base shape around the axis
3363         #  on the given angle, i.e. all the space, transfixed by the base
3364         #  shape during its rotation around the axis on the given angle in
3365         #  both directions (forward/backward)
3366         #  @param theBase Base shape to be rotated.
3367         #  @param theAxis Rotation axis.
3368         #  @param theAngle Rotation angle in radians.
3369         #  @param theName Object name; when specified, this parameter is used
3370         #         for result publication in the study. Otherwise, if automatic
3371         #         publication is switched on, default value is used for result name.
3372         #
3373         #  @return New GEOM.GEOM_Object, containing the created revolution.
3374         #
3375         #  @ref tui_creation_revolution "Example"
3376         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3377             """
3378             Create a shape by revolution of the base shape around the axis
3379             on the given angle, i.e. all the space, transfixed by the base
3380             shape during its rotation around the axis on the given angle in
3381             both directions (forward/backward).
3382
3383             Parameters:
3384                 theBase Base shape to be rotated.
3385                 theAxis Rotation axis.
3386                 theAngle Rotation angle in radians.
3387                 theName Object name; when specified, this parameter is used
3388                         for result publication in the study. Otherwise, if automatic
3389                         publication is switched on, default value is used for result name.
3390
3391             Returns: 
3392                 New GEOM.GEOM_Object, containing the created revolution.
3393             """
3394             theAngle,Parameters = ParseParameters(theAngle)
3395             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3396             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3397             anObj.SetParameters(Parameters)
3398             self._autoPublish(anObj, theName, "revolution")
3399             return anObj
3400
3401         ## Create a filling from the given compound of contours.
3402         #  @param theShape the compound of contours
3403         #  @param theMinDeg a minimal degree of BSpline surface to create
3404         #  @param theMaxDeg a maximal degree of BSpline surface to create
3405         #  @param theTol2D a 2d tolerance to be reached
3406         #  @param theTol3D a 3d tolerance to be reached
3407         #  @param theNbIter a number of iteration of approximation algorithm
3408         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3409         #  @param isApprox if True, BSpline curves are generated in the process
3410         #                  of surface construction. By default it is False, that means
3411         #                  the surface is created using given curves. The usage of
3412         #                  Approximation makes the algorithm work slower, but allows
3413         #                  building the surface for rather complex cases.
3414         #  @param theName Object name; when specified, this parameter is used
3415         #         for result publication in the study. Otherwise, if automatic
3416         #         publication is switched on, default value is used for result name.
3417         #
3418         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3419         #
3420         #  @ref tui_creation_filling "Example"
3421         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3422                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3423             """
3424             Create a filling from the given compound of contours.
3425
3426             Parameters:
3427                 theShape the compound of contours
3428                 theMinDeg a minimal degree of BSpline surface to create
3429                 theMaxDeg a maximal degree of BSpline surface to create
3430                 theTol2D a 2d tolerance to be reached
3431                 theTol3D a 3d tolerance to be reached
3432                 theNbIter a number of iteration of approximation algorithm
3433                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3434                 isApprox if True, BSpline curves are generated in the process
3435                          of surface construction. By default it is False, that means
3436                          the surface is created using given curves. The usage of
3437                          Approximation makes the algorithm work slower, but allows
3438                          building the surface for rather complex cases
3439                 theName Object name; when specified, this parameter is used
3440                         for result publication in the study. Otherwise, if automatic
3441                         publication is switched on, default value is used for result name.
3442
3443             Returns: 
3444                 New GEOM.GEOM_Object, containing the created filling surface.
3445
3446             Example of usage:
3447                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3448             """
3449             # Example: see GEOM_TestAll.py
3450             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3451             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3452                                             theTol2D, theTol3D, theNbIter,
3453                                             theMethod, isApprox)
3454             RaiseIfFailed("MakeFilling", self.PrimOp)
3455             anObj.SetParameters(Parameters)
3456             self._autoPublish(anObj, theName, "filling")
3457             return anObj
3458
3459
3460         ## Create a filling from the given compound of contours.
3461         #  This method corresponds to MakeFilling with isApprox=True
3462         #  @param theShape the compound of contours
3463         #  @param theMinDeg a minimal degree of BSpline surface to create
3464         #  @param theMaxDeg a maximal degree of BSpline surface to create
3465         #  @param theTol3D a 3d tolerance to be reached
3466         #  @param theName Object name; when specified, this parameter is used
3467         #         for result publication in the study. Otherwise, if automatic
3468         #         publication is switched on, default value is used for result name.
3469         #
3470         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3471         #
3472         #  @ref tui_creation_filling "Example"
3473         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3474             """
3475             Create a filling from the given compound of contours.
3476             This method corresponds to MakeFilling with isApprox=True
3477
3478             Parameters:
3479                 theShape the compound of contours
3480                 theMinDeg a minimal degree of BSpline surface to create
3481                 theMaxDeg a maximal degree of BSpline surface to create
3482                 theTol3D a 3d tolerance to be reached
3483                 theName Object name; when specified, this parameter is used
3484                         for result publication in the study. Otherwise, if automatic
3485                         publication is switched on, default value is used for result name.
3486
3487             Returns: 
3488                 New GEOM.GEOM_Object, containing the created filling surface.
3489
3490             Example of usage:
3491                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3492             """
3493             # Example: see GEOM_TestAll.py
3494             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3495             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3496                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3497             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3498             anObj.SetParameters(Parameters)
3499             self._autoPublish(anObj, theName, "filling")
3500             return anObj
3501
3502         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3503         #  @param theSeqSections - set of specified sections.
3504         #  @param theModeSolid - mode defining building solid or shell
3505         #  @param thePreci - precision 3D used for smoothing
3506         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3507         #  @param theName Object name; when specified, this parameter is used
3508         #         for result publication in the study. Otherwise, if automatic
3509         #         publication is switched on, default value is used for result name.
3510         #
3511         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3512         #
3513         #  @ref swig_todo "Example"
3514         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3515             """
3516             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3517
3518             Parameters:
3519                 theSeqSections - set of specified sections.
3520                 theModeSolid - mode defining building solid or shell
3521                 thePreci - precision 3D used for smoothing
3522                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3523                 theName Object name; when specified, this parameter is used
3524                         for result publication in the study. Otherwise, if automatic
3525                         publication is switched on, default value is used for result name.
3526
3527             Returns:
3528                 New GEOM.GEOM_Object, containing the created shell or solid.
3529             """
3530             # Example: see GEOM_TestAll.py
3531             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3532             RaiseIfFailed("MakeThruSections", self.PrimOp)
3533             self._autoPublish(anObj, theName, "filling")
3534             return anObj
3535
3536         ## Create a shape by extrusion of the base shape along
3537         #  the path shape. The path shape can be a wire or an edge.
3538         #  @param theBase Base shape to be extruded.
3539         #  @param thePath Path shape to extrude the base shape along it.
3540         #  @param theName Object name; when specified, this parameter is used
3541         #         for result publication in the study. Otherwise, if automatic
3542         #         publication is switched on, default value is used for result name.
3543         #
3544         #  @return New GEOM.GEOM_Object, containing the created pipe.
3545         #
3546         #  @ref tui_creation_pipe "Example"
3547         def MakePipe(self, theBase, thePath, theName=None):
3548             """
3549             Create a shape by extrusion of the base shape along
3550             the path shape. The path shape can be a wire or an edge.
3551
3552             Parameters:
3553                 theBase Base shape to be extruded.
3554                 thePath Path shape to extrude the base shape along it.
3555                 theName Object name; when specified, this parameter is used
3556                         for result publication in the study. Otherwise, if automatic
3557                         publication is switched on, default value is used for result name.
3558
3559             Returns:
3560                 New GEOM.GEOM_Object, containing the created pipe.
3561             """
3562             # Example: see GEOM_TestAll.py
3563             anObj = self.PrimOp.MakePipe(theBase, thePath)
3564             RaiseIfFailed("MakePipe", self.PrimOp)
3565             self._autoPublish(anObj, theName, "pipe")
3566             return anObj
3567
3568         ## Create a shape by extrusion of the profile shape along
3569         #  the path shape. The path shape can be a wire or an edge.
3570         #  the several profiles can be specified in the several locations of path.
3571         #  @param theSeqBases - list of  Bases shape to be extruded.
3572         #  @param theLocations - list of locations on the path corresponding
3573         #                        specified list of the Bases shapes. Number of locations
3574         #                        should be equal to number of bases or list of locations can be empty.
3575         #  @param thePath - Path shape to extrude the base shape along it.
3576         #  @param theWithContact - the mode defining that the section is translated to be in
3577         #                          contact with the spine.
3578         #  @param theWithCorrection - defining that the section is rotated to be
3579         #                             orthogonal to the spine tangent in the correspondent point
3580         #  @param theName Object name; when specified, this parameter is used
3581         #         for result publication in the study. Otherwise, if automatic
3582         #         publication is switched on, default value is used for result name.
3583         #
3584         #  @return New GEOM.GEOM_Object, containing the created pipe.
3585         #
3586         #  @ref tui_creation_pipe_with_diff_sec "Example"
3587         def MakePipeWithDifferentSections(self, theSeqBases,
3588                                           theLocations, thePath,
3589                                           theWithContact, theWithCorrection, theName=None):
3590             """
3591             Create a shape by extrusion of the profile shape along
3592             the path shape. The path shape can be a wire or an edge.
3593             the several profiles can be specified in the several locations of path.
3594
3595             Parameters:
3596                 theSeqBases - list of  Bases shape to be extruded.
3597                 theLocations - list of locations on the path corresponding
3598                                specified list of the Bases shapes. Number of locations
3599                                should be equal to number of bases or list of locations can be empty.
3600                 thePath - Path shape to extrude the base shape along it.
3601                 theWithContact - the mode defining that the section is translated to be in
3602                                  contact with the spine(0/1)
3603                 theWithCorrection - defining that the section is rotated to be
3604                                     orthogonal to the spine tangent in the correspondent point (0/1)
3605                 theName Object name; when specified, this parameter is used
3606                         for result publication in the study. Otherwise, if automatic
3607                         publication is switched on, default value is used for result name.
3608
3609             Returns:
3610                 New GEOM.GEOM_Object, containing the created pipe.
3611             """
3612             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3613                                                               theLocations, thePath,
3614                                                               theWithContact, theWithCorrection)
3615             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3616             self._autoPublish(anObj, theName, "pipe")
3617             return anObj
3618
3619         ## Create a shape by extrusion of the profile shape along
3620         #  the path shape. The path shape can be a wire or a edge.
3621         #  the several profiles can be specified in the several locations of path.
3622         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3623         #                       shell or face. If number of faces in neighbour sections
3624         #                       aren't coincided result solid between such sections will
3625         #                       be created using external boundaries of this shells.
3626         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3627         #                          This list is used for searching correspondences between
3628         #                          faces in the sections. Size of this list must be equal
3629         #                          to size of list of base shapes.
3630         #  @param theLocations - list of locations on the path corresponding
3631         #                        specified list of the Bases shapes. Number of locations
3632         #                        should be equal to number of bases. First and last
3633         #                        locations must be coincided with first and last vertexes
3634         #                        of path correspondingly.
3635         #  @param thePath - Path shape to extrude the base shape along it.
3636         #  @param theWithContact - the mode defining that the section is translated to be in
3637         #                          contact with the spine.
3638         #  @param theWithCorrection - defining that the section is rotated to be
3639         #                             orthogonal to the spine tangent in the correspondent point
3640         #  @param theName Object name; when specified, this parameter is used
3641         #         for result publication in the study. Otherwise, if automatic
3642         #         publication is switched on, default value is used for result name.
3643         #
3644         #  @return New GEOM.GEOM_Object, containing the created solids.
3645         #
3646         #  @ref tui_creation_pipe_with_shell_sec "Example"
3647         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3648                                       theLocations, thePath,
3649                                       theWithContact, theWithCorrection, theName=None):
3650             """
3651             Create a shape by extrusion of the profile shape along
3652             the path shape. The path shape can be a wire or a edge.
3653             the several profiles can be specified in the several locations of path.
3654
3655             Parameters:
3656                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3657                               shell or face. If number of faces in neighbour sections
3658                               aren't coincided result solid between such sections will
3659                               be created using external boundaries of this shells.
3660                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3661                                  This list is used for searching correspondences between
3662                                  faces in the sections. Size of this list must be equal
3663                                  to size of list of base shapes.
3664                 theLocations - list of locations on the path corresponding
3665                                specified list of the Bases shapes. Number of locations
3666                                should be equal to number of bases. First and last
3667                                locations must be coincided with first and last vertexes
3668                                of path correspondingly.
3669                 thePath - Path shape to extrude the base shape along it.
3670                 theWithContact - the mode defining that the section is translated to be in
3671                                  contact with the spine (0/1)
3672                 theWithCorrection - defining that the section is rotated to be
3673                                     orthogonal to the spine tangent in the correspondent point (0/1)
3674                 theName Object name; when specified, this parameter is used
3675                         for result publication in the study. Otherwise, if automatic
3676                         publication is switched on, default value is used for result name.
3677
3678             Returns:                           
3679                 New GEOM.GEOM_Object, containing the created solids.
3680             """
3681             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
3682                                                           theLocations, thePath,
3683                                                           theWithContact, theWithCorrection)
3684             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3685             self._autoPublish(anObj, theName, "pipe")
3686             return anObj
3687
3688         ## Create a shape by extrusion of the profile shape along
3689         #  the path shape. This function is used only for debug pipe
3690         #  functionality - it is a version of function MakePipeWithShellSections()
3691         #  which give a possibility to recieve information about
3692         #  creating pipe between each pair of sections step by step.
3693         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
3694                                              theLocations, thePath,
3695                                              theWithContact, theWithCorrection, theName=None):
3696             """
3697             Create a shape by extrusion of the profile shape along
3698             the path shape. This function is used only for debug pipe
3699             functionality - it is a version of previous function
3700             geompy.MakePipeWithShellSections() which give a possibility to
3701             recieve information about creating pipe between each pair of
3702             sections step by step.
3703             """
3704             res = []
3705             nbsect = len(theSeqBases)
3706             nbsubsect = len(theSeqSubBases)
3707             #print "nbsect = ",nbsect
3708             for i in range(1,nbsect):
3709                 #print "  i = ",i
3710                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
3711                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
3712                 tmpSeqSubBases = []
3713                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
3714                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
3715                                                               tmpLocations, thePath,
3716                                                               theWithContact, theWithCorrection)
3717                 if self.PrimOp.IsDone() == 0:
3718                     print "Problems with pipe creation between ",i," and ",i+1," sections"
3719                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3720                     break
3721                 else:
3722                     print "Pipe between ",i," and ",i+1," sections is OK"
3723                     res.append(anObj)
3724                     pass
3725                 pass
3726
3727             resc = self.MakeCompound(res)
3728             #resc = self.MakeSewing(res, 0.001)
3729             #print "resc: ",resc
3730             self._autoPublish(resc, theName, "pipe")
3731             return resc
3732
3733         ## Create solids between given sections
3734         #  @param theSeqBases - list of sections (shell or face).
3735         #  @param theLocations - list of corresponding vertexes
3736         #  @param theName Object name; when specified, this parameter is used
3737         #         for result publication in the study. Otherwise, if automatic
3738         #         publication is switched on, default value is used for result name.
3739         #
3740         #  @return New GEOM.GEOM_Object, containing the created solids.
3741         #
3742         #  @ref tui_creation_pipe_without_path "Example"
3743         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
3744             """
3745             Create solids between given sections
3746
3747             Parameters:
3748                 theSeqBases - list of sections (shell or face).
3749                 theLocations - list of corresponding vertexes
3750                 theName Object name; when specified, this parameter is used
3751                         for result publication in the study. Otherwise, if automatic
3752                         publication is switched on, default value is used for result name.
3753
3754             Returns:
3755                 New GEOM.GEOM_Object, containing the created solids.
3756             """
3757             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
3758             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
3759             self._autoPublish(anObj, theName, "pipe")
3760             return anObj
3761
3762         ## Create a shape by extrusion of the base shape along
3763         #  the path shape with constant bi-normal direction along the given vector.
3764         #  The path shape can be a wire or an edge.
3765         #  @param theBase Base shape to be extruded.
3766         #  @param thePath Path shape to extrude the base shape along it.
3767         #  @param theVec Vector defines a constant binormal direction to keep the
3768         #                same angle beetween the direction and the sections
3769         #                along the sweep surface.
3770         #  @param theName Object name; when specified, this parameter is used
3771         #         for result publication in the study. Otherwise, if automatic
3772         #         publication is switched on, default value is used for result name.
3773         #
3774         #  @return New GEOM.GEOM_Object, containing the created pipe.
3775         #
3776         #  @ref tui_creation_pipe "Example"
3777         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
3778             """
3779             Create a shape by extrusion of the base shape along
3780             the path shape with constant bi-normal direction along the given vector.
3781             The path shape can be a wire or an edge.
3782
3783             Parameters:
3784                 theBase Base shape to be extruded.
3785                 thePath Path shape to extrude the base shape along it.
3786                 theVec Vector defines a constant binormal direction to keep the
3787                        same angle beetween the direction and the sections
3788                        along the sweep surface.
3789                 theName Object name; when specified, this parameter is used
3790                         for result publication in the study. Otherwise, if automatic
3791                         publication is switched on, default value is used for result name.
3792
3793             Returns:              
3794                 New GEOM.GEOM_Object, containing the created pipe.
3795             """
3796             # Example: see GEOM_TestAll.py
3797             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
3798             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
3799             self._autoPublish(anObj, theName, "pipe")
3800             return anObj
3801               
3802         ## Makes a thick solid from a face or a shell
3803         #  @param theShape Face or Shell to be thicken
3804         #  @param theThickness Thickness of the resulting solid
3805         #  @param theName Object name; when specified, this parameter is used
3806         #         for result publication in the study. Otherwise, if automatic
3807         #         publication is switched on, default value is used for result name.
3808         #
3809         #  @return New GEOM.GEOM_Object, containing the created solid
3810         #
3811         def MakeThickSolid(self, theShape, theThickness, theName=None):
3812             """
3813             Make a thick solid from a face or a shell
3814
3815             Parameters:
3816                  theShape Face or Shell to be thicken
3817                  theThickness Thickness of the resulting solid
3818                  theName Object name; when specified, this parameter is used
3819                  for result publication in the study. Otherwise, if automatic
3820                  publication is switched on, default value is used for result name.
3821                  
3822             Returns:
3823                 New GEOM.GEOM_Object, containing the created solid
3824             """
3825             # Example: see GEOM_TestAll.py
3826             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
3827             RaiseIfFailed("MakeThickening", self.PrimOp)
3828             self._autoPublish(anObj, theName, "pipe")
3829             return anObj
3830             
3831
3832         ## Modifies a face or a shell to make it a thick solid
3833         #  @param theShape Face or Shell to be thicken
3834         #  @param theThickness Thickness of the resulting solid
3835         #
3836         #  @return The modified shape
3837         #
3838         def Thicken(self, theShape, theThickness):
3839             """
3840             Modifies a face or a shell to make it a thick solid
3841
3842             Parameters:
3843                 theBase Base shape to be extruded.
3844                 thePath Path shape to extrude the base shape along it.
3845                 theName Object name; when specified, this parameter is used
3846                         for result publication in the study. Otherwise, if automatic
3847                         publication is switched on, default value is used for result name.
3848
3849             Returns:
3850                 The modified shape
3851             """
3852             # Example: see GEOM_TestAll.py
3853             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
3854             RaiseIfFailed("MakeThickening", self.PrimOp)
3855             return anObj
3856
3857         ## Build a middle path of a pipe-like shape.
3858         #  The path shape can be a wire or an edge.
3859         #  @param theShape It can be closed or unclosed pipe-like shell
3860         #                  or a pipe-like solid.
3861         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
3862         #                            should be wires or faces of theShape.
3863         #  @param theName Object name; when specified, this parameter is used
3864         #         for result publication in the study. Otherwise, if automatic
3865         #         publication is switched on, default value is used for result name.
3866         #
3867         #  @note It is not assumed that exact or approximate copy of theShape
3868         #        can be obtained by applying existing Pipe operation on the
3869         #        resulting "Path" wire taking theBase1 as the base - it is not
3870         #        always possible; though in some particular cases it might work
3871         #        it is not guaranteed. Thus, RestorePath function should not be
3872         #        considered as an exact reverse operation of the Pipe.
3873         #
3874         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3875         #                                source pipe's "path".
3876         #
3877         #  @ref tui_creation_pipe_path "Example"
3878         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
3879             """
3880             Build a middle path of a pipe-like shape.
3881             The path shape can be a wire or an edge.
3882
3883             Parameters:
3884                 theShape It can be closed or unclosed pipe-like shell
3885                          or a pipe-like solid.
3886                 theBase1, theBase2 Two bases of the supposed pipe. This
3887                                    should be wires or faces of theShape.
3888                 theName Object name; when specified, this parameter is used
3889                         for result publication in the study. Otherwise, if automatic
3890                         publication is switched on, default value is used for result name.
3891
3892             Returns:
3893                 New GEOM_Object, containing an edge or wire that represent
3894                                  source pipe's path.
3895             """
3896             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
3897             RaiseIfFailed("RestorePath", self.PrimOp)
3898             self._autoPublish(anObj, theName, "path")
3899             return anObj
3900
3901         ## Build a middle path of a pipe-like shape.
3902         #  The path shape can be a wire or an edge.
3903         #  @param theShape It can be closed or unclosed pipe-like shell
3904         #                  or a pipe-like solid.
3905         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
3906         #                                should be lists of edges of theShape.
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         #  @note It is not assumed that exact or approximate copy of theShape
3912         #        can be obtained by applying existing Pipe operation on the
3913         #        resulting "Path" wire taking theBase1 as the base - it is not
3914         #        always possible; though in some particular cases it might work
3915         #        it is not guaranteed. Thus, RestorePath function should not be
3916         #        considered as an exact reverse operation of the Pipe.
3917         #
3918         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3919         #                                source pipe's "path".
3920         #
3921         #  @ref tui_creation_pipe_path "Example"
3922         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
3923             """
3924             Build a middle path of a pipe-like shape.
3925             The path shape can be a wire or an edge.
3926
3927             Parameters:
3928                 theShape It can be closed or unclosed pipe-like shell
3929                          or a pipe-like solid.
3930                 listEdges1, listEdges2 Two bases of the supposed pipe. This
3931                                        should be lists of edges of theShape.
3932                 theName Object name; when specified, this parameter is used
3933                         for result publication in the study. Otherwise, if automatic
3934                         publication is switched on, default value is used for result name.
3935
3936             Returns:
3937                 New GEOM_Object, containing an edge or wire that represent
3938                                  source pipe's path.
3939             """
3940             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
3941             RaiseIfFailed("RestorePath", self.PrimOp)
3942             self._autoPublish(anObj, theName, "path")
3943             return anObj
3944
3945         # end of l3_complex
3946         ## @}
3947
3948         ## @addtogroup l3_advanced
3949         ## @{
3950
3951         ## Create a linear edge with specified ends.
3952         #  @param thePnt1 Point for the first end of edge.
3953         #  @param thePnt2 Point for the second end of edge.
3954         #  @param theName Object name; when specified, this parameter is used
3955         #         for result publication in the study. Otherwise, if automatic
3956         #         publication is switched on, default value is used for result name.
3957         #
3958         #  @return New GEOM.GEOM_Object, containing the created edge.
3959         #
3960         #  @ref tui_creation_edge "Example"
3961         def MakeEdge(self, thePnt1, thePnt2, theName=None):
3962             """
3963             Create a linear edge with specified ends.
3964
3965             Parameters:
3966                 thePnt1 Point for the first end of edge.
3967                 thePnt2 Point for the second end of edge.
3968                 theName Object name; when specified, this parameter is used
3969                         for result publication in the study. Otherwise, if automatic
3970                         publication is switched on, default value is used for result name.
3971
3972             Returns:           
3973                 New GEOM.GEOM_Object, containing the created edge.
3974             """
3975             # Example: see GEOM_TestAll.py
3976             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
3977             RaiseIfFailed("MakeEdge", self.ShapesOp)
3978             self._autoPublish(anObj, theName, "edge")
3979             return anObj
3980
3981         ## Create a new edge, corresponding to the given length on the given curve.
3982         #  @param theRefCurve The referenced curve (edge).
3983         #  @param theLength Length on the referenced curve. It can be negative.
3984         #  @param theStartPoint Any point can be selected for it, the new edge will begin
3985         #                       at the end of \a theRefCurve, close to the selected point.
3986         #                       If None, start from the first point of \a theRefCurve.
3987         #  @param theName Object name; when specified, this parameter is used
3988         #         for result publication in the study. Otherwise, if automatic
3989         #         publication is switched on, default value is used for result name.
3990         #
3991         #  @return New GEOM.GEOM_Object, containing the created edge.
3992         #
3993         #  @ref tui_creation_edge "Example"
3994         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
3995             """
3996             Create a new edge, corresponding to the given length on the given curve.
3997
3998             Parameters:
3999                 theRefCurve The referenced curve (edge).
4000                 theLength Length on the referenced curve. It can be negative.
4001                 theStartPoint Any point can be selected for it, the new edge will begin
4002                               at the end of theRefCurve, close to the selected point.
4003                               If None, start from the first point of theRefCurve.
4004                 theName Object name; when specified, this parameter is used
4005                         for result publication in the study. Otherwise, if automatic
4006                         publication is switched on, default value is used for result name.
4007
4008             Returns:              
4009                 New GEOM.GEOM_Object, containing the created edge.
4010             """
4011             # Example: see GEOM_TestAll.py
4012             theLength, Parameters = ParseParameters(theLength)
4013             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4014             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4015             anObj.SetParameters(Parameters)
4016             self._autoPublish(anObj, theName, "edge")
4017             return anObj
4018
4019         ## Create an edge from specified wire.
4020         #  @param theWire source Wire
4021         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4022         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4023         #  @param theName Object name; when specified, this parameter is used
4024         #         for result publication in the study. Otherwise, if automatic
4025         #         publication is switched on, default value is used for result name.
4026         #
4027         #  @return New GEOM.GEOM_Object, containing the created edge.
4028         #
4029         #  @ref tui_creation_edge "Example"
4030         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4031             """
4032             Create an edge from specified wire.
4033
4034             Parameters:
4035                 theWire source Wire
4036                 theLinearTolerance linear tolerance value (default = 1e-07)
4037                 theAngularTolerance angular tolerance value (default = 1e-12)
4038                 theName Object name; when specified, this parameter is used
4039                         for result publication in the study. Otherwise, if automatic
4040                         publication is switched on, default value is used for result name.
4041
4042             Returns:
4043                 New GEOM.GEOM_Object, containing the created edge.
4044             """
4045             # Example: see GEOM_TestAll.py
4046             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4047             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4048             self._autoPublish(anObj, theName, "edge")
4049             return anObj
4050
4051         ## Create a wire from the set of edges and wires.
4052         #  @param theEdgesAndWires List of edges and/or wires.
4053         #  @param theTolerance Maximum distance between vertices, that will be merged.
4054         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4055         #  @param theName Object name; when specified, this parameter is used
4056         #         for result publication in the study. Otherwise, if automatic
4057         #         publication is switched on, default value is used for result name.
4058         #
4059         #  @return New GEOM.GEOM_Object, containing the created wire.
4060         #
4061         #  @ref tui_creation_wire "Example"
4062         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4063             """
4064             Create a wire from the set of edges and wires.
4065
4066             Parameters:
4067                 theEdgesAndWires List of edges and/or wires.
4068                 theTolerance Maximum distance between vertices, that will be merged.
4069                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4070                 theName Object name; when specified, this parameter is used
4071                         for result publication in the study. Otherwise, if automatic
4072                         publication is switched on, default value is used for result name.
4073
4074             Returns:                    
4075                 New GEOM.GEOM_Object, containing the created wire.
4076             """
4077             # Example: see GEOM_TestAll.py
4078             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4079             RaiseIfFailed("MakeWire", self.ShapesOp)
4080             self._autoPublish(anObj, theName, "wire")
4081             return anObj
4082
4083         ## Create a face on the given wire.
4084         #  @param theWire closed Wire or Edge to build the face on.
4085         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4086         #                        If the tolerance of the obtained planar face is less
4087         #                        than 1e-06, this face will be returned, otherwise the
4088         #                        algorithm tries to build any suitable face on the given
4089         #                        wire and prints a warning message.
4090         #  @param theName Object name; when specified, this parameter is used
4091         #         for result publication in the study. Otherwise, if automatic
4092         #         publication is switched on, default value is used for result name.
4093         #
4094         #  @return New GEOM.GEOM_Object, containing the created face.
4095         #
4096         #  @ref tui_creation_face "Example"
4097         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4098             """
4099             Create a face on the given wire.
4100
4101             Parameters:
4102                 theWire closed Wire or Edge to build the face on.
4103                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4104                                If the tolerance of the obtained planar face is less
4105                                than 1e-06, this face will be returned, otherwise the
4106                                algorithm tries to build any suitable face on the given
4107                                wire and prints a warning message.
4108                 theName Object name; when specified, this parameter is used
4109                         for result publication in the study. Otherwise, if automatic
4110                         publication is switched on, default value is used for result name.
4111
4112             Returns:
4113                 New GEOM.GEOM_Object, containing the created face.
4114             """
4115             # Example: see GEOM_TestAll.py
4116             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4117             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4118                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4119             else:
4120                 RaiseIfFailed("MakeFace", self.ShapesOp)
4121             self._autoPublish(anObj, theName, "face")
4122             return anObj
4123
4124         ## Create a face on the given wires set.
4125         #  @param theWires List of closed wires or edges to build the face on.
4126         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4127         #                        If the tolerance of the obtained planar face is less
4128         #                        than 1e-06, this face will be returned, otherwise the
4129         #                        algorithm tries to build any suitable face on the given
4130         #                        wire and prints a warning message.
4131         #  @param theName Object name; when specified, this parameter is used
4132         #         for result publication in the study. Otherwise, if automatic
4133         #         publication is switched on, default value is used for result name.
4134         #
4135         #  @return New GEOM.GEOM_Object, containing the created face.
4136         #
4137         #  @ref tui_creation_face "Example"
4138         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4139             """
4140             Create a face on the given wires set.
4141
4142             Parameters:
4143                 theWires List of closed wires or edges to build the face on.
4144                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4145                                If the tolerance of the obtained planar face is less
4146                                than 1e-06, this face will be returned, otherwise the
4147                                algorithm tries to build any suitable face on the given
4148                                wire and prints a warning message.
4149                 theName Object name; when specified, this parameter is used
4150                         for result publication in the study. Otherwise, if automatic
4151                         publication is switched on, default value is used for result name.
4152
4153             Returns: 
4154                 New GEOM.GEOM_Object, containing the created face.
4155             """
4156             # Example: see GEOM_TestAll.py
4157             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4158             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4159                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4160             else:
4161                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4162             self._autoPublish(anObj, theName, "face")
4163             return anObj
4164
4165         ## See MakeFaceWires() method for details.
4166         #
4167         #  @ref tui_creation_face "Example 1"
4168         #  \n @ref swig_MakeFaces  "Example 2"
4169         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4170             """
4171             See geompy.MakeFaceWires() method for details.
4172             """
4173             # Example: see GEOM_TestOthers.py
4174             # note: auto-publishing is done in self.MakeFaceWires()
4175             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4176             return anObj
4177
4178         ## Create a shell from the set of faces and shells.
4179         #  @param theFacesAndShells List of faces and/or shells.
4180         #  @param theName Object name; when specified, this parameter is used
4181         #         for result publication in the study. Otherwise, if automatic
4182         #         publication is switched on, default value is used for result name.
4183         #
4184         #  @return New GEOM.GEOM_Object, containing the created shell.
4185         #
4186         #  @ref tui_creation_shell "Example"
4187         def MakeShell(self, theFacesAndShells, theName=None):
4188             """
4189             Create a shell from the set of faces and shells.
4190
4191             Parameters:
4192                 theFacesAndShells List of faces and/or shells.
4193                 theName Object name; when specified, this parameter is used
4194                         for result publication in the study. Otherwise, if automatic
4195                         publication is switched on, default value is used for result name.
4196
4197             Returns:
4198                 New GEOM.GEOM_Object, containing the created shell.
4199             """
4200             # Example: see GEOM_TestAll.py
4201             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4202             RaiseIfFailed("MakeShell", self.ShapesOp)
4203             self._autoPublish(anObj, theName, "shell")
4204             return anObj
4205
4206         ## Create a solid, bounded by the given shells.
4207         #  @param theShells Sequence of bounding shells.
4208         #  @param theName Object name; when specified, this parameter is used
4209         #         for result publication in the study. Otherwise, if automatic
4210         #         publication is switched on, default value is used for result name.
4211         #
4212         #  @return New GEOM.GEOM_Object, containing the created solid.
4213         #
4214         #  @ref tui_creation_solid "Example"
4215         def MakeSolid(self, theShells, theName=None):
4216             """
4217             Create a solid, bounded by the given shells.
4218
4219             Parameters:
4220                 theShells Sequence of bounding shells.
4221                 theName Object name; when specified, this parameter is used
4222                         for result publication in the study. Otherwise, if automatic
4223                         publication is switched on, default value is used for result name.
4224
4225             Returns:
4226                 New GEOM.GEOM_Object, containing the created solid.
4227             """
4228             # Example: see GEOM_TestAll.py
4229             if len(theShells) == 1:
4230                 descr = self.MeasuOp.IsGoodForSolid(theShells[0])
4231                 #if len(descr) > 0:
4232                 #    raise RuntimeError, "MakeSolidShells : " + descr
4233                 if descr == "WRN_SHAPE_UNCLOSED":
4234                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4235             anObj = self.ShapesOp.MakeSolidShells(theShells)
4236             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4237             self._autoPublish(anObj, theName, "solid")
4238             return anObj
4239
4240         ## Create a compound of the given shapes.
4241         #  @param theShapes List of shapes to put in compound.
4242         #  @param theName Object name; when specified, this parameter is used
4243         #         for result publication in the study. Otherwise, if automatic
4244         #         publication is switched on, default value is used for result name.
4245         #
4246         #  @return New GEOM.GEOM_Object, containing the created compound.
4247         #
4248         #  @ref tui_creation_compound "Example"
4249         def MakeCompound(self, theShapes, theName=None):
4250             """
4251             Create a compound of the given shapes.
4252
4253             Parameters:
4254                 theShapes List of shapes to put in compound.
4255                 theName Object name; when specified, this parameter is used
4256                         for result publication in the study. Otherwise, if automatic
4257                         publication is switched on, default value is used for result name.
4258
4259             Returns:
4260                 New GEOM.GEOM_Object, containing the created compound.
4261             """
4262             # Example: see GEOM_TestAll.py
4263             anObj = self.ShapesOp.MakeCompound(theShapes)
4264             RaiseIfFailed("MakeCompound", self.ShapesOp)
4265             self._autoPublish(anObj, theName, "compound")
4266             return anObj
4267
4268         # end of l3_advanced
4269         ## @}
4270
4271         ## @addtogroup l2_measure
4272         ## @{
4273
4274         ## Gives quantity of faces in the given shape.
4275         #  @param theShape Shape to count faces of.
4276         #  @return Quantity of faces.
4277         #
4278         #  @ref swig_NumberOf "Example"
4279         def NumberOfFaces(self, theShape):
4280             """
4281             Gives quantity of faces in the given shape.
4282
4283             Parameters:
4284                 theShape Shape to count faces of.
4285
4286             Returns:    
4287                 Quantity of faces.
4288             """
4289             # Example: see GEOM_TestOthers.py
4290             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4291             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4292             return nb_faces
4293
4294         ## Gives quantity of edges in the given shape.
4295         #  @param theShape Shape to count edges of.
4296         #  @return Quantity of edges.
4297         #
4298         #  @ref swig_NumberOf "Example"
4299         def NumberOfEdges(self, theShape):
4300             """
4301             Gives quantity of edges in the given shape.
4302
4303             Parameters:
4304                 theShape Shape to count edges of.
4305
4306             Returns:    
4307                 Quantity of edges.
4308             """
4309             # Example: see GEOM_TestOthers.py
4310             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4311             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4312             return nb_edges
4313
4314         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4315         #  @param theShape Shape to count sub-shapes of.
4316         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4317         #  @return Quantity of sub-shapes of given type.
4318         #
4319         #  @ref swig_NumberOf "Example"
4320         def NumberOfSubShapes(self, theShape, theShapeType):
4321             """
4322             Gives quantity of sub-shapes of type theShapeType in the given shape.
4323
4324             Parameters:
4325                 theShape Shape to count sub-shapes of.
4326                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4327
4328             Returns:
4329                 Quantity of sub-shapes of given type.
4330             """
4331             # Example: see GEOM_TestOthers.py
4332             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4333             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4334             return nb_ss
4335
4336         ## Gives quantity of solids in the given shape.
4337         #  @param theShape Shape to count solids in.
4338         #  @return Quantity of solids.
4339         #
4340         #  @ref swig_NumberOf "Example"
4341         def NumberOfSolids(self, theShape):
4342             """
4343             Gives quantity of solids in the given shape.
4344
4345             Parameters:
4346                 theShape Shape to count solids in.
4347
4348             Returns:
4349                 Quantity of solids.
4350             """
4351             # Example: see GEOM_TestOthers.py
4352             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4353             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4354             return nb_solids
4355
4356         # end of l2_measure
4357         ## @}
4358
4359         ## @addtogroup l3_healing
4360         ## @{
4361
4362         ## Reverses an orientation the given shape.
4363         #  @param theShape Shape to be reversed.
4364         #  @param theName Object name; when specified, this parameter is used
4365         #         for result publication in the study. Otherwise, if automatic
4366         #         publication is switched on, default value is used for result name.
4367         #
4368         #  @return The reversed copy of theShape.
4369         #
4370         #  @ref swig_ChangeOrientation "Example"
4371         def ChangeOrientation(self, theShape, theName=None):
4372             """
4373             Reverses an orientation the given shape.
4374
4375             Parameters:
4376                 theShape Shape to be reversed.
4377                 theName Object name; when specified, this parameter is used
4378                         for result publication in the study. Otherwise, if automatic
4379                         publication is switched on, default value is used for result name.
4380
4381             Returns:   
4382                 The reversed copy of theShape.
4383             """
4384             # Example: see GEOM_TestAll.py
4385             anObj = self.ShapesOp.ChangeOrientation(theShape)
4386             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4387             self._autoPublish(anObj, theName, "reversed")
4388             return anObj
4389
4390         ## See ChangeOrientation() method for details.
4391         #
4392         #  @ref swig_OrientationChange "Example"
4393         def OrientationChange(self, theShape, theName=None):
4394             """
4395             See geompy.ChangeOrientation method for details.
4396             """
4397             # Example: see GEOM_TestOthers.py
4398             # note: auto-publishing is done in self.ChangeOrientation()
4399             anObj = self.ChangeOrientation(theShape, theName)
4400             return anObj
4401
4402         # end of l3_healing
4403         ## @}
4404
4405         ## @addtogroup l4_obtain
4406         ## @{
4407
4408         ## Retrieve all free faces from the given shape.
4409         #  Free face is a face, which is not shared between two shells of the shape.
4410         #  @param theShape Shape to find free faces in.
4411         #  @return List of IDs of all free faces, contained in theShape.
4412         #
4413         #  @ref tui_measurement_tools_page "Example"
4414         def GetFreeFacesIDs(self,theShape):
4415             """
4416             Retrieve all free faces from the given shape.
4417             Free face is a face, which is not shared between two shells of the shape.
4418
4419             Parameters:
4420                 theShape Shape to find free faces in.
4421
4422             Returns:
4423                 List of IDs of all free faces, contained in theShape.
4424             """
4425             # Example: see GEOM_TestOthers.py
4426             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4427             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4428             return anIDs
4429
4430         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4431         #  @param theShape1 Shape to find sub-shapes in.
4432         #  @param theShape2 Shape to find shared sub-shapes with.
4433         #  @param theShapeType Type of sub-shapes to be retrieved.
4434         #  @param theName Object name; when specified, this parameter is used
4435         #         for result publication in the study. Otherwise, if automatic
4436         #         publication is switched on, default value is used for result name.
4437         #
4438         #  @return List of sub-shapes of theShape1, shared with theShape2.
4439         #
4440         #  @ref swig_GetSharedShapes "Example"
4441         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4442             """
4443             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4444
4445             Parameters:
4446                 theShape1 Shape to find sub-shapes in.
4447                 theShape2 Shape to find shared sub-shapes with.
4448                 theShapeType Type of sub-shapes to be retrieved.
4449                 theName Object name; when specified, this parameter is used
4450                         for result publication in the study. Otherwise, if automatic
4451                         publication is switched on, default value is used for result name.
4452
4453             Returns:
4454                 List of sub-shapes of theShape1, shared with theShape2.
4455             """
4456             # Example: see GEOM_TestOthers.py
4457             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4458             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4459             self._autoPublish(aList, theName, "shared")
4460             return aList
4461
4462         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4463         #  @param theShapes Shapes to find common sub-shapes of.
4464         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4465         #  @param theName Object name; when specified, this parameter is used
4466         #         for result publication in the study. Otherwise, if automatic
4467         #         publication is switched on, default value is used for result name.
4468         #
4469         #  @return List of objects, that are sub-shapes of all given shapes.
4470         #
4471         #  @ref swig_GetSharedShapes "Example"
4472         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4473             """
4474             Get all sub-shapes, shared by all shapes in the list theShapes.
4475
4476             Parameters:
4477                 theShapes Shapes to find common sub-shapes of.
4478                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4479                 theName Object name; when specified, this parameter is used
4480                         for result publication in the study. Otherwise, if automatic
4481                         publication is switched on, default value is used for result name.
4482
4483             Returns:    
4484                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4485             """
4486             # Example: see GEOM_TestOthers.py
4487             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4488             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4489             self._autoPublish(aList, theName, "shared")
4490             return aList
4491
4492         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4493         #  situated relatively the specified plane by the certain way,
4494         #  defined through <VAR>theState</VAR> parameter.
4495         #  @param theShape Shape to find sub-shapes of.
4496         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4497         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4498         #                direction and location of the plane to find shapes on.
4499         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4500         #  @param theName Object name; when specified, this parameter is used
4501         #         for result publication in the study. Otherwise, if automatic
4502         #         publication is switched on, default value is used for result name.
4503         #
4504         #  @return List of all found sub-shapes.
4505         #
4506         #  @ref swig_GetShapesOnPlane "Example"
4507         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4508             """
4509             Find in theShape all sub-shapes of type theShapeType,
4510             situated relatively the specified plane by the certain way,
4511             defined through theState parameter.
4512
4513             Parameters:
4514                 theShape Shape to find sub-shapes of.
4515                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4516                 theAx1 Vector (or line, or linear edge), specifying normal
4517                        direction and location of the plane to find shapes on.
4518                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4519                 theName Object name; when specified, this parameter is used
4520                         for result publication in the study. Otherwise, if automatic
4521                         publication is switched on, default value is used for result name.
4522
4523             Returns:
4524                 List of all found sub-shapes.
4525             """
4526             # Example: see GEOM_TestOthers.py
4527             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4528             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4529             self._autoPublish(aList, theName, "shapeOnPlane")
4530             return aList
4531
4532         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4533         #  situated relatively the specified plane by the certain way,
4534         #  defined through <VAR>theState</VAR> parameter.
4535         #  @param theShape Shape to find sub-shapes of.
4536         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4537         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4538         #                direction and location of the plane to find shapes on.
4539         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4540         #
4541         #  @return List of all found sub-shapes indices.
4542         #
4543         #  @ref swig_GetShapesOnPlaneIDs "Example"
4544         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4545             """
4546             Find in theShape all sub-shapes of type theShapeType,
4547             situated relatively the specified plane by the certain way,
4548             defined through theState parameter.
4549
4550             Parameters:
4551                 theShape Shape to find sub-shapes of.
4552                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4553                 theAx1 Vector (or line, or linear edge), specifying normal
4554                        direction and location of the plane to find shapes on.
4555                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4556
4557             Returns:
4558                 List of all found sub-shapes indices.
4559             """
4560             # Example: see GEOM_TestOthers.py
4561             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4562             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4563             return aList
4564
4565         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4566         #  situated relatively the specified plane by the certain way,
4567         #  defined through <VAR>theState</VAR> parameter.
4568         #  @param theShape Shape to find sub-shapes of.
4569         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4570         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4571         #                direction of the plane to find shapes on.
4572         #  @param thePnt Point specifying location of the plane to find shapes on.
4573         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4574         #  @param theName Object name; when specified, this parameter is used
4575         #         for result publication in the study. Otherwise, if automatic
4576         #         publication is switched on, default value is used for result name.
4577         #
4578         #  @return List of all found sub-shapes.
4579         #
4580         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4581         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4582             """
4583             Find in theShape all sub-shapes of type theShapeType,
4584             situated relatively the specified plane by the certain way,
4585             defined through theState parameter.
4586
4587             Parameters:
4588                 theShape Shape to find sub-shapes of.
4589                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4590                 theAx1 Vector (or line, or linear edge), specifying normal
4591                        direction and location of the plane to find shapes on.
4592                 thePnt Point specifying location of the plane to find shapes on.
4593                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4594                 theName Object name; when specified, this parameter is used
4595                         for result publication in the study. Otherwise, if automatic
4596                         publication is switched on, default value is used for result name.
4597
4598             Returns:
4599                 List of all found sub-shapes.
4600             """
4601             # Example: see GEOM_TestOthers.py
4602             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4603                                                                theAx1, thePnt, theState)
4604             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4605             self._autoPublish(aList, theName, "shapeOnPlane")
4606             return aList
4607
4608         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4609         #  situated relatively the specified plane by the certain way,
4610         #  defined through <VAR>theState</VAR> parameter.
4611         #  @param theShape Shape to find sub-shapes of.
4612         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4613         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4614         #                direction of the plane to find shapes on.
4615         #  @param thePnt Point specifying location of the plane to find shapes on.
4616         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4617         #
4618         #  @return List of all found sub-shapes indices.
4619         #
4620         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4621         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4622             """
4623             Find in theShape all sub-shapes of type theShapeType,
4624             situated relatively the specified plane by the certain way,
4625             defined through theState parameter.
4626
4627             Parameters:
4628                 theShape Shape to find sub-shapes of.
4629                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4630                 theAx1 Vector (or line, or linear edge), specifying normal
4631                        direction and location of the plane to find shapes on.
4632                 thePnt Point specifying location of the plane to find shapes on.
4633                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4634
4635             Returns:
4636                 List of all found sub-shapes indices.
4637             """
4638             # Example: see GEOM_TestOthers.py
4639             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4640                                                                   theAx1, thePnt, theState)
4641             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4642             return aList
4643
4644         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4645         #  the specified cylinder by the certain way, defined through \a theState parameter.
4646         #  @param theShape Shape to find sub-shapes of.
4647         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4648         #  @param theAxis Vector (or line, or linear edge), specifying
4649         #                 axis of the cylinder to find shapes on.
4650         #  @param theRadius Radius of the cylinder to find shapes on.
4651         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4652         #  @param theName Object name; when specified, this parameter is used
4653         #         for result publication in the study. Otherwise, if automatic
4654         #         publication is switched on, default value is used for result name.
4655         #
4656         #  @return List of all found sub-shapes.
4657         #
4658         #  @ref swig_GetShapesOnCylinder "Example"
4659         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
4660             """
4661             Find in theShape all sub-shapes of type theShapeType, situated relatively
4662             the specified cylinder by the certain way, defined through theState parameter.
4663
4664             Parameters:
4665                 theShape Shape to find sub-shapes of.
4666                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4667                 theAxis Vector (or line, or linear edge), specifying
4668                         axis of the cylinder to find shapes on.
4669                 theRadius Radius of the cylinder to find shapes on.
4670                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4671                 theName Object name; when specified, this parameter is used
4672                         for result publication in the study. Otherwise, if automatic
4673                         publication is switched on, default value is used for result name.
4674
4675             Returns:
4676                 List of all found sub-shapes.
4677             """
4678             # Example: see GEOM_TestOthers.py
4679             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
4680             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
4681             self._autoPublish(aList, theName, "shapeOnCylinder")
4682             return aList
4683
4684         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4685         #  the specified cylinder by the certain way, defined through \a theState parameter.
4686         #  @param theShape Shape to find sub-shapes of.
4687         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4688         #  @param theAxis Vector (or line, or linear edge), specifying
4689         #                 axis of the cylinder to find shapes on.
4690         #  @param theRadius Radius of the cylinder to find shapes on.
4691         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4692         #
4693         #  @return List of all found sub-shapes indices.
4694         #
4695         #  @ref swig_GetShapesOnCylinderIDs "Example"
4696         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
4697             """
4698             Find in theShape all sub-shapes of type theShapeType, situated relatively
4699             the specified cylinder by the certain way, defined through theState parameter.
4700
4701             Parameters:
4702                 theShape Shape to find sub-shapes of.
4703                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4704                 theAxis Vector (or line, or linear edge), specifying
4705                         axis of the cylinder to find shapes on.
4706                 theRadius Radius of the cylinder to find shapes on.
4707                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4708
4709             Returns:
4710                 List of all found sub-shapes indices.
4711             """
4712             # Example: see GEOM_TestOthers.py
4713             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
4714             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
4715             return aList
4716
4717         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4718         #  the specified cylinder by the certain way, defined through \a theState parameter.
4719         #  @param theShape Shape to find sub-shapes of.
4720         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4721         #  @param theAxis Vector (or line, or linear edge), specifying
4722         #                 axis of the cylinder to find shapes on.
4723         #  @param thePnt Point specifying location of the bottom of the cylinder.
4724         #  @param theRadius Radius of the cylinder to find shapes on.
4725         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4726         #  @param theName Object name; when specified, this parameter is used
4727         #         for result publication in the study. Otherwise, if automatic
4728         #         publication is switched on, default value is used for result name.
4729         #
4730         #  @return List of all found sub-shapes.
4731         #
4732         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
4733         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
4734             """
4735             Find in theShape all sub-shapes of type theShapeType, situated relatively
4736             the specified cylinder by the certain way, defined through theState parameter.
4737
4738             Parameters:
4739                 theShape Shape to find sub-shapes of.
4740                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4741                 theAxis Vector (or line, or linear edge), specifying
4742                         axis of the cylinder to find shapes on.
4743                 theRadius Radius of the cylinder to find shapes on.
4744                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4745                 theName Object name; when specified, this parameter is used
4746                         for result publication in the study. Otherwise, if automatic
4747                         publication is switched on, default value is used for result name.
4748
4749             Returns:
4750                 List of all found sub-shapes.
4751             """
4752             # Example: see GEOM_TestOthers.py
4753             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4754             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
4755             self._autoPublish(aList, theName, "shapeOnCylinder")
4756             return aList
4757
4758         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4759         #  the specified cylinder by the certain way, defined through \a theState parameter.
4760         #  @param theShape Shape to find sub-shapes of.
4761         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4762         #  @param theAxis Vector (or line, or linear edge), specifying
4763         #                 axis of the cylinder to find shapes on.
4764         #  @param thePnt Point specifying location of the bottom of the cylinder.
4765         #  @param theRadius Radius of the cylinder to find shapes on.
4766         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4767         #
4768         #  @return List of all found sub-shapes indices
4769         #
4770         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
4771         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
4772             """
4773             Find in theShape all sub-shapes of type theShapeType, situated relatively
4774             the specified cylinder by the certain way, defined through theState parameter.
4775
4776             Parameters:
4777                 theShape Shape to find sub-shapes of.
4778                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4779                 theAxis Vector (or line, or linear edge), specifying
4780                         axis of the cylinder to find shapes on.
4781                 theRadius Radius of the cylinder to find shapes on.
4782                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4783
4784             Returns:
4785                 List of all found sub-shapes indices.            
4786             """
4787             # Example: see GEOM_TestOthers.py
4788             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4789             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
4790             return aList
4791
4792         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4793         #  the specified sphere by the certain way, defined through \a theState parameter.
4794         #  @param theShape Shape to find sub-shapes of.
4795         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4796         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4797         #  @param theRadius Radius of the sphere to find shapes on.
4798         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4799         #  @param theName Object name; when specified, this parameter is used
4800         #         for result publication in the study. Otherwise, if automatic
4801         #         publication is switched on, default value is used for result name.
4802         #
4803         #  @return List of all found sub-shapes.
4804         #
4805         #  @ref swig_GetShapesOnSphere "Example"
4806         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
4807             """
4808             Find in theShape all sub-shapes of type theShapeType, situated relatively
4809             the specified sphere by the certain way, defined through theState parameter.
4810
4811             Parameters:
4812                 theShape Shape to find sub-shapes of.
4813                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4814                 theCenter Point, specifying center of the sphere to find shapes on.
4815                 theRadius Radius of the sphere to find shapes on.
4816                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4817                 theName Object name; when specified, this parameter is used
4818                         for result publication in the study. Otherwise, if automatic
4819                         publication is switched on, default value is used for result name.
4820
4821             Returns:
4822                 List of all found sub-shapes.
4823             """
4824             # Example: see GEOM_TestOthers.py
4825             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
4826             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
4827             self._autoPublish(aList, theName, "shapeOnSphere")
4828             return aList
4829
4830         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4831         #  the specified sphere by the certain way, defined through \a theState parameter.
4832         #  @param theShape Shape to find sub-shapes of.
4833         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4834         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4835         #  @param theRadius Radius of the sphere to find shapes on.
4836         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4837         #
4838         #  @return List of all found sub-shapes indices.
4839         #
4840         #  @ref swig_GetShapesOnSphereIDs "Example"
4841         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
4842             """
4843             Find in theShape all sub-shapes of type theShapeType, situated relatively
4844             the specified sphere by the certain way, defined through theState parameter.
4845
4846             Parameters:
4847                 theShape Shape to find sub-shapes of.
4848                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4849                 theCenter Point, specifying center of the sphere to find shapes on.
4850                 theRadius Radius of the sphere to find shapes on.
4851                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4852
4853             Returns:
4854                 List of all found sub-shapes indices.
4855             """
4856             # Example: see GEOM_TestOthers.py
4857             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
4858             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
4859             return aList
4860
4861         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4862         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4863         #  @param theShape Shape to find sub-shapes of.
4864         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4865         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4866         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4867         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4868         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4869         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4870         #  @param theName Object name; when specified, this parameter is used
4871         #         for result publication in the study. Otherwise, if automatic
4872         #         publication is switched on, default value is used for result name.
4873         #
4874         #  @return List of all found sub-shapes.
4875         #
4876         #  @ref swig_GetShapesOnQuadrangle "Example"
4877         def GetShapesOnQuadrangle(self, theShape, theShapeType,
4878                                   theTopLeftPoint, theTopRigthPoint,
4879                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
4880             """
4881             Find in theShape all sub-shapes of type theShapeType, situated relatively
4882             the specified quadrangle by the certain way, defined through theState parameter.
4883
4884             Parameters:
4885                 theShape Shape to find sub-shapes of.
4886                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4887                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4888                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4889                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4890                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4891                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4892                 theName Object name; when specified, this parameter is used
4893                         for result publication in the study. Otherwise, if automatic
4894                         publication is switched on, default value is used for result name.
4895
4896             Returns:
4897                 List of all found sub-shapes.
4898             """
4899             # Example: see GEOM_TestOthers.py
4900             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
4901                                                         theTopLeftPoint, theTopRigthPoint,
4902                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
4903             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
4904             self._autoPublish(aList, theName, "shapeOnQuadrangle")
4905             return aList
4906
4907         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4908         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4909         #  @param theShape Shape to find sub-shapes of.
4910         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4911         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4912         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4913         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4914         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4915         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4916         #
4917         #  @return List of all found sub-shapes indices.
4918         #
4919         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
4920         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
4921                                      theTopLeftPoint, theTopRigthPoint,
4922                                      theBottomLeftPoint, theBottomRigthPoint, theState):
4923             """
4924             Find in theShape all sub-shapes of type theShapeType, situated relatively
4925             the specified quadrangle by the certain way, defined through theState parameter.
4926
4927             Parameters:
4928                 theShape Shape to find sub-shapes of.
4929                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4930                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4931                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4932                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4933                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4934                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4935
4936             Returns:
4937                 List of all found sub-shapes indices.
4938             """
4939
4940             # Example: see GEOM_TestOthers.py
4941             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
4942                                                            theTopLeftPoint, theTopRigthPoint,
4943                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
4944             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
4945             return aList
4946
4947         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4948         #  the specified \a theBox by the certain way, defined through \a theState parameter.
4949         #  @param theBox Shape for relative comparing.
4950         #  @param theShape Shape to find sub-shapes of.
4951         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4952         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4953         #  @param theName Object name; when specified, this parameter is used
4954         #         for result publication in the study. Otherwise, if automatic
4955         #         publication is switched on, default value is used for result name.
4956         #
4957         #  @return List of all found sub-shapes.
4958         #
4959         #  @ref swig_GetShapesOnBox "Example"
4960         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
4961             """
4962             Find in theShape all sub-shapes of type theShapeType, situated relatively
4963             the specified theBox by the certain way, defined through theState parameter.
4964
4965             Parameters:
4966                 theBox Shape for relative comparing.
4967                 theShape Shape to find sub-shapes of.
4968                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4969                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4970                 theName Object name; when specified, this parameter is used
4971                         for result publication in the study. Otherwise, if automatic
4972                         publication is switched on, default value is used for result name.
4973
4974             Returns:
4975                 List of all found sub-shapes.
4976             """
4977             # Example: see GEOM_TestOthers.py
4978             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
4979             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
4980             self._autoPublish(aList, theName, "shapeOnBox")
4981             return aList
4982
4983         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4984         #  the specified \a theBox by the certain way, defined through \a theState parameter.
4985         #  @param theBox Shape for relative comparing.
4986         #  @param theShape Shape to find sub-shapes of.
4987         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4988         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4989         #
4990         #  @return List of all found sub-shapes indices.
4991         #
4992         #  @ref swig_GetShapesOnBoxIDs "Example"
4993         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
4994             """
4995             Find in theShape all sub-shapes of type theShapeType, situated relatively
4996             the specified theBox by the certain way, defined through theState parameter.
4997
4998             Parameters:
4999                 theBox Shape for relative comparing.
5000                 theShape Shape to find sub-shapes of.
5001                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5002                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5003
5004             Returns:
5005                 List of all found sub-shapes indices.
5006             """
5007             # Example: see GEOM_TestOthers.py
5008             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5009             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5010             return aList
5011
5012         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5013         #  situated relatively the specified \a theCheckShape by the
5014         #  certain way, defined through \a theState parameter.
5015         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5016         #  @param theShape Shape to find sub-shapes of.
5017         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
5018         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5019         #  @param theName Object name; when specified, this parameter is used
5020         #         for result publication in the study. Otherwise, if automatic
5021         #         publication is switched on, default value is used for result name.
5022         #
5023         #  @return List of all found sub-shapes.
5024         #
5025         #  @ref swig_GetShapesOnShape "Example"
5026         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5027             """
5028             Find in theShape all sub-shapes of type theShapeType,
5029             situated relatively the specified theCheckShape by the
5030             certain way, defined through theState parameter.
5031
5032             Parameters:
5033                 theCheckShape Shape for relative comparing. It must be a solid.
5034                 theShape Shape to find sub-shapes of.
5035                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5036                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5037                 theName Object name; when specified, this parameter is used
5038                         for result publication in the study. Otherwise, if automatic
5039                         publication is switched on, default value is used for result name.
5040
5041             Returns:
5042                 List of all found sub-shapes.
5043             """
5044             # Example: see GEOM_TestOthers.py
5045             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5046                                                    theShapeType, theState)
5047             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5048             self._autoPublish(aList, theName, "shapeOnShape")
5049             return aList
5050
5051         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5052         #  situated relatively the specified \a theCheckShape by the
5053         #  certain way, defined through \a theState parameter.
5054         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5055         #  @param theShape Shape to find sub-shapes of.
5056         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5057         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5058         #  @param theName Object name; when specified, this parameter is used
5059         #         for result publication in the study. Otherwise, if automatic
5060         #         publication is switched on, default value is used for result name.
5061         #
5062         #  @return All found sub-shapes as compound.
5063         #
5064         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5065         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5066             """
5067             Find in theShape all sub-shapes of type theShapeType,
5068             situated relatively the specified theCheckShape by the
5069             certain way, defined through theState parameter.
5070
5071             Parameters:
5072                 theCheckShape Shape for relative comparing. It must be a solid.
5073                 theShape Shape to find sub-shapes of.
5074                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5075                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5076                 theName Object name; when specified, this parameter is used
5077                         for result publication in the study. Otherwise, if automatic
5078                         publication is switched on, default value is used for result name.
5079
5080             Returns:
5081                 All found sub-shapes as compound.
5082             """
5083             # Example: see GEOM_TestOthers.py
5084             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5085                                                              theShapeType, theState)
5086             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5087             self._autoPublish(anObj, theName, "shapeOnShape")
5088             return anObj
5089
5090         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5091         #  situated relatively the specified \a theCheckShape by the
5092         #  certain way, defined through \a theState parameter.
5093         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5094         #  @param theShape Shape to find sub-shapes of.
5095         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5096         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5097         #
5098         #  @return List of all found sub-shapes indices.
5099         #
5100         #  @ref swig_GetShapesOnShapeIDs "Example"
5101         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5102             """
5103             Find in theShape all sub-shapes of type theShapeType,
5104             situated relatively the specified theCheckShape by the
5105             certain way, defined through theState parameter.
5106
5107             Parameters:
5108                 theCheckShape Shape for relative comparing. It must be a solid.
5109                 theShape Shape to find sub-shapes of.
5110                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5111                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5112
5113             Returns:
5114                 List of all found sub-shapes indices.
5115             """
5116             # Example: see GEOM_TestOthers.py
5117             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5118                                                       theShapeType, theState)
5119             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5120             return aList
5121
5122         ## Get sub-shape(s) of theShapeWhere, which are
5123         #  coincident with \a theShapeWhat or could be a part of it.
5124         #  @param theShapeWhere Shape to find sub-shapes of.
5125         #  @param theShapeWhat Shape, specifying what to find.
5126         #  @param isNewImplementation implementation of GetInPlace functionality
5127         #             (default = False, old alghorithm based on shape properties)
5128         #  @param theName Object name; when specified, this parameter is used
5129         #         for result publication in the study. Otherwise, if automatic
5130         #         publication is switched on, default value is used for result name.
5131         #
5132         #  @return Group of all found sub-shapes or a single found sub-shape.
5133         #
5134         #  @note This function has a restriction on argument shapes.
5135         #        If \a theShapeWhere has curved parts with significantly
5136         #        outstanding centres (i.e. the mass centre of a part is closer to
5137         #        \a theShapeWhat than to the part), such parts will not be found.
5138         #        @image html get_in_place_lost_part.png
5139         #
5140         #  @ref swig_GetInPlace "Example"
5141         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5142             """
5143             Get sub-shape(s) of theShapeWhere, which are
5144             coincident with  theShapeWhat or could be a part of it.
5145
5146             Parameters:
5147                 theShapeWhere Shape to find sub-shapes of.
5148                 theShapeWhat Shape, specifying what to find.
5149                 isNewImplementation Implementation of GetInPlace functionality
5150                                     (default = False, old alghorithm based on shape properties)
5151                 theName Object name; when specified, this parameter is used
5152                         for result publication in the study. Otherwise, if automatic
5153                         publication is switched on, default value is used for result name.
5154
5155             Returns:
5156                 Group of all found sub-shapes or a single found sub-shape.
5157
5158                 
5159             Note:
5160                 This function has a restriction on argument shapes.
5161                 If theShapeWhere has curved parts with significantly
5162                 outstanding centres (i.e. the mass centre of a part is closer to
5163                 theShapeWhat than to the part), such parts will not be found.
5164             """
5165             # Example: see GEOM_TestOthers.py
5166             anObj = None
5167             if isNewImplementation:
5168                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5169             else:
5170                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5171                 pass
5172             RaiseIfFailed("GetInPlace", self.ShapesOp)
5173             self._autoPublish(anObj, theName, "inplace")
5174             return anObj
5175
5176         ## Get sub-shape(s) of \a theShapeWhere, which are
5177         #  coincident with \a theShapeWhat or could be a part of it.
5178         #
5179         #  Implementation of this method is based on a saved history of an operation,
5180         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5181         #  arguments (an argument shape or a sub-shape of an argument shape).
5182         #  The operation could be the Partition or one of boolean operations,
5183         #  performed on simple shapes (not on compounds).
5184         #
5185         #  @param theShapeWhere Shape to find sub-shapes of.
5186         #  @param theShapeWhat Shape, specifying what to find (must be in the
5187         #                      building history of the ShapeWhere).
5188         #  @param theName Object name; when specified, this parameter is used
5189         #         for result publication in the study. Otherwise, if automatic
5190         #         publication is switched on, default value is used for result name.
5191         #
5192         #  @return Group of all found sub-shapes or a single found sub-shape.
5193         #
5194         #  @ref swig_GetInPlace "Example"
5195         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5196             """
5197             Implementation of this method is based on a saved history of an operation,
5198             produced theShapeWhere. The theShapeWhat must be among this operation's
5199             arguments (an argument shape or a sub-shape of an argument shape).
5200             The operation could be the Partition or one of boolean operations,
5201             performed on simple shapes (not on compounds).
5202
5203             Parameters:
5204                 theShapeWhere Shape to find sub-shapes of.
5205                 theShapeWhat Shape, specifying what to find (must be in the
5206                                 building history of the ShapeWhere).
5207                 theName Object name; when specified, this parameter is used
5208                         for result publication in the study. Otherwise, if automatic
5209                         publication is switched on, default value is used for result name.
5210
5211             Returns:
5212                 Group of all found sub-shapes or a single found sub-shape.
5213             """
5214             # Example: see GEOM_TestOthers.py
5215             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5216             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5217             self._autoPublish(anObj, theName, "inplace")
5218             return anObj
5219
5220         ## Get sub-shape of theShapeWhere, which is
5221         #  equal to \a theShapeWhat.
5222         #  @param theShapeWhere Shape to find sub-shape of.
5223         #  @param theShapeWhat Shape, specifying what to find.
5224         #  @param theName Object name; when specified, this parameter is used
5225         #         for result publication in the study. Otherwise, if automatic
5226         #         publication is switched on, default value is used for result name.
5227         #
5228         #  @return New GEOM.GEOM_Object for found sub-shape.
5229         #
5230         #  @ref swig_GetSame "Example"
5231         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5232             """
5233             Get sub-shape of theShapeWhere, which is
5234             equal to theShapeWhat.
5235
5236             Parameters:
5237                 theShapeWhere Shape to find sub-shape of.
5238                 theShapeWhat Shape, specifying what to find.
5239                 theName Object name; when specified, this parameter is used
5240                         for result publication in the study. Otherwise, if automatic
5241                         publication is switched on, default value is used for result name.
5242
5243             Returns:
5244                 New GEOM.GEOM_Object for found sub-shape.
5245             """
5246             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5247             RaiseIfFailed("GetSame", self.ShapesOp)
5248             self._autoPublish(anObj, theName, "sameShape")
5249             return anObj
5250
5251
5252         ## Get sub-shape indices of theShapeWhere, which is
5253         #  equal to \a theShapeWhat.
5254         #  @param theShapeWhere Shape to find sub-shape of.
5255         #  @param theShapeWhat Shape, specifying what to find.
5256         #  @return List of all found sub-shapes indices. 
5257         #
5258         #  @ref swig_GetSame "Example"
5259         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5260             """
5261             Get sub-shape indices of theShapeWhere, which is
5262             equal to theShapeWhat.
5263
5264             Parameters:
5265                 theShapeWhere Shape to find sub-shape of.
5266                 theShapeWhat Shape, specifying what to find.
5267
5268             Returns:
5269                 List of all found sub-shapes indices.
5270             """
5271             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5272             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5273             return anObj
5274
5275
5276         # end of l4_obtain
5277         ## @}
5278
5279         ## @addtogroup l4_access
5280         ## @{
5281
5282         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5283         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5284         #  @param aShape Shape to get sub-shape of.
5285         #  @param ListOfID List of sub-shapes indices.
5286         #  @param theName Object name; when specified, this parameter is used
5287         #         for result publication in the study. Otherwise, if automatic
5288         #         publication is switched on, default value is used for result name.
5289         #
5290         #  @return Found sub-shape.
5291         #
5292         #  @ref swig_all_decompose "Example"
5293         def GetSubShape(self, aShape, ListOfID, theName=None):
5294             """
5295             Obtain a composite sub-shape of aShape, composed from sub-shapes
5296             of aShape, selected by their unique IDs inside aShape
5297
5298             Parameters:
5299                 aShape Shape to get sub-shape of.
5300                 ListOfID List of sub-shapes indices.
5301                 theName Object name; when specified, this parameter is used
5302                         for result publication in the study. Otherwise, if automatic
5303                         publication is switched on, default value is used for result name.
5304
5305             Returns:
5306                 Found sub-shape.
5307             """
5308             # Example: see GEOM_TestAll.py
5309             anObj = self.AddSubShape(aShape,ListOfID)
5310             self._autoPublish(anObj, theName, "subshape")
5311             return anObj
5312
5313         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5314         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5315         #  @param aShape Shape to get sub-shape of.
5316         #  @param aSubShape Sub-shapes of aShape.
5317         #  @return ID of found sub-shape.
5318         #
5319         #  @ref swig_all_decompose "Example"
5320         def GetSubShapeID(self, aShape, aSubShape):
5321             """
5322             Obtain unique ID of sub-shape aSubShape inside aShape
5323             of aShape, selected by their unique IDs inside aShape
5324
5325             Parameters:
5326                aShape Shape to get sub-shape of.
5327                aSubShape Sub-shapes of aShape.
5328
5329             Returns:
5330                ID of found sub-shape.
5331             """
5332             # Example: see GEOM_TestAll.py
5333             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5334             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5335             return anID
5336             
5337         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5338         #  This function is provided for performance purpose. The complexity is O(n) with n
5339         #  the number of subobjects of aShape
5340         #  @param aShape Shape to get sub-shape of.
5341         #  @param aSubShapes Sub-shapes of aShape.
5342         #  @return list of IDs of found sub-shapes.
5343         #
5344         #  @ref swig_all_decompose "Example"
5345         def GetSubShapesIDs(self, aShape, aSubShapes):
5346             """
5347             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5348             This function is provided for performance purpose. The complexity is O(n) with n
5349             the number of subobjects of aShape
5350
5351             Parameters:
5352                aShape Shape to get sub-shape of.
5353                aSubShapes Sub-shapes of aShape.
5354
5355             Returns:
5356                List of IDs of found sub-shape.
5357             """
5358             # Example: see GEOM_TestAll.py
5359             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5360             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5361             return anIDs
5362
5363         # end of l4_access
5364         ## @}
5365
5366         ## @addtogroup l4_decompose
5367         ## @{
5368
5369         ## Get all sub-shapes and groups of \a theShape,
5370         #  that were created already by any other methods.
5371         #  @param theShape Any shape.
5372         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5373         #                       returned, else all found sub-shapes and groups.
5374         #  @return List of existing sub-objects of \a theShape.
5375         #
5376         #  @ref swig_all_decompose "Example"
5377         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5378             """
5379             Get all sub-shapes and groups of theShape,
5380             that were created already by any other methods.
5381
5382             Parameters:
5383                 theShape Any shape.
5384                 theGroupsOnly If this parameter is TRUE, only groups will be
5385                                  returned, else all found sub-shapes and groups.
5386
5387             Returns:
5388                 List of existing sub-objects of theShape.
5389             """
5390             # Example: see GEOM_TestAll.py
5391             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5392             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5393             return ListObj
5394
5395         ## Get all groups of \a theShape,
5396         #  that were created already by any other methods.
5397         #  @param theShape Any shape.
5398         #  @return List of existing groups of \a theShape.
5399         #
5400         #  @ref swig_all_decompose "Example"
5401         def GetGroups(self, theShape):
5402             """
5403             Get all groups of theShape,
5404             that were created already by any other methods.
5405
5406             Parameters:
5407                 theShape Any shape.
5408
5409             Returns:
5410                 List of existing groups of theShape.
5411             """
5412             # Example: see GEOM_TestAll.py
5413             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5414             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5415             return ListObj
5416
5417         ## Explode a shape on sub-shapes of a given type.
5418         #  If the shape itself matches the type, it is also returned.
5419         #  @param aShape Shape to be exploded.
5420         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
5421         #  @param theName Object name; when specified, this parameter is used
5422         #         for result publication in the study. Otherwise, if automatic
5423         #         publication is switched on, default value is used for result name.
5424         #
5425         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5426         #
5427         #  @ref swig_all_decompose "Example"
5428         def SubShapeAll(self, aShape, aType, theName=None):
5429             """
5430             Explode a shape on sub-shapes of a given type.
5431             If the shape itself matches the type, it is also returned.
5432
5433             Parameters:
5434                 aShape Shape to be exploded.
5435                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
5436                 theName Object name; when specified, this parameter is used
5437                         for result publication in the study. Otherwise, if automatic
5438                         publication is switched on, default value is used for result name.
5439
5440             Returns:
5441                 List of sub-shapes of type theShapeType, contained in theShape.
5442             """
5443             # Example: see GEOM_TestAll.py
5444             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5445             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5446             self._autoPublish(ListObj, theName, "subshape")
5447             return ListObj
5448
5449         ## Explode a shape on sub-shapes of a given type.
5450         #  @param aShape Shape to be exploded.
5451         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5452         #  @return List of IDs of sub-shapes.
5453         #
5454         #  @ref swig_all_decompose "Example"
5455         def SubShapeAllIDs(self, aShape, aType):
5456             """
5457             Explode a shape on sub-shapes of a given type.
5458
5459             Parameters:
5460                 aShape Shape to be exploded (see geompy.ShapeType)
5461                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5462
5463             Returns:
5464                 List of IDs of sub-shapes.
5465             """
5466             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5467             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5468             return ListObj
5469
5470         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5471         #  selected by they indices in list of all sub-shapes of type <VAR>aType</VAR>.
5472         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5473         #  @param aShape Shape to get sub-shape of.
5474         #  @param ListOfInd List of sub-shapes indices.
5475         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5476         #  @param theName Object name; when specified, this parameter is used
5477         #         for result publication in the study. Otherwise, if automatic
5478         #         publication is switched on, default value is used for result name.
5479         #
5480         #  @return A compound of sub-shapes of aShape.
5481         #
5482         #  @ref swig_all_decompose "Example"
5483         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5484             """
5485             Obtain a compound of sub-shapes of aShape,
5486             selected by they indices in list of all sub-shapes of type aType.
5487             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5488             
5489             Parameters:
5490                 aShape Shape to get sub-shape of.
5491                 ListOfID List of sub-shapes indices.
5492                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5493                 theName Object name; when specified, this parameter is used
5494                         for result publication in the study. Otherwise, if automatic
5495                         publication is switched on, default value is used for result name.
5496
5497             Returns:
5498                 A compound of sub-shapes of aShape.
5499             """
5500             # Example: see GEOM_TestAll.py
5501             ListOfIDs = []
5502             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5503             for ind in ListOfInd:
5504                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5505             # note: auto-publishing is done in self.GetSubShape()
5506             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5507             return anObj
5508
5509         ## Explode a shape on sub-shapes of a given type.
5510         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5511         #  If the shape itself matches the type, it is also returned.
5512         #  @param aShape Shape to be exploded.
5513         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5514         #  @param theName Object name; when specified, this parameter is used
5515         #         for result publication in the study. Otherwise, if automatic
5516         #         publication is switched on, default value is used for result name.
5517         #
5518         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5519         #
5520         #  @ref swig_SubShapeAllSorted "Example"
5521         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5522             """
5523             Explode a shape on sub-shapes of a given type.
5524             Sub-shapes will be sorted by coordinates of their gravity centers.
5525             If the shape itself matches the type, it is also returned.
5526
5527             Parameters: 
5528                 aShape Shape to be exploded.
5529                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5530                 theName Object name; when specified, this parameter is used
5531                         for result publication in the study. Otherwise, if automatic
5532                         publication is switched on, default value is used for result name.
5533
5534             Returns: 
5535                 List of sub-shapes of type theShapeType, contained in theShape.
5536             """
5537             # Example: see GEOM_TestAll.py
5538             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5539             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5540             self._autoPublish(ListObj, theName, "subshape")
5541             return ListObj
5542
5543         ## Explode a shape on sub-shapes of a given type.
5544         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5545         #  @param aShape Shape to be exploded.
5546         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5547         #  @return List of IDs of sub-shapes.
5548         #
5549         #  @ref swig_all_decompose "Example"
5550         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5551             """
5552             Explode a shape on sub-shapes of a given type.
5553             Sub-shapes will be sorted by coordinates of their gravity centers.
5554
5555             Parameters: 
5556                 aShape Shape to be exploded.
5557                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5558
5559             Returns: 
5560                 List of IDs of sub-shapes.
5561             """
5562             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5563             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5564             return ListIDs
5565
5566         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5567         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5568         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5569         #  @param aShape Shape to get sub-shape of.
5570         #  @param ListOfInd List of sub-shapes indices.
5571         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5572         #  @param theName Object name; when specified, this parameter is used
5573         #         for result publication in the study. Otherwise, if automatic
5574         #         publication is switched on, default value is used for result name.
5575         #
5576         #  @return A compound of sub-shapes of aShape.
5577         #
5578         #  @ref swig_all_decompose "Example"
5579         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5580             """
5581             Obtain a compound of sub-shapes of aShape,
5582             selected by they indices in sorted list of all sub-shapes of type aType.
5583             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5584
5585             Parameters:
5586                 aShape Shape to get sub-shape of.
5587                 ListOfID List of sub-shapes indices.
5588                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5589                 theName Object name; when specified, this parameter is used
5590                         for result publication in the study. Otherwise, if automatic
5591                         publication is switched on, default value is used for result name.
5592
5593             Returns:
5594                 A compound of sub-shapes of aShape.
5595             """
5596             # Example: see GEOM_TestAll.py
5597             ListOfIDs = []
5598             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5599             for ind in ListOfInd:
5600                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5601             # note: auto-publishing is done in self.GetSubShape()
5602             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5603             return anObj
5604
5605         ## Extract shapes (excluding the main shape) of given type.
5606         #  @param aShape The shape.
5607         #  @param aType  The shape type (see ShapeType())
5608         #  @param isSorted Boolean flag to switch sorting on/off.
5609         #  @param theName Object name; when specified, this parameter is used
5610         #         for result publication in the study. Otherwise, if automatic
5611         #         publication is switched on, default value is used for result name.
5612         #
5613         #  @return List of sub-shapes of type aType, contained in aShape.
5614         #
5615         #  @ref swig_FilletChamfer "Example"
5616         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
5617             """
5618             Extract shapes (excluding the main shape) of given type.
5619
5620             Parameters:
5621                 aShape The shape.
5622                 aType  The shape type (see geompy.ShapeType)
5623                 isSorted Boolean flag to switch sorting on/off.
5624                 theName Object name; when specified, this parameter is used
5625                         for result publication in the study. Otherwise, if automatic
5626                         publication is switched on, default value is used for result name.
5627
5628             Returns:     
5629                 List of sub-shapes of type aType, contained in aShape.
5630             """
5631             # Example: see GEOM_TestAll.py
5632             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
5633             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
5634             self._autoPublish(ListObj, theName, "subshape")
5635             return ListObj
5636
5637         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
5638         #  @param aShape Main shape.
5639         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
5640         #  @param theName Object name; when specified, this parameter is used
5641         #         for result publication in the study. Otherwise, if automatic
5642         #         publication is switched on, default value is used for result name.
5643         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5644         #
5645         #  @ref swig_all_decompose "Example"
5646         def SubShapes(self, aShape, anIDs, theName=None):
5647             """
5648             Get a set of sub-shapes defined by their unique IDs inside theMainShape
5649
5650             Parameters:
5651                 aShape Main shape.
5652                 anIDs List of unique IDs of sub-shapes inside theMainShape.
5653                 theName Object name; when specified, this parameter is used
5654                         for result publication in the study. Otherwise, if automatic
5655                         publication is switched on, default value is used for result name.
5656
5657             Returns:      
5658                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5659             """
5660             # Example: see GEOM_TestAll.py
5661             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
5662             RaiseIfFailed("SubShapes", self.ShapesOp)
5663             self._autoPublish(ListObj, theName, "subshape")
5664             return ListObj
5665
5666         # end of l4_decompose
5667         ## @}
5668
5669         ## @addtogroup l4_decompose_d
5670         ## @{
5671
5672         ## Deprecated method
5673         #  It works like SubShapeAllSortedCentres(), but wrongly
5674         #  defines centres of faces, shells and solids.
5675         def SubShapeAllSorted(self, aShape, aType, theName=None):
5676             """
5677             Deprecated method
5678             It works like geompy.SubShapeAllSortedCentres, but wrongly
5679             defines centres of faces, shells and solids.
5680             """
5681             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
5682             RaiseIfFailed("MakeExplode", self.ShapesOp)
5683             self._autoPublish(ListObj, theName, "subshape")
5684             return ListObj
5685
5686         ## Deprecated method
5687         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
5688         #  defines centres of faces, shells and solids.
5689         def SubShapeAllSortedIDs(self, aShape, aType):
5690             """
5691             Deprecated method
5692             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
5693             defines centres of faces, shells and solids.
5694             """
5695             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
5696             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5697             return ListIDs
5698
5699         ## Deprecated method
5700         #  It works like SubShapeSortedCentres(), but has a bug
5701         #  (wrongly defines centres of faces, shells and solids).
5702         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
5703             """
5704             Deprecated method
5705             It works like geompy.SubShapeSortedCentres, but has a bug
5706             (wrongly defines centres of faces, shells and solids).
5707             """
5708             ListOfIDs = []
5709             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
5710             for ind in ListOfInd:
5711                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5712             # note: auto-publishing is done in self.GetSubShape()
5713             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5714             return anObj
5715
5716         # end of l4_decompose_d
5717         ## @}
5718
5719         ## @addtogroup l3_healing
5720         ## @{
5721
5722         ## Apply a sequence of Shape Healing operators to the given object.
5723         #  @param theShape Shape to be processed.
5724         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5725         #  @param theParameters List of names of parameters
5726         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5727         #  @param theValues List of values of parameters, in the same order
5728         #                    as parameters are listed in <VAR>theParameters</VAR> list.
5729         #  @param theName Object name; when specified, this parameter is used
5730         #         for result publication in the study. Otherwise, if automatic
5731         #         publication is switched on, default value is used for result name.
5732         #
5733         #  <b> Operators and Parameters: </b> \n
5734         #
5735         #  * \b FixShape - corrects invalid shapes. \n
5736         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
5737         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
5738         #
5739         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
5740         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
5741         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
5742         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
5743         #
5744         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
5745         #    surfaces in segments using a certain angle. \n
5746         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5747         #    if Angle=180, four if Angle=90, etc). \n
5748         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
5749         #
5750         #  * \b SplitClosedFaces - splits closed faces in segments.
5751         #    The number of segments depends on the number of splitting points.\n
5752         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
5753         #
5754         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
5755         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
5756         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
5757         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
5758         #   This and the previous parameters can take the following values:\n
5759         #   \b Parametric \b Continuity \n
5760         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
5761         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
5762         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
5763         #    ruling out sharp edges).\n
5764         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
5765         #       are of the same magnitude).\n
5766         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
5767         #    or surfaces (d/du C(u)) are the same at junction. \n
5768         #   \b Geometric \b Continuity \n
5769         #   \b G1: first derivatives are proportional at junction.\n
5770         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
5771         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
5772         #   \b G2: first and second derivatives are proportional at junction.
5773         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
5774         #    continuity requires that the underlying parameterization was continuous as well.
5775         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
5776         #
5777         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
5778         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
5779         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
5780         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
5781         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
5782         #       with the specified parameters.\n
5783         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
5784         #       with the specified parameters.\n
5785         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
5786         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
5787         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
5788         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
5789         #
5790         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
5791         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
5792         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
5793         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
5794         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
5795         #
5796         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
5797         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
5798         #
5799         #
5800         #  @return New GEOM.GEOM_Object, containing processed shape.
5801         #
5802         #  \n @ref tui_shape_processing "Example"
5803         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
5804             """
5805             Apply a sequence of Shape Healing operators to the given object.
5806
5807             Parameters:
5808                 theShape Shape to be processed.
5809                 theValues List of values of parameters, in the same order
5810                           as parameters are listed in theParameters list.
5811                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5812                 theParameters List of names of parameters
5813                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5814                 theName Object name; when specified, this parameter is used
5815                         for result publication in the study. Otherwise, if automatic
5816                         publication is switched on, default value is used for result name.
5817
5818                 Operators and Parameters:
5819
5820                  * FixShape - corrects invalid shapes.
5821                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
5822                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
5823                  * FixFaceSize - removes small faces, such as spots and strips.
5824                      * FixFaceSize.Tolerance - defines minimum possible face size.
5825                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
5826                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
5827                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
5828                                 in segments using a certain angle.
5829                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5830                                           if Angle=180, four if Angle=90, etc).
5831                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
5832                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
5833                                       splitting points.
5834                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
5835                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
5836                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
5837                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
5838                      * SplitContinuity.CurveContinuity - required continuity for curves.
5839                        This and the previous parameters can take the following values:
5840                        
5841                        Parametric Continuity:
5842                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
5843                                                    coincidental. The curves or surfaces may still meet at an angle,
5844                                                    giving rise to a sharp corner or edge).
5845                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
5846                                                    are parallel, ruling out sharp edges).
5847                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
5848                                                   or surfaces are of the same magnitude).
5849                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
5850                           curves or surfaces (d/du C(u)) are the same at junction.
5851                           
5852                        Geometric Continuity:
5853                        G1: first derivatives are proportional at junction.
5854                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
5855                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
5856                        G2: first and second derivatives are proportional at junction. As the names imply,
5857                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
5858                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
5859                            geometric continuity of order n, but not vice-versa.
5860                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
5861                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
5862                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
5863                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
5864                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
5865                                                         the specified parameters.
5866                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
5867                                                         the specified parameters.
5868                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
5869                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
5870                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
5871                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
5872                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
5873                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
5874                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
5875                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
5876                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
5877                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
5878                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
5879
5880             Returns:
5881                 New GEOM.GEOM_Object, containing processed shape.
5882
5883             Note: For more information look through SALOME Geometry User's Guide->
5884                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
5885             """
5886             # Example: see GEOM_TestHealing.py
5887             theValues,Parameters = ParseList(theValues)
5888             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
5889             # To avoid script failure in case of good argument shape
5890             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
5891                 return theShape
5892             RaiseIfFailed("ProcessShape", self.HealOp)
5893             for string in (theOperators + theParameters):
5894                 Parameters = ":" + Parameters
5895                 pass
5896             anObj.SetParameters(Parameters)
5897             self._autoPublish(anObj, theName, "healed")
5898             return anObj
5899
5900         ## Remove faces from the given object (shape).
5901         #  @param theObject Shape to be processed.
5902         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
5903         #                  removes ALL faces of the given object.
5904         #  @param theName Object name; when specified, this parameter is used
5905         #         for result publication in the study. Otherwise, if automatic
5906         #         publication is switched on, default value is used for result name.
5907         #
5908         #  @return New GEOM.GEOM_Object, containing processed shape.
5909         #
5910         #  @ref tui_suppress_faces "Example"
5911         def SuppressFaces(self, theObject, theFaces, theName=None):
5912             """
5913             Remove faces from the given object (shape).
5914
5915             Parameters:
5916                 theObject Shape to be processed.
5917                 theFaces Indices of faces to be removed, if EMPTY then the method
5918                          removes ALL faces of the given object.
5919                 theName Object name; when specified, this parameter is used
5920                         for result publication in the study. Otherwise, if automatic
5921                         publication is switched on, default value is used for result name.
5922
5923             Returns:
5924                 New GEOM.GEOM_Object, containing processed shape.
5925             """
5926             # Example: see GEOM_TestHealing.py
5927             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
5928             RaiseIfFailed("SuppressFaces", self.HealOp)
5929             self._autoPublish(anObj, theName, "suppressFaces")
5930             return anObj
5931
5932         ## Sewing of some shapes into single shape.
5933         #  @param ListShape Shapes to be processed.
5934         #  @param theTolerance Required tolerance value.
5935         #  @param AllowNonManifold Flag that allows non-manifold sewing.
5936         #  @param theName Object name; when specified, this parameter is used
5937         #         for result publication in the study. Otherwise, if automatic
5938         #         publication is switched on, default value is used for result name.
5939         #
5940         #  @return New GEOM.GEOM_Object, containing processed shape.
5941         #
5942         #  @ref tui_sewing "Example"
5943         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
5944             """
5945             Sewing of some shapes into single shape.
5946
5947             Parameters:
5948                 ListShape Shapes to be processed.
5949                 theTolerance Required tolerance value.
5950                 AllowNonManifold Flag that allows non-manifold sewing.
5951                 theName Object name; when specified, this parameter is used
5952                         for result publication in the study. Otherwise, if automatic
5953                         publication is switched on, default value is used for result name.
5954
5955             Returns:
5956                 New GEOM.GEOM_Object, containing processed shape.
5957             """
5958             # Example: see GEOM_TestHealing.py
5959             comp = self.MakeCompound(ListShape)
5960             # note: auto-publishing is done in self.Sew()
5961             anObj = self.Sew(comp, theTolerance, AllowNonManifold, theName)
5962             return anObj
5963
5964         ## Sewing of the given object.
5965         #  @param theObject Shape to be processed.
5966         #  @param theTolerance Required tolerance value.
5967         #  @param AllowNonManifold Flag that allows non-manifold sewing.
5968         #  @param theName Object name; when specified, this parameter is used
5969         #         for result publication in the study. Otherwise, if automatic
5970         #         publication is switched on, default value is used for result name.
5971         #
5972         #  @return New GEOM.GEOM_Object, containing processed shape.
5973         def Sew(self, theObject, theTolerance, AllowNonManifold=False, theName=None):
5974             """
5975             Sewing of the given object.
5976
5977             Parameters:
5978                 theObject Shape to be processed.
5979                 theTolerance Required tolerance value.
5980                 AllowNonManifold Flag that allows non-manifold sewing.
5981                 theName Object name; when specified, this parameter is used
5982                         for result publication in the study. Otherwise, if automatic
5983                         publication is switched on, default value is used for result name.
5984
5985             Returns:
5986                 New GEOM.GEOM_Object, containing processed shape.
5987             """
5988             # Example: see MakeSewing() above
5989             theTolerance,Parameters = ParseParameters(theTolerance)
5990             if AllowNonManifold:
5991                 anObj = self.HealOp.SewAllowNonManifold(theObject, theTolerance)
5992             else:
5993                 anObj = self.HealOp.Sew(theObject, theTolerance)
5994             RaiseIfFailed("Sew", self.HealOp)
5995             anObj.SetParameters(Parameters)
5996             self._autoPublish(anObj, theName, "sewed")
5997             return anObj
5998
5999         ## Rebuild the topology of theCompound of solids by removing
6000         #  of the faces that are shared by several solids.
6001         #  @param theCompound Shape to be processed.
6002         #  @param theName Object name; when specified, this parameter is used
6003         #         for result publication in the study. Otherwise, if automatic
6004         #         publication is switched on, default value is used for result name.
6005         #
6006         #  @return New GEOM.GEOM_Object, containing processed shape.
6007         #
6008         #  @ref tui_remove_webs "Example"
6009         def RemoveInternalFaces (self, theCompound, theName=None):
6010             """
6011             Rebuild the topology of theCompound of solids by removing
6012             of the faces that are shared by several solids.
6013
6014             Parameters:
6015                 theCompound Shape to be processed.
6016                 theName Object name; when specified, this parameter is used
6017                         for result publication in the study. Otherwise, if automatic
6018                         publication is switched on, default value is used for result name.
6019
6020             Returns:
6021                 New GEOM.GEOM_Object, containing processed shape.
6022             """
6023             # Example: see GEOM_TestHealing.py
6024             anObj = self.HealOp.RemoveInternalFaces(theCompound)
6025             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6026             self._autoPublish(anObj, theName, "removeWebs")
6027             return anObj
6028
6029         ## Remove internal wires and edges from the given object (face).
6030         #  @param theObject Shape to be processed.
6031         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6032         #                  removes ALL internal wires of the given object.
6033         #  @param theName Object name; when specified, this parameter is used
6034         #         for result publication in the study. Otherwise, if automatic
6035         #         publication is switched on, default value is used for result name.
6036         #
6037         #  @return New GEOM.GEOM_Object, containing processed shape.
6038         #
6039         #  @ref tui_suppress_internal_wires "Example"
6040         def SuppressInternalWires(self, theObject, theWires, theName=None):
6041             """
6042             Remove internal wires and edges from the given object (face).
6043
6044             Parameters:
6045                 theObject Shape to be processed.
6046                 theWires Indices of wires to be removed, if EMPTY then the method
6047                          removes ALL internal wires of the given object.
6048                 theName Object name; when specified, this parameter is used
6049                         for result publication in the study. Otherwise, if automatic
6050                         publication is switched on, default value is used for result name.
6051
6052             Returns:                
6053                 New GEOM.GEOM_Object, containing processed shape.
6054             """
6055             # Example: see GEOM_TestHealing.py
6056             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6057             RaiseIfFailed("RemoveIntWires", self.HealOp)
6058             self._autoPublish(anObj, theName, "suppressWires")
6059             return anObj
6060
6061         ## Remove internal closed contours (holes) from the given object.
6062         #  @param theObject Shape to be processed.
6063         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6064         #                  removes ALL internal holes of the given object
6065         #  @param theName Object name; when specified, this parameter is used
6066         #         for result publication in the study. Otherwise, if automatic
6067         #         publication is switched on, default value is used for result name.
6068         #
6069         #  @return New GEOM.GEOM_Object, containing processed shape.
6070         #
6071         #  @ref tui_suppress_holes "Example"
6072         def SuppressHoles(self, theObject, theWires, theName=None):
6073             """
6074             Remove internal closed contours (holes) from the given object.
6075
6076             Parameters:
6077                 theObject Shape to be processed.
6078                 theWires Indices of wires to be removed, if EMPTY then the method
6079                          removes ALL internal holes of the given object
6080                 theName Object name; when specified, this parameter is used
6081                         for result publication in the study. Otherwise, if automatic
6082                         publication is switched on, default value is used for result name.
6083
6084             Returns:    
6085                 New GEOM.GEOM_Object, containing processed shape.
6086             """
6087             # Example: see GEOM_TestHealing.py
6088             anObj = self.HealOp.FillHoles(theObject, theWires)
6089             RaiseIfFailed("FillHoles", self.HealOp)
6090             self._autoPublish(anObj, theName, "suppressHoles")
6091             return anObj
6092
6093         ## Close an open wire.
6094         #  @param theObject Shape to be processed.
6095         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6096         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6097         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6098         #                        If False : closure by creation of an edge between ends.
6099         #  @param theName Object name; when specified, this parameter is used
6100         #         for result publication in the study. Otherwise, if automatic
6101         #         publication is switched on, default value is used for result name.
6102         #
6103         #  @return New GEOM.GEOM_Object, containing processed shape.
6104         #
6105         #  @ref tui_close_contour "Example"
6106         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6107             """
6108             Close an open wire.
6109
6110             Parameters: 
6111                 theObject Shape to be processed.
6112                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6113                          if [ ], then theObject itself is a wire.
6114                 isCommonVertex If True  : closure by creation of a common vertex,
6115                                If False : closure by creation of an edge between ends.
6116                 theName Object name; when specified, this parameter is used
6117                         for result publication in the study. Otherwise, if automatic
6118                         publication is switched on, default value is used for result name.
6119
6120             Returns:                      
6121                 New GEOM.GEOM_Object, containing processed shape. 
6122             """
6123             # Example: see GEOM_TestHealing.py
6124             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6125             RaiseIfFailed("CloseContour", self.HealOp)
6126             self._autoPublish(anObj, theName, "closeContour")
6127             return anObj
6128
6129         ## Addition of a point to a given edge object.
6130         #  @param theObject Shape to be processed.
6131         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6132         #                      if -1, then theObject itself is the edge.
6133         #  @param theValue Value of parameter on edge or length parameter,
6134         #                  depending on \a isByParameter.
6135         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6136         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6137         #  @param theName Object name; when specified, this parameter is used
6138         #         for result publication in the study. Otherwise, if automatic
6139         #         publication is switched on, default value is used for result name.
6140         #
6141         #  @return New GEOM.GEOM_Object, containing processed shape.
6142         #
6143         #  @ref tui_add_point_on_edge "Example"
6144         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6145             """
6146             Addition of a point to a given edge object.
6147
6148             Parameters: 
6149                 theObject Shape to be processed.
6150                 theEdgeIndex Index of edge to be divided within theObject's shape,
6151                              if -1, then theObject itself is the edge.
6152                 theValue Value of parameter on edge or length parameter,
6153                          depending on isByParameter.
6154                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6155                               if FALSE : theValue is treated as a length parameter [0..1]
6156                 theName Object name; when specified, this parameter is used
6157                         for result publication in the study. Otherwise, if automatic
6158                         publication is switched on, default value is used for result name.
6159
6160             Returns:  
6161                 New GEOM.GEOM_Object, containing processed shape.
6162             """
6163             # Example: see GEOM_TestHealing.py
6164             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6165             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6166             RaiseIfFailed("DivideEdge", self.HealOp)
6167             anObj.SetParameters(Parameters)
6168             self._autoPublish(anObj, theName, "divideEdge")
6169             return anObj
6170
6171         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6172         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6173         #  @param theVertices A list of vertices to suppress. If the list
6174         #                     is empty, all vertices in a wire will be assumed.
6175         #  @param theName Object name; when specified, this parameter is used
6176         #         for result publication in the study. Otherwise, if automatic
6177         #         publication is switched on, default value is used for result name.
6178         #
6179         #  @return New GEOM.GEOM_Object with modified wire.
6180         #
6181         #  @ref tui_fuse_collinear_edges "Example"
6182         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6183             """
6184             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6185
6186             Parameters: 
6187                 theWire Wire to minimize the number of C1 continuous edges in.
6188                 theVertices A list of vertices to suppress. If the list
6189                             is empty, all vertices in a wire will be assumed.
6190                 theName Object name; when specified, this parameter is used
6191                         for result publication in the study. Otherwise, if automatic
6192                         publication is switched on, default value is used for result name.
6193
6194             Returns:  
6195                 New GEOM.GEOM_Object with modified wire.
6196             """
6197             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6198             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6199             self._autoPublish(anObj, theName, "fuseEdges")
6200             return anObj
6201
6202         ## Change orientation of the given object. Updates given shape.
6203         #  @param theObject Shape to be processed.
6204         #  @return Updated <var>theObject</var>
6205         #
6206         #  @ref swig_todo "Example"
6207         def ChangeOrientationShell(self,theObject):
6208             """
6209             Change orientation of the given object. Updates given shape.
6210
6211             Parameters: 
6212                 theObject Shape to be processed.
6213
6214             Returns:  
6215                 Updated theObject
6216             """
6217             theObject = self.HealOp.ChangeOrientation(theObject)
6218             RaiseIfFailed("ChangeOrientation", self.HealOp)
6219             pass
6220
6221         ## Change orientation of the given object.
6222         #  @param theObject Shape to be processed.
6223         #  @param theName Object name; when specified, this parameter is used
6224         #         for result publication in the study. Otherwise, if automatic
6225         #         publication is switched on, default value is used for result name.
6226         #
6227         #  @return New GEOM.GEOM_Object, containing processed shape.
6228         #
6229         #  @ref swig_todo "Example"
6230         def ChangeOrientationShellCopy(self, theObject, theName=None):
6231             """
6232             Change orientation of the given object.
6233
6234             Parameters:
6235                 theObject Shape to be processed.
6236                 theName Object name; when specified, this parameter is used
6237                         for result publication in the study. Otherwise, if automatic
6238                         publication is switched on, default value is used for result name.
6239
6240             Returns:   
6241                 New GEOM.GEOM_Object, containing processed shape.
6242             """
6243             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6244             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6245             self._autoPublish(anObj, theName, "reversed")
6246             return anObj
6247
6248         ## Try to limit tolerance of the given object by value \a theTolerance.
6249         #  @param theObject Shape to be processed.
6250         #  @param theTolerance Required tolerance value.
6251         #  @param theName Object name; when specified, this parameter is used
6252         #         for result publication in the study. Otherwise, if automatic
6253         #         publication is switched on, default value is used for result name.
6254         #
6255         #  @return New GEOM.GEOM_Object, containing processed shape.
6256         #
6257         #  @ref tui_limit_tolerance "Example"
6258         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6259             """
6260             Try to limit tolerance of the given object by value theTolerance.
6261
6262             Parameters:
6263                 theObject Shape to be processed.
6264                 theTolerance Required tolerance value.
6265                 theName Object name; when specified, this parameter is used
6266                         for result publication in the study. Otherwise, if automatic
6267                         publication is switched on, default value is used for result name.
6268
6269             Returns:   
6270                 New GEOM.GEOM_Object, containing processed shape.
6271             """
6272             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6273             RaiseIfFailed("LimitTolerance", self.HealOp)
6274             self._autoPublish(anObj, theName, "limitTolerance")
6275             return anObj
6276
6277         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6278         #  that constitute a free boundary of the given shape.
6279         #  @param theObject Shape to get free boundary of.
6280         #  @param theName Object name; when specified, this parameter is used
6281         #         for result publication in the study. Otherwise, if automatic
6282         #         publication is switched on, default value is used for result name.
6283         #
6284         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6285         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6286         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6287         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6288         #
6289         #  @ref tui_measurement_tools_page "Example"
6290         def GetFreeBoundary(self, theObject, theName=None):
6291             """
6292             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6293             that constitute a free boundary of the given shape.
6294
6295             Parameters:
6296                 theObject Shape to get free boundary of.
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                 [status, theClosedWires, theOpenWires]
6303                  status: FALSE, if an error(s) occured during the method execution.
6304                  theClosedWires: Closed wires on the free boundary of the given shape.
6305                  theOpenWires: Open wires on the free boundary of the given shape.
6306             """
6307             # Example: see GEOM_TestHealing.py
6308             anObj = self.HealOp.GetFreeBoundary(theObject)
6309             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6310             self._autoPublish(anObj[1], theName, "closedWire")
6311             self._autoPublish(anObj[2], theName, "openWire")
6312             return anObj
6313
6314         ## Replace coincident faces in theShape by one face.
6315         #  @param theShape Initial shape.
6316         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6317         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6318         #                         otherwise all initial shapes.
6319         #  @param theName Object name; when specified, this parameter is used
6320         #         for result publication in the study. Otherwise, if automatic
6321         #         publication is switched on, default value is used for result name.
6322         #
6323         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6324         #
6325         #  @ref tui_glue_faces "Example"
6326         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6327             """
6328             Replace coincident faces in theShape by one face.
6329
6330             Parameters:
6331                 theShape Initial shape.
6332                 theTolerance Maximum distance between faces, which can be considered as coincident.
6333                 doKeepNonSolids If FALSE, only solids will present in the result,
6334                                 otherwise all initial shapes.
6335                 theName Object name; when specified, this parameter is used
6336                         for result publication in the study. Otherwise, if automatic
6337                         publication is switched on, default value is used for result name.
6338
6339             Returns:
6340                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6341             """
6342             # Example: see GEOM_Spanner.py
6343             theTolerance,Parameters = ParseParameters(theTolerance)
6344             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6345             if anObj is None:
6346                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6347             anObj.SetParameters(Parameters)
6348             self._autoPublish(anObj, theName, "glueFaces")
6349             return anObj
6350
6351         ## Find coincident faces in theShape for possible gluing.
6352         #  @param theShape Initial shape.
6353         #  @param theTolerance Maximum distance between faces,
6354         #                      which can be considered as coincident.
6355         #  @param theName Object name; when specified, this parameter is used
6356         #         for result publication in the study. Otherwise, if automatic
6357         #         publication is switched on, default value is used for result name.
6358         #
6359         #  @return GEOM.ListOfGO
6360         #
6361         #  @ref tui_glue_faces "Example"
6362         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6363             """
6364             Find coincident faces in theShape for possible gluing.
6365
6366             Parameters:
6367                 theShape Initial shape.
6368                 theTolerance Maximum distance between faces,
6369                              which can be considered as coincident.
6370                 theName Object name; when specified, this parameter is used
6371                         for result publication in the study. Otherwise, if automatic
6372                         publication is switched on, default value is used for result name.
6373
6374             Returns:                    
6375                 GEOM.ListOfGO
6376             """
6377             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6378             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6379             self._autoPublish(anObj, theName, "facesToGlue")
6380             return anObj
6381
6382         ## Replace coincident faces in theShape by one face
6383         #  in compliance with given list of faces
6384         #  @param theShape Initial shape.
6385         #  @param theTolerance Maximum distance between faces,
6386         #                      which can be considered as coincident.
6387         #  @param theFaces List of faces for gluing.
6388         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6389         #                         otherwise all initial shapes.
6390         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6391         #                        will be glued, otherwise only the edges,
6392         #                        belonging to <VAR>theFaces</VAR>.
6393         #  @param theName Object name; when specified, this parameter is used
6394         #         for result publication in the study. Otherwise, if automatic
6395         #         publication is switched on, default value is used for result name.
6396         #
6397         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6398         #          without some faces.
6399         #
6400         #  @ref tui_glue_faces "Example"
6401         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6402                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6403             """
6404             Replace coincident faces in theShape by one face
6405             in compliance with given list of faces
6406
6407             Parameters:
6408                 theShape Initial shape.
6409                 theTolerance Maximum distance between faces,
6410                              which can be considered as coincident.
6411                 theFaces List of faces for gluing.
6412                 doKeepNonSolids If FALSE, only solids will present in the result,
6413                                 otherwise all initial shapes.
6414                 doGlueAllEdges If TRUE, all coincident edges of theShape
6415                                will be glued, otherwise only the edges,
6416                                belonging to theFaces.
6417                 theName Object name; when specified, this parameter is used
6418                         for result publication in the study. Otherwise, if automatic
6419                         publication is switched on, default value is used for result name.
6420
6421             Returns:
6422                 New GEOM.GEOM_Object, containing a copy of theShape
6423                     without some faces.
6424             """
6425             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6426                                                       doKeepNonSolids, doGlueAllEdges)
6427             if anObj is None:
6428                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6429             self._autoPublish(anObj, theName, "glueFaces")
6430             return anObj
6431
6432         ## Replace coincident edges in theShape by one edge.
6433         #  @param theShape Initial shape.
6434         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6435         #  @param theName Object name; when specified, this parameter is used
6436         #         for result publication in the study. Otherwise, if automatic
6437         #         publication is switched on, default value is used for result name.
6438         #
6439         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6440         #
6441         #  @ref tui_glue_edges "Example"
6442         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6443             """
6444             Replace coincident edges in theShape by one edge.
6445
6446             Parameters:
6447                 theShape Initial shape.
6448                 theTolerance Maximum distance between edges, which can be considered as coincident.
6449                 theName Object name; when specified, this parameter is used
6450                         for result publication in the study. Otherwise, if automatic
6451                         publication is switched on, default value is used for result name.
6452
6453             Returns:    
6454                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6455             """
6456             theTolerance,Parameters = ParseParameters(theTolerance)
6457             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6458             if anObj is None:
6459                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6460             anObj.SetParameters(Parameters)
6461             self._autoPublish(anObj, theName, "glueEdges")
6462             return anObj
6463
6464         ## Find coincident edges in theShape for possible gluing.
6465         #  @param theShape Initial shape.
6466         #  @param theTolerance Maximum distance between edges,
6467         #                      which can be considered as coincident.
6468         #  @param theName Object name; when specified, this parameter is used
6469         #         for result publication in the study. Otherwise, if automatic
6470         #         publication is switched on, default value is used for result name.
6471         #
6472         #  @return GEOM.ListOfGO
6473         #
6474         #  @ref tui_glue_edges "Example"
6475         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6476             """
6477             Find coincident edges in theShape for possible gluing.
6478
6479             Parameters:
6480                 theShape Initial shape.
6481                 theTolerance Maximum distance between edges,
6482                              which can be considered as coincident.
6483                 theName Object name; when specified, this parameter is used
6484                         for result publication in the study. Otherwise, if automatic
6485                         publication is switched on, default value is used for result name.
6486
6487             Returns:                         
6488                 GEOM.ListOfGO
6489             """
6490             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6491             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6492             self._autoPublish(anObj, theName, "edgesToGlue")
6493             return anObj
6494
6495         ## Replace coincident edges in theShape by one edge
6496         #  in compliance with given list of edges.
6497         #  @param theShape Initial shape.
6498         #  @param theTolerance Maximum distance between edges,
6499         #                      which can be considered as coincident.
6500         #  @param theEdges List of edges for gluing.
6501         #  @param theName Object name; when specified, this parameter is used
6502         #         for result publication in the study. Otherwise, if automatic
6503         #         publication is switched on, default value is used for result name.
6504         #
6505         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6506         #          without some edges.
6507         #
6508         #  @ref tui_glue_edges "Example"
6509         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6510             """
6511             Replace coincident edges in theShape by one edge
6512             in compliance with given list of edges.
6513
6514             Parameters:
6515                 theShape Initial shape.
6516                 theTolerance Maximum distance between edges,
6517                              which can be considered as coincident.
6518                 theEdges List of edges for gluing.
6519                 theName Object name; when specified, this parameter is used
6520                         for result publication in the study. Otherwise, if automatic
6521                         publication is switched on, default value is used for result name.
6522
6523             Returns:  
6524                 New GEOM.GEOM_Object, containing a copy of theShape
6525                 without some edges.
6526             """
6527             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6528             if anObj is None:
6529                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6530             self._autoPublish(anObj, theName, "glueEdges")
6531             return anObj
6532
6533         # end of l3_healing
6534         ## @}
6535
6536         ## @addtogroup l3_boolean Boolean Operations
6537         ## @{
6538
6539         # -----------------------------------------------------------------------------
6540         # Boolean (Common, Cut, Fuse, Section)
6541         # -----------------------------------------------------------------------------
6542
6543         ## Perform one of boolean operations on two given shapes.
6544         #  @param theShape1 First argument for boolean operation.
6545         #  @param theShape2 Second argument for boolean operation.
6546         #  @param theOperation Indicates the operation to be done:\n
6547         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6548         #  @param theName Object name; when specified, this parameter is used
6549         #         for result publication in the study. Otherwise, if automatic
6550         #         publication is switched on, default value is used for result name.
6551         #
6552         #  @return New GEOM.GEOM_Object, containing the result shape.
6553         #
6554         #  @ref tui_fuse "Example"
6555         def MakeBoolean(self, theShape1, theShape2, theOperation, theName=None):
6556             """
6557             Perform one of boolean operations on two given shapes.
6558
6559             Parameters: 
6560                 theShape1 First argument for boolean operation.
6561                 theShape2 Second argument for boolean operation.
6562                 theOperation Indicates the operation to be done:
6563                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6564                 theName Object name; when specified, this parameter is used
6565                         for result publication in the study. Otherwise, if automatic
6566                         publication is switched on, default value is used for result name.
6567
6568             Returns:   
6569                 New GEOM.GEOM_Object, containing the result shape.
6570             """
6571             # Example: see GEOM_TestAll.py
6572             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation)
6573             RaiseIfFailed("MakeBoolean", self.BoolOp)
6574             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
6575             self._autoPublish(anObj, theName, def_names[theOperation])
6576             return anObj
6577
6578         ## Perform Common boolean operation on two given shapes.
6579         #  @param theShape1 First argument for boolean operation.
6580         #  @param theShape2 Second argument for boolean operation.
6581         #  @param theName Object name; when specified, this parameter is used
6582         #         for result publication in the study. Otherwise, if automatic
6583         #         publication is switched on, default value is used for result name.
6584         #
6585         #  @return New GEOM.GEOM_Object, containing the result shape.
6586         #
6587         #  @ref tui_common "Example 1"
6588         #  \n @ref swig_MakeCommon "Example 2"
6589         def MakeCommon(self, theShape1, theShape2, theName=None):
6590             """
6591             Perform Common boolean operation on two given shapes.
6592
6593             Parameters: 
6594                 theShape1 First argument for boolean operation.
6595                 theShape2 Second argument for boolean operation.
6596                 theName Object name; when specified, this parameter is used
6597                         for result publication in the study. Otherwise, if automatic
6598                         publication is switched on, default value is used for result name.
6599
6600             Returns:   
6601                 New GEOM.GEOM_Object, containing the result shape.
6602             """
6603             # Example: see GEOM_TestOthers.py
6604             # note: auto-publishing is done in self.MakeBoolean()
6605             return self.MakeBoolean(theShape1, theShape2, 1, theName)
6606
6607         ## Perform Cut boolean operation on two given shapes.
6608         #  @param theShape1 First argument for boolean operation.
6609         #  @param theShape2 Second argument for boolean operation.
6610         #  @param theName Object name; when specified, this parameter is used
6611         #         for result publication in the study. Otherwise, if automatic
6612         #         publication is switched on, default value is used for result name.
6613         #
6614         #  @return New GEOM.GEOM_Object, containing the result shape.
6615         #
6616         #  @ref tui_cut "Example 1"
6617         #  \n @ref swig_MakeCommon "Example 2"
6618         def MakeCut(self, theShape1, theShape2, theName=None):
6619             """
6620             Perform Cut boolean operation on two given shapes.
6621
6622             Parameters: 
6623                 theShape1 First argument for boolean operation.
6624                 theShape2 Second argument for boolean operation.
6625                 theName Object name; when specified, this parameter is used
6626                         for result publication in the study. Otherwise, if automatic
6627                         publication is switched on, default value is used for result name.
6628
6629             Returns:   
6630                 New GEOM.GEOM_Object, containing the result shape.
6631             
6632             """
6633             # Example: see GEOM_TestOthers.py
6634             # note: auto-publishing is done in self.MakeBoolean()
6635             return self.MakeBoolean(theShape1, theShape2, 2, theName)
6636
6637         ## Perform Fuse boolean operation on two given shapes.
6638         #  @param theShape1 First argument for boolean operation.
6639         #  @param theShape2 Second argument for boolean operation.
6640         #  @param theName Object name; when specified, this parameter is used
6641         #         for result publication in the study. Otherwise, if automatic
6642         #         publication is switched on, default value is used for result name.
6643         #
6644         #  @return New GEOM.GEOM_Object, containing the result shape.
6645         #
6646         #  @ref tui_fuse "Example 1"
6647         #  \n @ref swig_MakeCommon "Example 2"
6648         def MakeFuse(self, theShape1, theShape2, theName=None):
6649             """
6650             Perform Fuse boolean operation on two given shapes.
6651
6652             Parameters: 
6653                 theShape1 First argument for boolean operation.
6654                 theShape2 Second argument for boolean operation.
6655                 theName Object name; when specified, this parameter is used
6656                         for result publication in the study. Otherwise, if automatic
6657                         publication is switched on, default value is used for result name.
6658
6659             Returns:   
6660                 New GEOM.GEOM_Object, containing the result shape.
6661             
6662             """
6663             # Example: see GEOM_TestOthers.py
6664             # note: auto-publishing is done in self.MakeBoolean()
6665             return self.MakeBoolean(theShape1, theShape2, 3, theName)
6666
6667         ## Perform Section boolean operation on two given shapes.
6668         #  @param theShape1 First argument for boolean operation.
6669         #  @param theShape2 Second argument for boolean operation.
6670         #  @param theName Object name; when specified, this parameter is used
6671         #         for result publication in the study. Otherwise, if automatic
6672         #         publication is switched on, default value is used for result name.
6673         #
6674         #  @return New GEOM.GEOM_Object, containing the result shape.
6675         #
6676         #  @ref tui_section "Example 1"
6677         #  \n @ref swig_MakeCommon "Example 2"
6678         def MakeSection(self, theShape1, theShape2, theName=None):
6679             """
6680             Perform Section boolean operation on two given shapes.
6681
6682             Parameters: 
6683                 theShape1 First argument for boolean operation.
6684                 theShape2 Second argument for boolean operation.
6685                 theName Object name; when specified, this parameter is used
6686                         for result publication in the study. Otherwise, if automatic
6687                         publication is switched on, default value is used for result name.
6688
6689             Returns:   
6690                 New GEOM.GEOM_Object, containing the result shape.
6691             
6692             """
6693             # Example: see GEOM_TestOthers.py
6694             # note: auto-publishing is done in self.MakeBoolean()
6695             return self.MakeBoolean(theShape1, theShape2, 4, theName)
6696
6697         ## Perform Fuse boolean operation on the list of shapes.
6698         #  @param theShapesList Shapes to be fused.
6699         #  @param theName Object name; when specified, this parameter is used
6700         #         for result publication in the study. Otherwise, if automatic
6701         #         publication is switched on, default value is used for result name.
6702         #
6703         #  @return New GEOM.GEOM_Object, containing the result shape.
6704         #
6705         #  @ref tui_fuse "Example 1"
6706         #  \n @ref swig_MakeCommon "Example 2"
6707         def MakeFuseList(self, theShapesList, theName=None):
6708             """
6709             Perform Fuse boolean operation on the list of shapes.
6710
6711             Parameters: 
6712                 theShapesList Shapes to be fused.
6713                 theName Object name; when specified, this parameter is used
6714                         for result publication in the study. Otherwise, if automatic
6715                         publication is switched on, default value is used for result name.
6716
6717             Returns:   
6718                 New GEOM.GEOM_Object, containing the result shape.
6719             
6720             """
6721             # Example: see GEOM_TestOthers.py
6722             anObj = self.BoolOp.MakeFuseList(theShapesList)
6723             RaiseIfFailed("MakeFuseList", self.BoolOp)
6724             self._autoPublish(anObj, theName, "fuse")
6725             return anObj
6726
6727         ## Perform Common boolean operation on the list of shapes.
6728         #  @param theShapesList Shapes for Common operation.
6729         #  @param theName Object name; when specified, this parameter is used
6730         #         for result publication in the study. Otherwise, if automatic
6731         #         publication is switched on, default value is used for result name.
6732         #
6733         #  @return New GEOM.GEOM_Object, containing the result shape.
6734         #
6735         #  @ref tui_common "Example 1"
6736         #  \n @ref swig_MakeCommon "Example 2"
6737         def MakeCommonList(self, theShapesList, theName=None):
6738             """
6739             Perform Common boolean operation on the list of shapes.
6740
6741             Parameters: 
6742                 theShapesList Shapes for Common operation.
6743                 theName Object name; when specified, this parameter is used
6744                         for result publication in the study. Otherwise, if automatic
6745                         publication is switched on, default value is used for result name.
6746
6747             Returns:   
6748                 New GEOM.GEOM_Object, containing the result shape.
6749             
6750             """
6751             # Example: see GEOM_TestOthers.py
6752             anObj = self.BoolOp.MakeCommonList(theShapesList)
6753             RaiseIfFailed("MakeCommonList", self.BoolOp)
6754             self._autoPublish(anObj, theName, "common")
6755             return anObj
6756
6757         ## Perform Cut boolean operation on one object and the list of tools.
6758         #  @param theMainShape The object of the operation.
6759         #  @param theShapesList The list of tools of the operation.
6760         #  @param theName Object name; when specified, this parameter is used
6761         #         for result publication in the study. Otherwise, if automatic
6762         #         publication is switched on, default value is used for result name.
6763         #
6764         #  @return New GEOM.GEOM_Object, containing the result shape.
6765         #
6766         #  @ref tui_cut "Example 1"
6767         #  \n @ref swig_MakeCommon "Example 2"
6768         def MakeCutList(self, theMainShape, theShapesList, theName=None):
6769             """
6770             Perform Cut boolean operation on one object and the list of tools.
6771
6772             Parameters: 
6773                 theMainShape The object of the operation.
6774                 theShapesList The list of tools of the operation.
6775                 theName Object name; when specified, this parameter is used
6776                         for result publication in the study. Otherwise, if automatic
6777                         publication is switched on, default value is used for result name.
6778
6779             Returns:   
6780                 New GEOM.GEOM_Object, containing the result shape.
6781             
6782             """
6783             # Example: see GEOM_TestOthers.py
6784             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList)
6785             RaiseIfFailed("MakeCutList", self.BoolOp)
6786             self._autoPublish(anObj, theName, "cut")
6787             return anObj
6788
6789         # end of l3_boolean
6790         ## @}
6791
6792         ## @addtogroup l3_basic_op
6793         ## @{
6794
6795         ## Perform partition operation.
6796         #  @param ListShapes Shapes to be intersected.
6797         #  @param ListTools Shapes to intersect theShapes.
6798         #  @param Limit Type of resulting shapes (see ShapeType()).\n
6799         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
6800         #         type will be detected automatically.
6801         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
6802         #                             target type (equal to Limit) are kept in the result,
6803         #                             else standalone shapes of lower dimension
6804         #                             are kept also (if they exist).
6805         #  @param theName Object name; when specified, this parameter is used
6806         #         for result publication in the study. Otherwise, if automatic
6807         #         publication is switched on, default value is used for result name.
6808         #
6809         #  @note Each compound from ListShapes and ListTools will be exploded
6810         #        in order to avoid possible intersection between shapes from this compound.
6811         #
6812         #  After implementation new version of PartitionAlgo (October 2006)
6813         #  other parameters are ignored by current functionality. They are kept
6814         #  in this function only for support old versions.
6815         #      @param ListKeepInside Shapes, outside which the results will be deleted.
6816         #         Each shape from theKeepInside must belong to theShapes also.
6817         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
6818         #         Each shape from theRemoveInside must belong to theShapes also.
6819         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
6820         #      @param ListMaterials Material indices for each shape. Make sence,
6821         #         only if theRemoveWebs is TRUE.
6822         #
6823         #  @return New GEOM.GEOM_Object, containing the result shapes.
6824         #
6825         #  @ref tui_partition "Example"
6826         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6827                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6828                           KeepNonlimitShapes=0, theName=None):
6829             """
6830             Perform partition operation.
6831
6832             Parameters: 
6833                 ListShapes Shapes to be intersected.
6834                 ListTools Shapes to intersect theShapes.
6835                 Limit Type of resulting shapes (see geompy.ShapeType)
6836                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
6837                       type will be detected automatically.
6838                 KeepNonlimitShapes if this parameter == 0, then only shapes of
6839                                     target type (equal to Limit) are kept in the result,
6840                                     else standalone shapes of lower dimension
6841                                     are kept also (if they exist).
6842                 theName Object name; when specified, this parameter is used
6843                         for result publication in the study. Otherwise, if automatic
6844                         publication is switched on, default value is used for result name.
6845             Note:
6846                     Each compound from ListShapes and ListTools will be exploded
6847                     in order to avoid possible intersection between shapes from
6848                     this compound.
6849                     
6850             After implementation new version of PartitionAlgo (October 2006) other
6851             parameters are ignored by current functionality. They are kept in this
6852             function only for support old versions.
6853             
6854             Ignored parameters:
6855                 ListKeepInside Shapes, outside which the results will be deleted.
6856                                Each shape from theKeepInside must belong to theShapes also.
6857                 ListRemoveInside Shapes, inside which the results will be deleted.
6858                                  Each shape from theRemoveInside must belong to theShapes also.
6859                 RemoveWebs If TRUE, perform Glue 3D algorithm.
6860                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
6861
6862             Returns:   
6863                 New GEOM.GEOM_Object, containing the result shapes.
6864             """
6865             # Example: see GEOM_TestAll.py
6866             if Limit == self.ShapeType["AUTO"]:
6867                 # automatic detection of the most appropriate shape limit type
6868                 lim = GEOM.SHAPE
6869                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6870                 Limit = EnumToLong(lim)
6871                 pass
6872             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
6873                                               ListKeepInside, ListRemoveInside,
6874                                               Limit, RemoveWebs, ListMaterials,
6875                                               KeepNonlimitShapes);
6876             RaiseIfFailed("MakePartition", self.BoolOp)
6877             self._autoPublish(anObj, theName, "partition")
6878             return anObj
6879
6880         ## Perform partition operation.
6881         #  This method may be useful if it is needed to make a partition for
6882         #  compound contains nonintersected shapes. Performance will be better
6883         #  since intersection between shapes from compound is not performed.
6884         #
6885         #  Description of all parameters as in previous method MakePartition()
6886         #
6887         #  @note Passed compounds (via ListShapes or via ListTools)
6888         #           have to consist of nonintersecting shapes.
6889         #
6890         #  @return New GEOM.GEOM_Object, containing the result shapes.
6891         #
6892         #  @ref swig_todo "Example"
6893         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
6894                                                  ListKeepInside=[], ListRemoveInside=[],
6895                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
6896                                                  ListMaterials=[], KeepNonlimitShapes=0,
6897                                                  theName=None):
6898             """
6899             Perform partition operation.
6900             This method may be useful if it is needed to make a partition for
6901             compound contains nonintersected shapes. Performance will be better
6902             since intersection between shapes from compound is not performed.
6903
6904             Parameters: 
6905                 Description of all parameters as in method geompy.MakePartition
6906         
6907             NOTE:
6908                 Passed compounds (via ListShapes or via ListTools)
6909                 have to consist of nonintersecting shapes.
6910
6911             Returns:   
6912                 New GEOM.GEOM_Object, containing the result shapes.
6913             """
6914             if Limit == self.ShapeType["AUTO"]:
6915                 # automatic detection of the most appropriate shape limit type
6916                 lim = GEOM.SHAPE
6917                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6918                 Limit = EnumToLong(lim)
6919                 pass
6920             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
6921                                                                      ListKeepInside, ListRemoveInside,
6922                                                                      Limit, RemoveWebs, ListMaterials,
6923                                                                      KeepNonlimitShapes);
6924             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
6925             self._autoPublish(anObj, theName, "partition")
6926             return anObj
6927
6928         ## See method MakePartition() for more information.
6929         #
6930         #  @ref tui_partition "Example 1"
6931         #  \n @ref swig_Partition "Example 2"
6932         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6933                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6934                       KeepNonlimitShapes=0, theName=None):
6935             """
6936             See method geompy.MakePartition for more information.
6937             """
6938             # Example: see GEOM_TestOthers.py
6939             # note: auto-publishing is done in self.MakePartition()
6940             anObj = self.MakePartition(ListShapes, ListTools,
6941                                        ListKeepInside, ListRemoveInside,
6942                                        Limit, RemoveWebs, ListMaterials,
6943                                        KeepNonlimitShapes, theName);
6944             return anObj
6945
6946         ## Perform partition of the Shape with the Plane
6947         #  @param theShape Shape to be intersected.
6948         #  @param thePlane Tool shape, to intersect theShape.
6949         #  @param theName Object name; when specified, this parameter is used
6950         #         for result publication in the study. Otherwise, if automatic
6951         #         publication is switched on, default value is used for result name.
6952         #
6953         #  @return New GEOM.GEOM_Object, containing the result shape.
6954         #
6955         #  @ref tui_partition "Example"
6956         def MakeHalfPartition(self, theShape, thePlane, theName=None):
6957             """
6958             Perform partition of the Shape with the Plane
6959
6960             Parameters: 
6961                 theShape Shape to be intersected.
6962                 thePlane Tool shape, to intersect theShape.
6963                 theName Object name; when specified, this parameter is used
6964                         for result publication in the study. Otherwise, if automatic
6965                         publication is switched on, default value is used for result name.
6966
6967             Returns:  
6968                 New GEOM.GEOM_Object, containing the result shape.
6969             """
6970             # Example: see GEOM_TestAll.py
6971             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
6972             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
6973             self._autoPublish(anObj, theName, "partition")
6974             return anObj
6975
6976         # end of l3_basic_op
6977         ## @}
6978
6979         ## @addtogroup l3_transform
6980         ## @{
6981
6982         ## Translate the given object along the vector, specified
6983         #  by its end points.
6984         #  @param theObject The object to be translated.
6985         #  @param thePoint1 Start point of translation vector.
6986         #  @param thePoint2 End point of translation vector.
6987         #  @param theCopy Flag used to translate object itself or create a copy.
6988         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
6989         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
6990         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
6991             """
6992             Translate the given object along the vector, specified by its end points.
6993
6994             Parameters: 
6995                 theObject The object to be translated.
6996                 thePoint1 Start point of translation vector.
6997                 thePoint2 End point of translation vector.
6998                 theCopy Flag used to translate object itself or create a copy.
6999
7000             Returns: 
7001                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7002                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7003             """
7004             if theCopy:
7005                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7006             else:
7007                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7008             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7009             return anObj
7010
7011         ## Translate the given object along the vector, specified
7012         #  by its end points, creating its copy before the translation.
7013         #  @param theObject The object to be translated.
7014         #  @param thePoint1 Start point of translation vector.
7015         #  @param thePoint2 End point of translation vector.
7016         #  @param theName Object name; when specified, this parameter is used
7017         #         for result publication in the study. Otherwise, if automatic
7018         #         publication is switched on, default value is used for result name.
7019         #
7020         #  @return New GEOM.GEOM_Object, containing the translated object.
7021         #
7022         #  @ref tui_translation "Example 1"
7023         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7024         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7025             """
7026             Translate the given object along the vector, specified
7027             by its end points, creating its copy before the translation.
7028
7029             Parameters: 
7030                 theObject The object to be translated.
7031                 thePoint1 Start point of translation vector.
7032                 thePoint2 End point of translation vector.
7033                 theName Object name; when specified, this parameter is used
7034                         for result publication in the study. Otherwise, if automatic
7035                         publication is switched on, default value is used for result name.
7036
7037             Returns:  
7038                 New GEOM.GEOM_Object, containing the translated object.
7039             """
7040             # Example: see GEOM_TestAll.py
7041             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7042             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7043             self._autoPublish(anObj, theName, "translated")
7044             return anObj
7045
7046         ## Translate the given object along the vector, specified by its components.
7047         #  @param theObject The object to be translated.
7048         #  @param theDX,theDY,theDZ Components of translation vector.
7049         #  @param theCopy Flag used to translate object itself or create a copy.
7050         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7051         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7052         #
7053         #  @ref tui_translation "Example"
7054         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7055             """
7056             Translate the given object along the vector, specified by its components.
7057
7058             Parameters: 
7059                 theObject The object to be translated.
7060                 theDX,theDY,theDZ Components of translation vector.
7061                 theCopy Flag used to translate object itself or create a copy.
7062
7063             Returns: 
7064                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7065                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7066             """
7067             # Example: see GEOM_TestAll.py
7068             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7069             if theCopy:
7070                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7071             else:
7072                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7073             anObj.SetParameters(Parameters)
7074             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7075             return anObj
7076
7077         ## Translate the given object along the vector, specified
7078         #  by its components, creating its copy before the translation.
7079         #  @param theObject The object to be translated.
7080         #  @param theDX,theDY,theDZ Components of translation vector.
7081         #  @param theName Object name; when specified, this parameter is used
7082         #         for result publication in the study. Otherwise, if automatic
7083         #         publication is switched on, default value is used for result name.
7084         #
7085         #  @return New GEOM.GEOM_Object, containing the translated object.
7086         #
7087         #  @ref tui_translation "Example"
7088         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7089             """
7090             Translate the given object along the vector, specified
7091             by its components, creating its copy before the translation.
7092
7093             Parameters: 
7094                 theObject The object to be translated.
7095                 theDX,theDY,theDZ Components of translation vector.
7096                 theName Object name; when specified, this parameter is used
7097                         for result publication in the study. Otherwise, if automatic
7098                         publication is switched on, default value is used for result name.
7099
7100             Returns: 
7101                 New GEOM.GEOM_Object, containing the translated object.
7102             """
7103             # Example: see GEOM_TestAll.py
7104             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7105             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7106             anObj.SetParameters(Parameters)
7107             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7108             self._autoPublish(anObj, theName, "translated")
7109             return anObj
7110
7111         ## Translate the given object along the given vector.
7112         #  @param theObject The object to be translated.
7113         #  @param theVector The translation vector.
7114         #  @param theCopy Flag used to translate object itself or create a copy.
7115         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7116         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7117         def TranslateVector(self, theObject, theVector, theCopy=False):
7118             """
7119             Translate the given object along the given vector.
7120
7121             Parameters: 
7122                 theObject The object to be translated.
7123                 theVector The translation vector.
7124                 theCopy Flag used to translate object itself or create a copy.
7125
7126             Returns: 
7127                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7128                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7129             """
7130             if theCopy:
7131                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7132             else:
7133                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7134             RaiseIfFailed("TranslateVector", self.TrsfOp)
7135             return anObj
7136
7137         ## Translate the given object along the given vector,
7138         #  creating its copy before the translation.
7139         #  @param theObject The object to be translated.
7140         #  @param theVector The translation vector.
7141         #  @param theName Object name; when specified, this parameter is used
7142         #         for result publication in the study. Otherwise, if automatic
7143         #         publication is switched on, default value is used for result name.
7144         #
7145         #  @return New GEOM.GEOM_Object, containing the translated object.
7146         #
7147         #  @ref tui_translation "Example"
7148         def MakeTranslationVector(self, theObject, theVector, theName=None):
7149             """
7150             Translate the given object along the given vector,
7151             creating its copy before the translation.
7152
7153             Parameters: 
7154                 theObject The object to be translated.
7155                 theVector The translation vector.
7156                 theName Object name; when specified, this parameter is used
7157                         for result publication in the study. Otherwise, if automatic
7158                         publication is switched on, default value is used for result name.
7159
7160             Returns: 
7161                 New GEOM.GEOM_Object, containing the translated object.
7162             """
7163             # Example: see GEOM_TestAll.py
7164             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7165             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7166             self._autoPublish(anObj, theName, "translated")
7167             return anObj
7168
7169         ## Translate the given object along the given vector on given distance.
7170         #  @param theObject The object to be translated.
7171         #  @param theVector The translation vector.
7172         #  @param theDistance The translation distance.
7173         #  @param theCopy Flag used to translate object itself or create a copy.
7174         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7175         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7176         #
7177         #  @ref tui_translation "Example"
7178         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7179             """
7180             Translate the given object along the given vector on given distance.
7181
7182             Parameters: 
7183                 theObject The object to be translated.
7184                 theVector The translation vector.
7185                 theDistance The translation distance.
7186                 theCopy Flag used to translate object itself or create a copy.
7187
7188             Returns: 
7189                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7190                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7191             """
7192             # Example: see GEOM_TestAll.py
7193             theDistance,Parameters = ParseParameters(theDistance)
7194             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7195             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7196             anObj.SetParameters(Parameters)
7197             return anObj
7198
7199         ## Translate the given object along the given vector on given distance,
7200         #  creating its copy before the translation.
7201         #  @param theObject The object to be translated.
7202         #  @param theVector The translation vector.
7203         #  @param theDistance The translation distance.
7204         #  @param theName Object name; when specified, this parameter is used
7205         #         for result publication in the study. Otherwise, if automatic
7206         #         publication is switched on, default value is used for result name.
7207         #
7208         #  @return New GEOM.GEOM_Object, containing the translated object.
7209         #
7210         #  @ref tui_translation "Example"
7211         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7212             """
7213             Translate the given object along the given vector on given distance,
7214             creating its copy before the translation.
7215
7216             Parameters:
7217                 theObject The object to be translated.
7218                 theVector The translation vector.
7219                 theDistance The translation distance.
7220                 theName Object name; when specified, this parameter is used
7221                         for result publication in the study. Otherwise, if automatic
7222                         publication is switched on, default value is used for result name.
7223
7224             Returns: 
7225                 New GEOM.GEOM_Object, containing the translated object.
7226             """
7227             # Example: see GEOM_TestAll.py
7228             theDistance,Parameters = ParseParameters(theDistance)
7229             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7230             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7231             anObj.SetParameters(Parameters)
7232             self._autoPublish(anObj, theName, "translated")
7233             return anObj
7234
7235         ## Rotate the given object around the given axis on the given angle.
7236         #  @param theObject The object to be rotated.
7237         #  @param theAxis Rotation axis.
7238         #  @param theAngle Rotation angle in radians.
7239         #  @param theCopy Flag used to rotate object itself or create a copy.
7240         #
7241         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7242         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7243         #
7244         #  @ref tui_rotation "Example"
7245         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7246             """
7247             Rotate the given object around the given axis on the given angle.
7248
7249             Parameters:
7250                 theObject The object to be rotated.
7251                 theAxis Rotation axis.
7252                 theAngle Rotation angle in radians.
7253                 theCopy Flag used to rotate object itself or create a copy.
7254
7255             Returns:
7256                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7257                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7258             """
7259             # Example: see GEOM_TestAll.py
7260             flag = False
7261             if isinstance(theAngle,str):
7262                 flag = True
7263             theAngle, Parameters = ParseParameters(theAngle)
7264             if flag:
7265                 theAngle = theAngle*math.pi/180.0
7266             if theCopy:
7267                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7268             else:
7269                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7270             RaiseIfFailed("Rotate", self.TrsfOp)
7271             anObj.SetParameters(Parameters)
7272             return anObj
7273
7274         ## Rotate the given object around the given axis
7275         #  on the given angle, creating its copy before the rotatation.
7276         #  @param theObject The object to be rotated.
7277         #  @param theAxis Rotation axis.
7278         #  @param theAngle Rotation angle in radians.
7279         #  @param theName Object name; when specified, this parameter is used
7280         #         for result publication in the study. Otherwise, if automatic
7281         #         publication is switched on, default value is used for result name.
7282         #
7283         #  @return New GEOM.GEOM_Object, containing the rotated object.
7284         #
7285         #  @ref tui_rotation "Example"
7286         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7287             """
7288             Rotate the given object around the given axis
7289             on the given angle, creating its copy before the rotatation.
7290
7291             Parameters:
7292                 theObject The object to be rotated.
7293                 theAxis Rotation axis.
7294                 theAngle Rotation angle in radians.
7295                 theName Object name; when specified, this parameter is used
7296                         for result publication in the study. Otherwise, if automatic
7297                         publication is switched on, default value is used for result name.
7298
7299             Returns:
7300                 New GEOM.GEOM_Object, containing the rotated object.
7301             """
7302             # Example: see GEOM_TestAll.py
7303             flag = False
7304             if isinstance(theAngle,str):
7305                 flag = True
7306             theAngle, Parameters = ParseParameters(theAngle)
7307             if flag:
7308                 theAngle = theAngle*math.pi/180.0
7309             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7310             RaiseIfFailed("RotateCopy", self.TrsfOp)
7311             anObj.SetParameters(Parameters)
7312             self._autoPublish(anObj, theName, "rotated")
7313             return anObj
7314
7315         ## Rotate given object around vector perpendicular to plane
7316         #  containing three points.
7317         #  @param theObject The object to be rotated.
7318         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7319         #  containing the three points.
7320         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7321         #  @param theCopy Flag used to rotate object itself or create a copy.
7322         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7323         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7324         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7325             """
7326             Rotate given object around vector perpendicular to plane
7327             containing three points.
7328
7329             Parameters:
7330                 theObject The object to be rotated.
7331                 theCentPoint central point  the axis is the vector perpendicular to the plane
7332                              containing the three points.
7333                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7334                 theCopy Flag used to rotate object itself or create a copy.
7335
7336             Returns:
7337                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7338                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7339             """
7340             if theCopy:
7341                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7342             else:
7343                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7344             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7345             return anObj
7346
7347         ## Rotate given object around vector perpendicular to plane
7348         #  containing three points, creating its copy before the rotatation.
7349         #  @param theObject The object to be rotated.
7350         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7351         #  containing the three points.
7352         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7353         #  @param theName Object name; when specified, this parameter is used
7354         #         for result publication in the study. Otherwise, if automatic
7355         #         publication is switched on, default value is used for result name.
7356         #
7357         #  @return New GEOM.GEOM_Object, containing the rotated object.
7358         #
7359         #  @ref tui_rotation "Example"
7360         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
7361             """
7362             Rotate given object around vector perpendicular to plane
7363             containing three points, creating its copy before the rotatation.
7364
7365             Parameters:
7366                 theObject The object to be rotated.
7367                 theCentPoint central point  the axis is the vector perpendicular to the plane
7368                              containing the three points.
7369                 thePoint1,thePoint2  in a perpendicular plane of the axis.
7370                 theName Object name; when specified, this parameter is used
7371                         for result publication in the study. Otherwise, if automatic
7372                         publication is switched on, default value is used for result name.
7373
7374             Returns:
7375                 New GEOM.GEOM_Object, containing the rotated object.
7376             """
7377             # Example: see GEOM_TestAll.py
7378             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7379             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
7380             self._autoPublish(anObj, theName, "rotated")
7381             return anObj
7382
7383         ## Scale the given object by the specified factor.
7384         #  @param theObject The object to be scaled.
7385         #  @param thePoint Center point for scaling.
7386         #                  Passing None for it means scaling relatively the origin of global CS.
7387         #  @param theFactor Scaling factor value.
7388         #  @param theCopy Flag used to scale object itself or create a copy.
7389         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7390         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7391         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
7392             """
7393             Scale the given object by the specified factor.
7394
7395             Parameters:
7396                 theObject The object to be scaled.
7397                 thePoint Center point for scaling.
7398                          Passing None for it means scaling relatively the origin of global CS.
7399                 theFactor Scaling factor value.
7400                 theCopy Flag used to scale object itself or create a copy.
7401
7402             Returns:    
7403                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7404                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7405             """
7406             # Example: see GEOM_TestAll.py
7407             theFactor, Parameters = ParseParameters(theFactor)
7408             if theCopy:
7409                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7410             else:
7411                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
7412             RaiseIfFailed("Scale", self.TrsfOp)
7413             anObj.SetParameters(Parameters)
7414             return anObj
7415
7416         ## Scale the given object by the factor, creating its copy before the scaling.
7417         #  @param theObject The object to be scaled.
7418         #  @param thePoint Center point for scaling.
7419         #                  Passing None for it means scaling relatively the origin of global CS.
7420         #  @param theFactor Scaling factor value.
7421         #  @param theName Object name; when specified, this parameter is used
7422         #         for result publication in the study. Otherwise, if automatic
7423         #         publication is switched on, default value is used for result name.
7424         #
7425         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7426         #
7427         #  @ref tui_scale "Example"
7428         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
7429             """
7430             Scale the given object by the factor, creating its copy before the scaling.
7431
7432             Parameters:
7433                 theObject The object to be scaled.
7434                 thePoint Center point for scaling.
7435                          Passing None for it means scaling relatively the origin of global CS.
7436                 theFactor Scaling factor value.
7437                 theName Object name; when specified, this parameter is used
7438                         for result publication in the study. Otherwise, if automatic
7439                         publication is switched on, default value is used for result name.
7440
7441             Returns:    
7442                 New GEOM.GEOM_Object, containing the scaled shape.
7443             """
7444             # Example: see GEOM_TestAll.py
7445             theFactor, Parameters = ParseParameters(theFactor)
7446             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7447             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
7448             anObj.SetParameters(Parameters)
7449             self._autoPublish(anObj, theName, "scaled")
7450             return anObj
7451
7452         ## Scale the given object by different factors along coordinate axes.
7453         #  @param theObject The object to be scaled.
7454         #  @param thePoint Center point for scaling.
7455         #                  Passing None for it means scaling relatively the origin of global CS.
7456         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7457         #  @param theCopy Flag used to scale object itself or create a copy.
7458         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7459         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7460         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
7461             """
7462             Scale the given object by different factors along coordinate axes.
7463
7464             Parameters:
7465                 theObject The object to be scaled.
7466                 thePoint Center point for scaling.
7467                             Passing None for it means scaling relatively the origin of global CS.
7468                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7469                 theCopy Flag used to scale object itself or create a copy.
7470
7471             Returns:    
7472                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7473                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7474             """
7475             # Example: see GEOM_TestAll.py
7476             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7477             if theCopy:
7478                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7479                                                             theFactorX, theFactorY, theFactorZ)
7480             else:
7481                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
7482                                                         theFactorX, theFactorY, theFactorZ)
7483             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
7484             anObj.SetParameters(Parameters)
7485             return anObj
7486
7487         ## Scale the given object by different factors along coordinate axes,
7488         #  creating its copy before the scaling.
7489         #  @param theObject The object to be scaled.
7490         #  @param thePoint Center point for scaling.
7491         #                  Passing None for it means scaling relatively the origin of global CS.
7492         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7493         #  @param theName Object name; when specified, this parameter is used
7494         #         for result publication in the study. Otherwise, if automatic
7495         #         publication is switched on, default value is used for result name.
7496         #
7497         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7498         #
7499         #  @ref swig_scale "Example"
7500         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
7501             """
7502             Scale the given object by different factors along coordinate axes,
7503             creating its copy before the scaling.
7504
7505             Parameters:
7506                 theObject The object to be scaled.
7507                 thePoint Center point for scaling.
7508                             Passing None for it means scaling relatively the origin of global CS.
7509                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7510                 theName Object name; when specified, this parameter is used
7511                         for result publication in the study. Otherwise, if automatic
7512                         publication is switched on, default value is used for result name.
7513
7514             Returns:
7515                 New GEOM.GEOM_Object, containing the scaled shape.
7516             """
7517             # Example: see GEOM_TestAll.py
7518             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7519             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7520                                                         theFactorX, theFactorY, theFactorZ)
7521             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
7522             anObj.SetParameters(Parameters)
7523             self._autoPublish(anObj, theName, "scaled")
7524             return anObj
7525
7526         ## Mirror an object relatively the given plane.
7527         #  @param theObject The object to be mirrored.
7528         #  @param thePlane Plane of symmetry.
7529         #  @param theCopy Flag used to mirror object itself or create a copy.
7530         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7531         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7532         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
7533             """
7534             Mirror an object relatively the given plane.
7535
7536             Parameters:
7537                 theObject The object to be mirrored.
7538                 thePlane Plane of symmetry.
7539                 theCopy Flag used to mirror object itself or create a copy.
7540
7541             Returns:
7542                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7543                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7544             """
7545             if theCopy:
7546                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7547             else:
7548                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
7549             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
7550             return anObj
7551
7552         ## Create an object, symmetrical
7553         #  to the given one relatively the given plane.
7554         #  @param theObject The object to be mirrored.
7555         #  @param thePlane Plane of symmetry.
7556         #  @param theName Object name; when specified, this parameter is used
7557         #         for result publication in the study. Otherwise, if automatic
7558         #         publication is switched on, default value is used for result name.
7559         #
7560         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7561         #
7562         #  @ref tui_mirror "Example"
7563         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
7564             """
7565             Create an object, symmetrical to the given one relatively the given plane.
7566
7567             Parameters:
7568                 theObject The object to be mirrored.
7569                 thePlane Plane of symmetry.
7570                 theName Object name; when specified, this parameter is used
7571                         for result publication in the study. Otherwise, if automatic
7572                         publication is switched on, default value is used for result name.
7573
7574             Returns:
7575                 New GEOM.GEOM_Object, containing the mirrored shape.
7576             """
7577             # Example: see GEOM_TestAll.py
7578             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7579             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
7580             self._autoPublish(anObj, theName, "mirrored")
7581             return anObj
7582
7583         ## Mirror an object relatively the given axis.
7584         #  @param theObject The object to be mirrored.
7585         #  @param theAxis Axis of symmetry.
7586         #  @param theCopy Flag used to mirror object itself or create a copy.
7587         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7588         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7589         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
7590             """
7591             Mirror an object relatively the given axis.
7592
7593             Parameters:
7594                 theObject The object to be mirrored.
7595                 theAxis Axis of symmetry.
7596                 theCopy Flag used to mirror object itself or create a copy.
7597
7598             Returns:
7599                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7600                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7601             """
7602             if theCopy:
7603                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7604             else:
7605                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
7606             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
7607             return anObj
7608
7609         ## Create an object, symmetrical
7610         #  to the given one relatively the given axis.
7611         #  @param theObject The object to be mirrored.
7612         #  @param theAxis Axis of symmetry.
7613         #  @param theName Object name; when specified, this parameter is used
7614         #         for result publication in the study. Otherwise, if automatic
7615         #         publication is switched on, default value is used for result name.
7616         #
7617         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7618         #
7619         #  @ref tui_mirror "Example"
7620         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
7621             """
7622             Create an object, symmetrical to the given one relatively the given axis.
7623
7624             Parameters:
7625                 theObject The object to be mirrored.
7626                 theAxis Axis of symmetry.
7627                 theName Object name; when specified, this parameter is used
7628                         for result publication in the study. Otherwise, if automatic
7629                         publication is switched on, default value is used for result name.
7630
7631             Returns: 
7632                 New GEOM.GEOM_Object, containing the mirrored shape.
7633             """
7634             # Example: see GEOM_TestAll.py
7635             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7636             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
7637             self._autoPublish(anObj, theName, "mirrored")
7638             return anObj
7639
7640         ## Mirror an object relatively the given point.
7641         #  @param theObject The object to be mirrored.
7642         #  @param thePoint Point of symmetry.
7643         #  @param theCopy Flag used to mirror object itself or create a copy.
7644         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7645         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7646         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
7647             """
7648             Mirror an object relatively the given point.
7649
7650             Parameters:
7651                 theObject The object to be mirrored.
7652                 thePoint Point of symmetry.
7653                 theCopy Flag used to mirror object itself or create a copy.
7654
7655             Returns:
7656                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7657                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7658             """
7659             # Example: see GEOM_TestAll.py
7660             if theCopy:
7661                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7662             else:
7663                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
7664             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
7665             return anObj
7666
7667         ## Create an object, symmetrical
7668         #  to the given one relatively the given point.
7669         #  @param theObject The object to be mirrored.
7670         #  @param thePoint Point of symmetry.
7671         #  @param theName Object name; when specified, this parameter is used
7672         #         for result publication in the study. Otherwise, if automatic
7673         #         publication is switched on, default value is used for result name.
7674         #
7675         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7676         #
7677         #  @ref tui_mirror "Example"
7678         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
7679             """
7680             Create an object, symmetrical
7681             to the given one relatively the given point.
7682
7683             Parameters:
7684                 theObject The object to be mirrored.
7685                 thePoint Point of symmetry.
7686                 theName Object name; when specified, this parameter is used
7687                         for result publication in the study. Otherwise, if automatic
7688                         publication is switched on, default value is used for result name.
7689
7690             Returns:  
7691                 New GEOM.GEOM_Object, containing the mirrored shape.
7692             """
7693             # Example: see GEOM_TestAll.py
7694             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7695             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
7696             self._autoPublish(anObj, theName, "mirrored")
7697             return anObj
7698
7699         ## Modify the location of the given object.
7700         #  @param theObject The object to be displaced.
7701         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7702         #                     If \a theStartLCS is NULL, displacement
7703         #                     will be performed from global CS.\n
7704         #                     If \a theObject itself is used as \a theStartLCS,
7705         #                     its location will be changed to \a theEndLCS.
7706         #  @param theEndLCS Coordinate system to perform displacement to it.
7707         #  @param theCopy Flag used to displace object itself or create a copy.
7708         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7709         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
7710         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
7711             """
7712             Modify the Location of the given object by LCS, creating its copy before the setting.
7713
7714             Parameters:
7715                 theObject The object to be displaced.
7716                 theStartLCS Coordinate system to perform displacement from it.
7717                             If theStartLCS is NULL, displacement
7718                             will be performed from global CS.
7719                             If theObject itself is used as theStartLCS,
7720                             its location will be changed to theEndLCS.
7721                 theEndLCS Coordinate system to perform displacement to it.
7722                 theCopy Flag used to displace object itself or create a copy.
7723
7724             Returns:
7725                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7726                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
7727             """
7728             # Example: see GEOM_TestAll.py
7729             if theCopy:
7730                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7731             else:
7732                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
7733             RaiseIfFailed("Displace", self.TrsfOp)
7734             return anObj
7735
7736         ## Modify the Location of the given object by LCS,
7737         #  creating its copy before the setting.
7738         #  @param theObject The object to be displaced.
7739         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7740         #                     If \a theStartLCS is NULL, displacement
7741         #                     will be performed from global CS.\n
7742         #                     If \a theObject itself is used as \a theStartLCS,
7743         #                     its location will be changed to \a theEndLCS.
7744         #  @param theEndLCS Coordinate system to perform displacement to it.
7745         #  @param theName Object name; when specified, this parameter is used
7746         #         for result publication in the study. Otherwise, if automatic
7747         #         publication is switched on, default value is used for result name.
7748         #
7749         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7750         #
7751         #  @ref tui_modify_location "Example"
7752         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
7753             """
7754             Modify the Location of the given object by LCS, creating its copy before the setting.
7755
7756             Parameters:
7757                 theObject The object to be displaced.
7758                 theStartLCS Coordinate system to perform displacement from it.
7759                             If theStartLCS is NULL, displacement
7760                             will be performed from global CS.
7761                             If theObject itself is used as theStartLCS,
7762                             its location will be changed to theEndLCS.
7763                 theEndLCS Coordinate system to perform displacement to it.
7764                 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             Returns:  
7769                 New GEOM.GEOM_Object, containing the displaced shape.
7770
7771             Example of usage:
7772                 # create local coordinate systems
7773                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
7774                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
7775                 # modify the location of the given object
7776                 position = geompy.MakePosition(cylinder, cs1, cs2)
7777             """
7778             # Example: see GEOM_TestAll.py
7779             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7780             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
7781             self._autoPublish(anObj, theName, "displaced")
7782             return anObj
7783
7784         ## Modify the Location of the given object by Path.
7785         #  @param  theObject The object to be displaced.
7786         #  @param  thePath Wire or Edge along that the object will be translated.
7787         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
7788         #  @param  theCopy is to create a copy objects if true.
7789         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
7790         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
7791         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
7792         #
7793         #  @ref tui_modify_location "Example"
7794         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
7795             """
7796             Modify the Location of the given object by Path.
7797
7798             Parameters:
7799                  theObject The object to be displaced.
7800                  thePath Wire or Edge along that the object will be translated.
7801                  theDistance progress of Path (0 = start location, 1 = end of path location).
7802                  theCopy is to create a copy objects if true.
7803                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7804
7805             Returns:  
7806                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
7807                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
7808
7809             Example of usage:
7810                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
7811             """
7812             # Example: see GEOM_TestAll.py
7813             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
7814             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7815             return anObj
7816
7817         ## Modify the Location of the given object by Path, creating its copy before the operation.
7818         #  @param theObject The object to be displaced.
7819         #  @param thePath Wire or Edge along that the object will be translated.
7820         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
7821         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
7822         #  @param theName Object name; when specified, this parameter is used
7823         #         for result publication in the study. Otherwise, if automatic
7824         #         publication is switched on, default value is used for result name.
7825         #
7826         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7827         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
7828             """
7829             Modify the Location of the given object by Path, creating its copy before the operation.
7830
7831             Parameters:
7832                  theObject The object to be displaced.
7833                  thePath Wire or Edge along that the object will be translated.
7834                  theDistance progress of Path (0 = start location, 1 = end of path location).
7835                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7836                  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             Returns:  
7841                 New GEOM.GEOM_Object, containing the displaced shape.
7842             """
7843             # Example: see GEOM_TestAll.py
7844             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
7845             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7846             self._autoPublish(anObj, theName, "displaced")
7847             return anObj
7848
7849         ## Offset given shape.
7850         #  @param theObject The base object for the offset.
7851         #  @param theOffset Offset value.
7852         #  @param theCopy Flag used to offset object itself or create a copy.
7853         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7854         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
7855         def Offset(self, theObject, theOffset, theCopy=False):
7856             """
7857             Offset given shape.
7858
7859             Parameters:
7860                 theObject The base object for the offset.
7861                 theOffset Offset value.
7862                 theCopy Flag used to offset object itself or create a copy.
7863
7864             Returns: 
7865                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7866                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
7867             """
7868             theOffset, Parameters = ParseParameters(theOffset)
7869             if theCopy:
7870                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7871             else:
7872                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
7873             RaiseIfFailed("Offset", self.TrsfOp)
7874             anObj.SetParameters(Parameters)
7875             return anObj
7876
7877         ## Create new object as offset of the given one.
7878         #  @param theObject The base object for the offset.
7879         #  @param theOffset Offset value.
7880         #  @param theName Object name; when specified, this parameter is used
7881         #         for result publication in the study. Otherwise, if automatic
7882         #         publication is switched on, default value is used for result name.
7883         #
7884         #  @return New GEOM.GEOM_Object, containing the offset object.
7885         #
7886         #  @ref tui_offset "Example"
7887         def MakeOffset(self, theObject, theOffset, theName=None):
7888             """
7889             Create new object as offset of the given one.
7890
7891             Parameters:
7892                 theObject The base object for the offset.
7893                 theOffset Offset value.
7894                 theName Object name; when specified, this parameter is used
7895                         for result publication in the study. Otherwise, if automatic
7896                         publication is switched on, default value is used for result name.
7897
7898             Returns:  
7899                 New GEOM.GEOM_Object, containing the offset object.
7900
7901             Example of usage:
7902                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
7903                  # create a new object as offset of the given object
7904                  offset = geompy.MakeOffset(box, 70.)
7905             """
7906             # Example: see GEOM_TestAll.py
7907             theOffset, Parameters = ParseParameters(theOffset)
7908             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7909             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
7910             anObj.SetParameters(Parameters)
7911             self._autoPublish(anObj, theName, "offset")
7912             return anObj
7913
7914         ## Create new object as projection of the given one on a 2D surface.
7915         #  @param theSource The source object for the projection. It can be a point, edge or wire.
7916         #  @param theTarget The target object. It can be planar or cylindrical face.
7917         #  @param theName Object name; when specified, this parameter is used
7918         #         for result publication in the study. Otherwise, if automatic
7919         #         publication is switched on, default value is used for result name.
7920         #
7921         #  @return New GEOM.GEOM_Object, containing the projection.
7922         #
7923         #  @ref tui_projection "Example"
7924         def MakeProjection(self, theSource, theTarget, theName=None):
7925             """
7926             Create new object as projection of the given one on a 2D surface.
7927
7928             Parameters:
7929                 theSource The source object for the projection. It can be a point, edge or wire.
7930                 theTarget The target object. It can be planar or cylindrical face.
7931                 theName Object name; when specified, this parameter is used
7932                         for result publication in the study. Otherwise, if automatic
7933                         publication is switched on, default value is used for result name.
7934
7935             Returns:  
7936                 New GEOM.GEOM_Object, containing the projection.
7937             """
7938             # Example: see GEOM_TestAll.py
7939             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
7940             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
7941             self._autoPublish(anObj, theName, "projection")
7942             return anObj
7943
7944         # -----------------------------------------------------------------------------
7945         # Patterns
7946         # -----------------------------------------------------------------------------
7947
7948         ## Translate the given object along the given vector a given number times
7949         #  @param theObject The object to be translated.
7950         #  @param theVector Direction of the translation. DX if None.
7951         #  @param theStep Distance to translate on.
7952         #  @param theNbTimes Quantity of translations to be done.
7953         #  @param theName Object name; when specified, this parameter is used
7954         #         for result publication in the study. Otherwise, if automatic
7955         #         publication is switched on, default value is used for result name.
7956         #
7957         #  @return New GEOM.GEOM_Object, containing compound of all
7958         #          the shapes, obtained after each translation.
7959         #
7960         #  @ref tui_multi_translation "Example"
7961         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
7962             """
7963             Translate the given object along the given vector a given number times
7964
7965             Parameters:
7966                 theObject The object to be translated.
7967                 theVector Direction of the translation. DX if None.
7968                 theStep Distance to translate on.
7969                 theNbTimes Quantity of translations to be done.
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 compound of all
7976                 the shapes, obtained after each translation.
7977
7978             Example of usage:
7979                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
7980             """
7981             # Example: see GEOM_TestAll.py
7982             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
7983             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
7984             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
7985             anObj.SetParameters(Parameters)
7986             self._autoPublish(anObj, theName, "multitranslation")
7987             return anObj
7988
7989         ## Conseqently apply two specified translations to theObject specified number of times.
7990         #  @param theObject The object to be translated.
7991         #  @param theVector1 Direction of the first translation. DX if None.
7992         #  @param theStep1 Step of the first translation.
7993         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
7994         #  @param theVector2 Direction of the second translation. DY if None.
7995         #  @param theStep2 Step of the second translation.
7996         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
7997         #  @param theName Object name; when specified, this parameter is used
7998         #         for result publication in the study. Otherwise, if automatic
7999         #         publication is switched on, default value is used for result name.
8000         #
8001         #  @return New GEOM.GEOM_Object, containing compound of all
8002         #          the shapes, obtained after each translation.
8003         #
8004         #  @ref tui_multi_translation "Example"
8005         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8006                                    theVector2, theStep2, theNbTimes2, theName=None):
8007             """
8008             Conseqently apply two specified translations to theObject specified number of times.
8009
8010             Parameters:
8011                 theObject The object to be translated.
8012                 theVector1 Direction of the first translation. DX if None.
8013                 theStep1 Step of the first translation.
8014                 theNbTimes1 Quantity of translations to be done along theVector1.
8015                 theVector2 Direction of the second translation. DY if None.
8016                 theStep2 Step of the second translation.
8017                 theNbTimes2 Quantity of translations to be done along theVector2.
8018                 theName Object name; when specified, this parameter is used
8019                         for result publication in the study. Otherwise, if automatic
8020                         publication is switched on, default value is used for result name.
8021
8022             Returns:
8023                 New GEOM.GEOM_Object, containing compound of all
8024                 the shapes, obtained after each translation.
8025
8026             Example of usage:
8027                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8028             """
8029             # Example: see GEOM_TestAll.py
8030             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8031             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8032                                                  theVector2, theStep2, theNbTimes2)
8033             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8034             anObj.SetParameters(Parameters)
8035             self._autoPublish(anObj, theName, "multitranslation")
8036             return anObj
8037
8038         ## Rotate the given object around the given axis a given number times.
8039         #  Rotation angle will be 2*PI/theNbTimes.
8040         #  @param theObject The object to be rotated.
8041         #  @param theAxis The rotation axis. DZ if None.
8042         #  @param theNbTimes Quantity of rotations to be done.
8043         #  @param theName Object name; when specified, this parameter is used
8044         #         for result publication in the study. Otherwise, if automatic
8045         #         publication is switched on, default value is used for result name.
8046         #
8047         #  @return New GEOM.GEOM_Object, containing compound of all the
8048         #          shapes, obtained after each rotation.
8049         #
8050         #  @ref tui_multi_rotation "Example"
8051         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8052             """
8053             Rotate the given object around the given axis a given number times.
8054             Rotation angle will be 2*PI/theNbTimes.
8055
8056             Parameters:
8057                 theObject The object to be rotated.
8058                 theAxis The rotation axis. DZ if None.
8059                 theNbTimes Quantity of rotations to be done.
8060                 theName Object name; when specified, this parameter is used
8061                         for result publication in the study. Otherwise, if automatic
8062                         publication is switched on, default value is used for result name.
8063
8064             Returns:     
8065                 New GEOM.GEOM_Object, containing compound of all the
8066                 shapes, obtained after each rotation.
8067
8068             Example of usage:
8069                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8070             """
8071             # Example: see GEOM_TestAll.py
8072             theNbTimes, Parameters = ParseParameters(theNbTimes)
8073             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8074             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8075             anObj.SetParameters(Parameters)
8076             self._autoPublish(anObj, theName, "multirotation")
8077             return anObj
8078
8079         ## Rotate the given object around the given axis
8080         #  a given number times on the given angle.
8081         #  @param theObject The object to be rotated.
8082         #  @param theAxis The rotation axis. DZ if None.
8083         #  @param theAngleStep Rotation angle in radians.
8084         #  @param theNbTimes Quantity of rotations to be done.
8085         #  @param theName Object name; when specified, this parameter is used
8086         #         for result publication in the study. Otherwise, if automatic
8087         #         publication is switched on, default value is used for result name.
8088         #
8089         #  @return New GEOM.GEOM_Object, containing compound of all the
8090         #          shapes, obtained after each rotation.
8091         #
8092         #  @ref tui_multi_rotation "Example"
8093         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8094             """
8095             Rotate the given object around the given axis
8096             a given number times on the given angle.
8097
8098             Parameters:
8099                 theObject The object to be rotated.
8100                 theAxis The rotation axis. DZ if None.
8101                 theAngleStep Rotation angle in radians.
8102                 theNbTimes Quantity of rotations to be done.
8103                 theName Object name; when specified, this parameter is used
8104                         for result publication in the study. Otherwise, if automatic
8105                         publication is switched on, default value is used for result name.
8106
8107             Returns:     
8108                 New GEOM.GEOM_Object, containing compound of all the
8109                 shapes, obtained after each rotation.
8110
8111             Example of usage:
8112                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8113             """
8114             # Example: see GEOM_TestAll.py
8115             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8116             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8117             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8118             anObj.SetParameters(Parameters)
8119             self._autoPublish(anObj, theName, "multirotation")
8120             return anObj
8121
8122         ## Rotate the given object around the given axis a given
8123         #  number times and multi-translate each rotation result.
8124         #  Rotation angle will be 2*PI/theNbTimes1.
8125         #  Translation direction passes through center of gravity
8126         #  of rotated shape and its projection on the rotation axis.
8127         #  @param theObject The object to be rotated.
8128         #  @param theAxis Rotation axis. DZ if None.
8129         #  @param theNbTimes1 Quantity of rotations to be done.
8130         #  @param theRadialStep Translation distance.
8131         #  @param theNbTimes2 Quantity of translations to be done.
8132         #  @param theName Object name; when specified, this parameter is used
8133         #         for result publication in the study. Otherwise, if automatic
8134         #         publication is switched on, default value is used for result name.
8135         #
8136         #  @return New GEOM.GEOM_Object, containing compound of all the
8137         #          shapes, obtained after each transformation.
8138         #
8139         #  @ref tui_multi_rotation "Example"
8140         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8141             """
8142             Rotate the given object around the
8143             given axis on the given angle a given number
8144             times and multi-translate each rotation result.
8145             Translation direction passes through center of gravity
8146             of rotated shape and its projection on the rotation axis.
8147
8148             Parameters:
8149                 theObject The object to be rotated.
8150                 theAxis Rotation axis. DZ if None.
8151                 theNbTimes1 Quantity of rotations to be done.
8152                 theRadialStep Translation distance.
8153                 theNbTimes2 Quantity of translations to be done.
8154                 theName Object name; when specified, this parameter is used
8155                         for result publication in the study. Otherwise, if automatic
8156                         publication is switched on, default value is used for result name.
8157
8158             Returns:    
8159                 New GEOM.GEOM_Object, containing compound of all the
8160                 shapes, obtained after each transformation.
8161
8162             Example of usage:
8163                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8164             """
8165             # Example: see GEOM_TestAll.py
8166             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8167             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8168             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8169             anObj.SetParameters(Parameters)
8170             self._autoPublish(anObj, theName, "multirotation")
8171             return anObj
8172
8173         ## Rotate the given object around the
8174         #  given axis on the given angle a given number
8175         #  times and multi-translate each rotation result.
8176         #  Translation direction passes through center of gravity
8177         #  of rotated shape and its projection on the rotation axis.
8178         #  @param theObject The object to be rotated.
8179         #  @param theAxis Rotation axis. DZ if None.
8180         #  @param theAngleStep Rotation angle in radians.
8181         #  @param theNbTimes1 Quantity of rotations to be done.
8182         #  @param theRadialStep Translation distance.
8183         #  @param theNbTimes2 Quantity of translations to be done.
8184         #  @param theName Object name; when specified, this parameter is used
8185         #         for result publication in the study. Otherwise, if automatic
8186         #         publication is switched on, default value is used for result name.
8187         #
8188         #  @return New GEOM.GEOM_Object, containing compound of all the
8189         #          shapes, obtained after each transformation.
8190         #
8191         #  @ref tui_multi_rotation "Example"
8192         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8193             """
8194             Rotate the given object around the
8195             given axis on the given angle a given number
8196             times and multi-translate each rotation result.
8197             Translation direction passes through center of gravity
8198             of rotated shape and its projection on the rotation axis.
8199
8200             Parameters:
8201                 theObject The object to be rotated.
8202                 theAxis Rotation axis. DZ if None.
8203                 theAngleStep Rotation angle in radians.
8204                 theNbTimes1 Quantity of rotations to be done.
8205                 theRadialStep Translation distance.
8206                 theNbTimes2 Quantity of translations to be done.
8207                 theName Object name; when specified, this parameter is used
8208                         for result publication in the study. Otherwise, if automatic
8209                         publication is switched on, default value is used for result name.
8210
8211             Returns:    
8212                 New GEOM.GEOM_Object, containing compound of all the
8213                 shapes, obtained after each transformation.
8214
8215             Example of usage:
8216                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8217             """
8218             # Example: see GEOM_TestAll.py
8219             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8220             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8221             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8222             anObj.SetParameters(Parameters)
8223             self._autoPublish(anObj, theName, "multirotation")
8224             return anObj
8225
8226         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8227         #
8228         #  @ref swig_MakeMultiRotation "Example"
8229         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8230             """
8231             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8232
8233             Example of usage:
8234                 pz = geompy.MakeVertex(0, 0, 100)
8235                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8236                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8237             """
8238             # Example: see GEOM_TestOthers.py
8239             aVec = self.MakeLine(aPoint,aDir)
8240             # note: auto-publishing is done in self.MultiRotate1D()
8241             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8242             return anObj
8243
8244         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8245         #
8246         #  @ref swig_MakeMultiRotation "Example"
8247         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8248             """
8249             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8250
8251             Example of usage:
8252                 pz = geompy.MakeVertex(0, 0, 100)
8253                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8254                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8255             """
8256             # Example: see GEOM_TestOthers.py
8257             aVec = self.MakeLine(aPoint,aDir)
8258             # note: auto-publishing is done in self.MultiRotate1D()
8259             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8260             return anObj
8261
8262         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8263         #
8264         #  @ref swig_MakeMultiRotation "Example"
8265         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8266             """
8267             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8268             
8269             Example of usage:
8270                 pz = geompy.MakeVertex(0, 0, 100)
8271                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8272                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8273             """
8274             # Example: see GEOM_TestOthers.py
8275             aVec = self.MakeLine(aPoint,aDir)
8276             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8277             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8278             return anObj
8279
8280         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8281         #
8282         #  @ref swig_MakeMultiRotation "Example"
8283         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8284             """
8285             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8286             
8287             Example of usage:
8288                 pz = geompy.MakeVertex(0, 0, 100)
8289                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8290                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8291             """
8292             # Example: see GEOM_TestOthers.py
8293             aVec = self.MakeLine(aPoint,aDir)
8294             # note: auto-publishing is done in self.MultiRotate2D()
8295             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8296             return anObj
8297
8298         # end of l3_transform
8299         ## @}
8300
8301         ## @addtogroup l3_transform_d
8302         ## @{
8303
8304         ## Deprecated method. Use MultiRotate1DNbTimes instead.
8305         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
8306             """
8307             Deprecated method. Use MultiRotate1DNbTimes instead.
8308             """
8309             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
8310             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
8311
8312         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8313         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8314         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
8315             """
8316             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8317             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8318
8319             Example of usage:
8320                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8321             """
8322             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
8323             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
8324             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
8325             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
8326             anObj.SetParameters(Parameters)
8327             self._autoPublish(anObj, theName, "multirotation")
8328             return anObj
8329
8330         ## The same, as MultiRotate1D(), but axis is given by direction and point
8331         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8332         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8333             """
8334             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
8335             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8336
8337             Example of usage:
8338                 pz = geompy.MakeVertex(0, 0, 100)
8339                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8340                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
8341             """
8342             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
8343             aVec = self.MakeLine(aPoint,aDir)
8344             # note: auto-publishing is done in self.MultiRotate1D()
8345             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
8346             return anObj
8347
8348         ## The same, as MultiRotate2D(), but axis is given by direction and point
8349         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8350         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8351             """
8352             The same, as MultiRotate2D(), but axis is given by direction and point
8353             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8354             
8355             Example of usage:
8356                 pz = geompy.MakeVertex(0, 0, 100)
8357                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8358                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
8359             """
8360             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
8361             aVec = self.MakeLine(aPoint,aDir)
8362             # note: auto-publishing is done in self.MultiRotate2D()
8363             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8364             return anObj
8365
8366         # end of l3_transform_d
8367         ## @}
8368
8369         ## @addtogroup l3_local
8370         ## @{
8371
8372         ## Perform a fillet on all edges of the given shape.
8373         #  @param theShape Shape, to perform fillet on.
8374         #  @param theR Fillet radius.
8375         #  @param theName Object name; when specified, this parameter is used
8376         #         for result publication in the study. Otherwise, if automatic
8377         #         publication is switched on, default value is used for result name.
8378         #
8379         #  @return New GEOM.GEOM_Object, containing the result shape.
8380         #
8381         #  @ref tui_fillet "Example 1"
8382         #  \n @ref swig_MakeFilletAll "Example 2"
8383         def MakeFilletAll(self, theShape, theR, theName=None):
8384             """
8385             Perform a fillet on all edges of the given shape.
8386
8387             Parameters:
8388                 theShape Shape, to perform fillet on.
8389                 theR Fillet radius.
8390                 theName Object name; when specified, this parameter is used
8391                         for result publication in the study. Otherwise, if automatic
8392                         publication is switched on, default value is used for result name.
8393
8394             Returns: 
8395                 New GEOM.GEOM_Object, containing the result shape.
8396
8397             Example of usage: 
8398                filletall = geompy.MakeFilletAll(prism, 10.)
8399             """
8400             # Example: see GEOM_TestOthers.py
8401             theR,Parameters = ParseParameters(theR)
8402             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
8403             RaiseIfFailed("MakeFilletAll", self.LocalOp)
8404             anObj.SetParameters(Parameters)
8405             self._autoPublish(anObj, theName, "fillet")
8406             return anObj
8407
8408         ## Perform a fillet on the specified edges/faces of the given shape
8409         #  @param theShape Shape, to perform fillet on.
8410         #  @param theR Fillet radius.
8411         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
8412         #  @param theListShapes Global indices of edges/faces to perform fillet on.
8413         #  @param theName Object name; when specified, this parameter is used
8414         #         for result publication in the study. Otherwise, if automatic
8415         #         publication is switched on, default value is used for result name.
8416         #
8417         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8418         #
8419         #  @return New GEOM.GEOM_Object, containing the result shape.
8420         #
8421         #  @ref tui_fillet "Example"
8422         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
8423             """
8424             Perform a fillet on the specified edges/faces of the given shape
8425
8426             Parameters:
8427                 theShape Shape, to perform fillet on.
8428                 theR Fillet radius.
8429                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
8430                 theListShapes Global indices of edges/faces to perform fillet on.
8431                 theName Object name; when specified, this parameter is used
8432                         for result publication in the study. Otherwise, if automatic
8433                         publication is switched on, default value is used for result name.
8434
8435             Note:
8436                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8437
8438             Returns: 
8439                 New GEOM.GEOM_Object, containing the result shape.
8440
8441             Example of usage:
8442                 # get the list of IDs (IDList) for the fillet
8443                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8444                 IDlist_e = []
8445                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8446                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8447                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8448                 # make a fillet on the specified edges of the given shape
8449                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
8450             """
8451             # Example: see GEOM_TestAll.py
8452             theR,Parameters = ParseParameters(theR)
8453             anObj = None
8454             if theShapeType == self.ShapeType["EDGE"]:
8455                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
8456                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
8457             else:
8458                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
8459                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
8460             anObj.SetParameters(Parameters)
8461             self._autoPublish(anObj, theName, "fillet")
8462             return anObj
8463
8464         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
8465         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
8466             """
8467             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
8468
8469             Example of usage:
8470                 # get the list of IDs (IDList) for the fillet
8471                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8472                 IDlist_e = []
8473                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8474                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8475                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8476                 # make a fillet on the specified edges of the given shape
8477                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
8478             """
8479             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
8480             anObj = None
8481             if theShapeType == self.ShapeType["EDGE"]:
8482                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
8483                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
8484             else:
8485                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
8486                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
8487             anObj.SetParameters(Parameters)
8488             self._autoPublish(anObj, theName, "fillet")
8489             return anObj
8490
8491         ## Perform a fillet on the specified edges of the given shape
8492         #  @param theShape  Wire Shape to perform fillet on.
8493         #  @param theR  Fillet radius.
8494         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8495         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
8496         #    \note The list of vertices could be empty,
8497         #          in this case fillet will done done at all vertices in wire
8498         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
8499         #         by the length of the edges, nearest to the fillet vertex.
8500         #         But sometimes the next edge is C1 continuous with the one, nearest to
8501         #         the fillet point, and such two (or more) edges can be united to allow
8502         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
8503         #         thus ignoring the secant vertex (vertices).
8504         #  @param theName Object name; when specified, this parameter is used
8505         #         for result publication in the study. Otherwise, if automatic
8506         #         publication is switched on, default value is used for result name.
8507         #
8508         #  @return New GEOM.GEOM_Object, containing the result shape.
8509         #
8510         #  @ref tui_fillet2d "Example"
8511         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
8512             """
8513             Perform a fillet on the specified edges of the given shape
8514
8515             Parameters:
8516                 theShape  Wire Shape to perform fillet on.
8517                 theR  Fillet radius.
8518                 theListOfVertexes Global indices of vertexes to perform fillet on.
8519                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
8520                     by the length of the edges, nearest to the fillet vertex.
8521                     But sometimes the next edge is C1 continuous with the one, nearest to
8522                     the fillet point, and such two (or more) edges can be united to allow
8523                     bigger radius. Set this flag to TRUE to allow collinear edges union,
8524                     thus ignoring the secant vertex (vertices).
8525                 theName Object name; when specified, this parameter is used
8526                         for result publication in the study. Otherwise, if automatic
8527                         publication is switched on, default value is used for result name.
8528             Note:
8529                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8530
8531                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
8532
8533             Returns: 
8534                 New GEOM.GEOM_Object, containing the result shape.
8535
8536             Example of usage:  
8537                 # create wire
8538                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
8539                 # make fillet at given wire vertices with giver radius
8540                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
8541             """
8542             # Example: see GEOM_TestAll.py
8543             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
8544             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
8545             RaiseIfFailed("MakeFillet1D", self.LocalOp)
8546             anObj.SetParameters(Parameters)
8547             self._autoPublish(anObj, theName, "fillet")
8548             return anObj
8549
8550         ## Perform a fillet at the specified vertices of the given face/shell.
8551         #  @param theShape Face or Shell shape to perform fillet on.
8552         #  @param theR Fillet radius.
8553         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8554         #  @param theName Object name; when specified, this parameter is used
8555         #         for result publication in the study. Otherwise, if automatic
8556         #         publication is switched on, default value is used for result name.
8557         #
8558         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8559         #
8560         #  @return New GEOM.GEOM_Object, containing the result shape.
8561         #
8562         #  @ref tui_fillet2d "Example"
8563         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
8564             """
8565             Perform a fillet at the specified vertices of the given face/shell.
8566
8567             Parameters:
8568                 theShape  Face or Shell shape to perform fillet on.
8569                 theR  Fillet radius.
8570                 theListOfVertexes Global indices of vertexes to perform fillet on.
8571                 theName Object name; when specified, this parameter is used
8572                         for result publication in the study. Otherwise, if automatic
8573                         publication is switched on, default value is used for result name.
8574             Note:
8575                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8576
8577             Returns: 
8578                 New GEOM.GEOM_Object, containing the result shape.
8579
8580             Example of usage:
8581                 face = geompy.MakeFaceHW(100, 100, 1)
8582                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
8583             """
8584             # Example: see GEOM_TestAll.py
8585             theR,Parameters = ParseParameters(theR)
8586             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
8587             RaiseIfFailed("MakeFillet2D", self.LocalOp)
8588             anObj.SetParameters(Parameters)
8589             self._autoPublish(anObj, theName, "fillet")
8590             return anObj
8591
8592         ## Perform a symmetric chamfer on all edges of the given shape.
8593         #  @param theShape Shape, to perform chamfer on.
8594         #  @param theD Chamfer size along each face.
8595         #  @param theName Object name; when specified, this parameter is used
8596         #         for result publication in the study. Otherwise, if automatic
8597         #         publication is switched on, default value is used for result name.
8598         #
8599         #  @return New GEOM.GEOM_Object, containing the result shape.
8600         #
8601         #  @ref tui_chamfer "Example 1"
8602         #  \n @ref swig_MakeChamferAll "Example 2"
8603         def MakeChamferAll(self, theShape, theD, theName=None):
8604             """
8605             Perform a symmetric chamfer on all edges of the given shape.
8606
8607             Parameters:
8608                 theShape Shape, to perform chamfer on.
8609                 theD Chamfer size along each face.
8610                 theName Object name; when specified, this parameter is used
8611                         for result publication in the study. Otherwise, if automatic
8612                         publication is switched on, default value is used for result name.
8613
8614             Returns:     
8615                 New GEOM.GEOM_Object, containing the result shape.
8616
8617             Example of usage:
8618                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
8619             """
8620             # Example: see GEOM_TestOthers.py
8621             theD,Parameters = ParseParameters(theD)
8622             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
8623             RaiseIfFailed("MakeChamferAll", self.LocalOp)
8624             anObj.SetParameters(Parameters)
8625             self._autoPublish(anObj, theName, "chamfer")
8626             return anObj
8627
8628         ## Perform a chamfer on edges, common to the specified faces,
8629         #  with distance D1 on the Face1
8630         #  @param theShape Shape, to perform chamfer on.
8631         #  @param theD1 Chamfer size along \a theFace1.
8632         #  @param theD2 Chamfer size along \a theFace2.
8633         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8634         #  @param theName Object name; when specified, this parameter is used
8635         #         for result publication in the study. Otherwise, if automatic
8636         #         publication is switched on, default value is used for result name.
8637         #
8638         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8639         #
8640         #  @return New GEOM.GEOM_Object, containing the result shape.
8641         #
8642         #  @ref tui_chamfer "Example"
8643         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
8644             """
8645             Perform a chamfer on edges, common to the specified faces,
8646             with distance D1 on the Face1
8647
8648             Parameters:
8649                 theShape Shape, to perform chamfer on.
8650                 theD1 Chamfer size along theFace1.
8651                 theD2 Chamfer size along theFace2.
8652                 theFace1,theFace2 Global indices of two faces of theShape.
8653                 theName Object name; when specified, this parameter is used
8654                         for result publication in the study. Otherwise, if automatic
8655                         publication is switched on, default value is used for result name.
8656
8657             Note:
8658                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8659
8660             Returns:      
8661                 New GEOM.GEOM_Object, containing the result shape.
8662
8663             Example of usage:
8664                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8665                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8666                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8667                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
8668             """
8669             # Example: see GEOM_TestAll.py
8670             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8671             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
8672             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
8673             anObj.SetParameters(Parameters)
8674             self._autoPublish(anObj, theName, "chamfer")
8675             return anObj
8676
8677         ## Perform a chamfer on edges
8678         #  @param theShape Shape, to perform chamfer on.
8679         #  @param theD Chamfer length
8680         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8681         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8682         #  @param theName Object name; when specified, this parameter is used
8683         #         for result publication in the study. Otherwise, if automatic
8684         #         publication is switched on, default value is used for result name.
8685         #
8686         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8687         #
8688         #  @return New GEOM.GEOM_Object, containing the result shape.
8689         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
8690             """
8691             Perform a chamfer on edges
8692
8693             Parameters:
8694                 theShape Shape, to perform chamfer on.
8695                 theD1 Chamfer size along theFace1.
8696                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
8697                 theFace1,theFace2 Global indices of two faces of theShape.
8698                 theName Object name; when specified, this parameter is used
8699                         for result publication in the study. Otherwise, if automatic
8700                         publication is switched on, default value is used for result name.
8701
8702             Note:
8703                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8704
8705             Returns:      
8706                 New GEOM.GEOM_Object, containing the result shape.
8707
8708             Example of usage:
8709                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8710                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8711                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8712                 ang = 30
8713                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
8714             """
8715             flag = False
8716             if isinstance(theAngle,str):
8717                 flag = True
8718             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8719             if flag:
8720                 theAngle = theAngle*math.pi/180.0
8721             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
8722             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
8723             anObj.SetParameters(Parameters)
8724             self._autoPublish(anObj, theName, "chamfer")
8725             return anObj
8726
8727         ## Perform a chamfer on all edges of the specified faces,
8728         #  with distance D1 on the first specified face (if several for one edge)
8729         #  @param theShape Shape, to perform chamfer on.
8730         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
8731         #               connected to the edge, are in \a theFaces, \a theD1
8732         #               will be get along face, which is nearer to \a theFaces beginning.
8733         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
8734         #  @param theFaces Sequence of global indices of faces of \a theShape.
8735         #  @param theName Object name; when specified, this parameter is used
8736         #         for result publication in the study. Otherwise, if automatic
8737         #         publication is switched on, default value is used for result name.
8738         #
8739         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8740         #
8741         #  @return New GEOM.GEOM_Object, containing the result shape.
8742         #
8743         #  @ref tui_chamfer "Example"
8744         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
8745             """
8746             Perform a chamfer on all edges of the specified faces,
8747             with distance D1 on the first specified face (if several for one edge)
8748
8749             Parameters:
8750                 theShape Shape, to perform chamfer on.
8751                 theD1 Chamfer size along face from  theFaces. If both faces,
8752                       connected to the edge, are in theFaces, theD1
8753                       will be get along face, which is nearer to theFaces beginning.
8754                 theD2 Chamfer size along another of two faces, connected to the edge.
8755                 theFaces Sequence of global indices of faces of theShape.
8756                 theName Object name; when specified, this parameter is used
8757                         for result publication in the study. Otherwise, if automatic
8758                         publication is switched on, default value is used for result name.
8759                 
8760             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
8761
8762             Returns:  
8763                 New GEOM.GEOM_Object, containing the result shape.
8764             """
8765             # Example: see GEOM_TestAll.py
8766             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8767             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
8768             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
8769             anObj.SetParameters(Parameters)
8770             self._autoPublish(anObj, theName, "chamfer")
8771             return anObj
8772
8773         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
8774         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8775         #
8776         #  @ref swig_FilletChamfer "Example"
8777         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
8778             """
8779             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
8780             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8781             """
8782             flag = False
8783             if isinstance(theAngle,str):
8784                 flag = True
8785             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8786             if flag:
8787                 theAngle = theAngle*math.pi/180.0
8788             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
8789             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
8790             anObj.SetParameters(Parameters)
8791             self._autoPublish(anObj, theName, "chamfer")
8792             return anObj
8793
8794         ## Perform a chamfer on edges,
8795         #  with distance D1 on the first specified face (if several for one edge)
8796         #  @param theShape Shape, to perform chamfer on.
8797         #  @param theD1,theD2 Chamfer size
8798         #  @param theEdges Sequence of edges of \a theShape.
8799         #  @param theName Object name; when specified, this parameter is used
8800         #         for result publication in the study. Otherwise, if automatic
8801         #         publication is switched on, default value is used for result name.
8802         #
8803         #  @return New GEOM.GEOM_Object, containing the result shape.
8804         #
8805         #  @ref swig_FilletChamfer "Example"
8806         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
8807             """
8808             Perform a chamfer on edges,
8809             with distance D1 on the first specified face (if several for one edge)
8810             
8811             Parameters:
8812                 theShape Shape, to perform chamfer on.
8813                 theD1,theD2 Chamfer size
8814                 theEdges Sequence of edges of theShape.
8815                 theName Object name; when specified, this parameter is used
8816                         for result publication in the study. Otherwise, if automatic
8817                         publication is switched on, default value is used for result name.
8818
8819             Returns:
8820                 New GEOM.GEOM_Object, containing the result shape.
8821             """
8822             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8823             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
8824             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
8825             anObj.SetParameters(Parameters)
8826             self._autoPublish(anObj, theName, "chamfer")
8827             return anObj
8828
8829         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
8830         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8831         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
8832             """
8833             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
8834             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8835             """
8836             flag = False
8837             if isinstance(theAngle,str):
8838                 flag = True
8839             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8840             if flag:
8841                 theAngle = theAngle*math.pi/180.0
8842             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
8843             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
8844             anObj.SetParameters(Parameters)
8845             self._autoPublish(anObj, theName, "chamfer")
8846             return anObj
8847
8848         ## @sa MakeChamferEdge(), MakeChamferFaces()
8849         #
8850         #  @ref swig_MakeChamfer "Example"
8851         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
8852             """
8853             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
8854             """
8855             # Example: see GEOM_TestOthers.py
8856             anObj = None
8857             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
8858             if aShapeType == self.ShapeType["EDGE"]:
8859                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
8860             else:
8861                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
8862             return anObj
8863             
8864         ## Remove material from a solid by extrusion of the base shape on the given distance.
8865         #  @param theInit Shape to remove material from. It must be a solid or 
8866         #  a compound made of a single solid.
8867         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8868         #  @param theH Prism dimension along the normal to theBase
8869         #  @param theAngle Draft angle in degrees.
8870         #  @param theName Object name; when specified, this parameter is used
8871         #         for result publication in the study. Otherwise, if automatic
8872         #         publication is switched on, default value is used for result name.
8873         #
8874         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
8875         #
8876         #  @ref tui_creation_prism "Example"
8877         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
8878             """
8879             Add material to a solid by extrusion of the base shape on the given distance.
8880
8881             Parameters:
8882                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
8883                 theBase Closed edge or wire defining the base shape to be extruded.
8884                 theH Prism dimension along the normal  to theBase
8885                 theAngle Draft angle in degrees.
8886                 theName Object name; when specified, this parameter is used
8887                         for result publication in the study. Otherwise, if automatic
8888                         publication is switched on, default value is used for result name.
8889
8890             Returns:
8891                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
8892             """
8893             # Example: see GEOM_TestAll.py
8894             #theH,Parameters = ParseParameters(theH)
8895             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
8896             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8897             #anObj.SetParameters(Parameters)
8898             self._autoPublish(anObj, theName, "extrudedCut")
8899             return anObj   
8900             
8901         ## Add material to a solid by extrusion of the base shape on the given distance.
8902         #  @param theInit Shape to add material to. It must be a solid or 
8903         #  a compound made of a single solid.
8904         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8905         #  @param theH Prism dimension along the normal to theBase
8906         #  @param theAngle Draft angle in degrees.
8907         #  @param theName Object name; when specified, this parameter is used
8908         #         for result publication in the study. Otherwise, if automatic
8909         #         publication is switched on, default value is used for result name.
8910         #
8911         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
8912         #
8913         #  @ref tui_creation_prism "Example"
8914         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
8915             """
8916             Add material to a solid by extrusion of the base shape on the given distance.
8917
8918             Parameters:
8919                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
8920                 theBase Closed edge or wire defining the base shape to be extruded.
8921                 theH Prism dimension along the normal  to theBase
8922                 theAngle Draft angle in degrees.
8923                 theName Object name; when specified, this parameter is used
8924                         for result publication in the study. Otherwise, if automatic
8925                         publication is switched on, default value is used for result name.
8926
8927             Returns:
8928                 New GEOM.GEOM_Object,  containing the initial shape with added material.
8929             """
8930             # Example: see GEOM_TestAll.py
8931             #theH,Parameters = ParseParameters(theH)
8932             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
8933             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8934             #anObj.SetParameters(Parameters)
8935             self._autoPublish(anObj, theName, "extrudedBoss")
8936             return anObj   
8937
8938         # end of l3_local
8939         ## @}
8940
8941         ## @addtogroup l3_basic_op
8942         ## @{
8943
8944         ## Perform an Archimde operation on the given shape with given parameters.
8945         #  The object presenting the resulting face is returned.
8946         #  @param theShape Shape to be put in water.
8947         #  @param theWeight Weight og the shape.
8948         #  @param theWaterDensity Density of the water.
8949         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
8950         #  @param theName Object name; when specified, this parameter is used
8951         #         for result publication in the study. Otherwise, if automatic
8952         #         publication is switched on, default value is used for result name.
8953         #
8954         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
8955         #          by a plane, corresponding to water level.
8956         #
8957         #  @ref tui_archimede "Example"
8958         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
8959             """
8960             Perform an Archimde operation on the given shape with given parameters.
8961             The object presenting the resulting face is returned.
8962
8963             Parameters: 
8964                 theShape Shape to be put in water.
8965                 theWeight Weight og the shape.
8966                 theWaterDensity Density of the water.
8967                 theMeshDeflection Deflection of the mesh, using to compute the section.
8968                 theName Object name; when specified, this parameter is used
8969                         for result publication in the study. Otherwise, if automatic
8970                         publication is switched on, default value is used for result name.
8971
8972             Returns: 
8973                 New GEOM.GEOM_Object, containing a section of theShape
8974                 by a plane, corresponding to water level.
8975             """
8976             # Example: see GEOM_TestAll.py
8977             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
8978               theWeight,theWaterDensity,theMeshDeflection)
8979             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
8980             RaiseIfFailed("MakeArchimede", self.LocalOp)
8981             anObj.SetParameters(Parameters)
8982             self._autoPublish(anObj, theName, "archimede")
8983             return anObj
8984
8985         # end of l3_basic_op
8986         ## @}
8987
8988         ## @addtogroup l2_measure
8989         ## @{
8990
8991         ## Get point coordinates
8992         #  @return [x, y, z]
8993         #
8994         #  @ref tui_measurement_tools_page "Example"
8995         def PointCoordinates(self,Point):
8996             """
8997             Get point coordinates
8998
8999             Returns:
9000                 [x, y, z]
9001             """
9002             # Example: see GEOM_TestMeasures.py
9003             aTuple = self.MeasuOp.PointCoordinates(Point)
9004             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9005             return aTuple 
9006         
9007         ## Get vector coordinates
9008         #  @return [x, y, z]
9009         #
9010         #  @ref tui_measurement_tools_page "Example"
9011         def VectorCoordinates(self,Vector):
9012             """
9013             Get vector coordinates
9014
9015             Returns:
9016                 [x, y, z]
9017             """
9018
9019             p1=self.GetFirstVertex(Vector)
9020             p2=self.GetLastVertex(Vector)
9021             
9022             X1=self.PointCoordinates(p1)
9023             X2=self.PointCoordinates(p2)
9024
9025             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9026
9027
9028         ## Compute cross product
9029         #  @return vector w=u^v
9030         #
9031         #  @ref tui_measurement_tools_page "Example"
9032         def CrossProduct(self, Vector1, Vector2):
9033             """ 
9034             Compute cross product
9035             
9036             Returns: vector w=u^v
9037             """
9038             u=self.VectorCoordinates(Vector1)
9039             v=self.VectorCoordinates(Vector2)
9040             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])
9041             
9042             return w
9043         
9044         ## Compute cross product
9045         #  @return dot product  p=u.v
9046         #
9047         #  @ref tui_measurement_tools_page "Example"
9048         def DotProduct(self, Vector1, Vector2):
9049             """ 
9050             Compute cross product
9051             
9052             Returns: dot product  p=u.v
9053             """
9054             u=self.VectorCoordinates(Vector1)
9055             v=self.VectorCoordinates(Vector2)
9056             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9057             
9058             return p
9059
9060
9061         ## Get summarized length of all wires,
9062         #  area of surface and volume of the given shape.
9063         #  @param theShape Shape to define properties of.
9064         #  @return [theLength, theSurfArea, theVolume]\n
9065         #  theLength:   Summarized length of all wires of the given shape.\n
9066         #  theSurfArea: Area of surface of the given shape.\n
9067         #  theVolume:   Volume of the given shape.
9068         #
9069         #  @ref tui_measurement_tools_page "Example"
9070         def BasicProperties(self,theShape):
9071             """
9072             Get summarized length of all wires,
9073             area of surface and volume of the given shape.
9074
9075             Parameters: 
9076                 theShape Shape to define properties of.
9077
9078             Returns:
9079                 [theLength, theSurfArea, theVolume]
9080                  theLength:   Summarized length of all wires of the given shape.
9081                  theSurfArea: Area of surface of the given shape.
9082                  theVolume:   Volume of the given shape.
9083             """
9084             # Example: see GEOM_TestMeasures.py
9085             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9086             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9087             return aTuple
9088
9089         ## Get parameters of bounding box of the given shape
9090         #  @param theShape Shape to obtain bounding box of.
9091         #  @param precise TRUE for precise computation; FALSE for fast one.
9092         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9093         #  Xmin,Xmax: Limits of shape along OX axis.
9094         #  Ymin,Ymax: Limits of shape along OY axis.
9095         #  Zmin,Zmax: Limits of shape along OZ axis.
9096         #
9097         #  @ref tui_measurement_tools_page "Example"
9098         def BoundingBox (self, theShape, precise=False):
9099             """
9100             Get parameters of bounding box of the given shape
9101
9102             Parameters: 
9103                 theShape Shape to obtain bounding box of.
9104                 precise TRUE for precise computation; FALSE for fast one.
9105
9106             Returns:
9107                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9108                  Xmin,Xmax: Limits of shape along OX axis.
9109                  Ymin,Ymax: Limits of shape along OY axis.
9110                  Zmin,Zmax: Limits of shape along OZ axis.
9111             """
9112             # Example: see GEOM_TestMeasures.py
9113             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9114             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9115             return aTuple
9116
9117         ## Get bounding box of the given shape
9118         #  @param theShape Shape to obtain bounding box of.
9119         #  @param precise TRUE for precise computation; FALSE for fast one.
9120         #  @param theName Object name; when specified, this parameter is used
9121         #         for result publication in the study. Otherwise, if automatic
9122         #         publication is switched on, default value is used for result name.
9123         #
9124         #  @return New GEOM.GEOM_Object, containing the created box.
9125         #
9126         #  @ref tui_measurement_tools_page "Example"
9127         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9128             """
9129             Get bounding box of the given shape
9130
9131             Parameters: 
9132                 theShape Shape to obtain bounding box of.
9133                 precise TRUE for precise computation; FALSE for fast one.
9134                 theName Object name; when specified, this parameter is used
9135                         for result publication in the study. Otherwise, if automatic
9136                         publication is switched on, default value is used for result name.
9137
9138             Returns:
9139                 New GEOM.GEOM_Object, containing the created box.
9140             """
9141             # Example: see GEOM_TestMeasures.py
9142             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9143             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9144             self._autoPublish(anObj, theName, "bndbox")
9145             return anObj
9146
9147         ## Get inertia matrix and moments of inertia of theShape.
9148         #  @param theShape Shape to calculate inertia of.
9149         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9150         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9151         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9152         #
9153         #  @ref tui_measurement_tools_page "Example"
9154         def Inertia(self,theShape):
9155             """
9156             Get inertia matrix and moments of inertia of theShape.
9157
9158             Parameters: 
9159                 theShape Shape to calculate inertia of.
9160
9161             Returns:
9162                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9163                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9164                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9165             """
9166             # Example: see GEOM_TestMeasures.py
9167             aTuple = self.MeasuOp.GetInertia(theShape)
9168             RaiseIfFailed("GetInertia", self.MeasuOp)
9169             return aTuple
9170
9171         ## Get if coords are included in the shape (ST_IN or ST_ON)
9172         #  @param theShape Shape
9173         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9174         #  @param tolerance to be used (default is 1.0e-7)
9175         #  @return list_of_boolean = [res1, res2, ...]
9176         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9177             """
9178             Get if coords are included in the shape (ST_IN or ST_ON)
9179             
9180             Parameters: 
9181                 theShape Shape
9182                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9183                 tolerance to be used (default is 1.0e-7)
9184
9185             Returns:
9186                 list_of_boolean = [res1, res2, ...]
9187             """
9188             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9189
9190         ## Get minimal distance between the given shapes.
9191         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9192         #  @return Value of the minimal distance between the given shapes.
9193         #
9194         #  @ref tui_measurement_tools_page "Example"
9195         def MinDistance(self, theShape1, theShape2):
9196             """
9197             Get minimal distance between the given shapes.
9198             
9199             Parameters: 
9200                 theShape1,theShape2 Shapes to find minimal distance between.
9201
9202             Returns:    
9203                 Value of the minimal distance between the given shapes.
9204             """
9205             # Example: see GEOM_TestMeasures.py
9206             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9207             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9208             return aTuple[0]
9209
9210         ## Get minimal distance between the given shapes.
9211         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9212         #  @return Value of the minimal distance between the given shapes, in form of list
9213         #          [Distance, DX, DY, DZ].
9214         #
9215         #  @ref swig_all_measure "Example"
9216         def MinDistanceComponents(self, theShape1, theShape2):
9217             """
9218             Get minimal distance between the given shapes.
9219
9220             Parameters: 
9221                 theShape1,theShape2 Shapes to find minimal distance between.
9222
9223             Returns:  
9224                 Value of the minimal distance between the given shapes, in form of list
9225                 [Distance, DX, DY, DZ]
9226             """
9227             # Example: see GEOM_TestMeasures.py
9228             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9229             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9230             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9231             return aRes
9232
9233         ## Get closest points of the given shapes.
9234         #  @param theShape1,theShape2 Shapes to find closest points of.
9235         #  @return The number of found solutions (-1 in case of infinite number of
9236         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9237         #
9238         #  @ref tui_measurement_tools_page "Example"
9239         def ClosestPoints (self, theShape1, theShape2):
9240             """
9241             Get closest points of the given shapes.
9242
9243             Parameters: 
9244                 theShape1,theShape2 Shapes to find closest points of.
9245
9246             Returns:    
9247                 The number of found solutions (-1 in case of infinite number of
9248                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9249             """
9250             # Example: see GEOM_TestMeasures.py
9251             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9252             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9253             return aTuple
9254
9255         ## Get angle between the given shapes in degrees.
9256         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9257         #  @note If both arguments are vectors, the angle is computed in accordance
9258         #        with their orientations, otherwise the minimum angle is computed.
9259         #  @return Value of the angle between the given shapes in degrees.
9260         #
9261         #  @ref tui_measurement_tools_page "Example"
9262         def GetAngle(self, theShape1, theShape2):
9263             """
9264             Get angle between the given shapes in degrees.
9265
9266             Parameters: 
9267                 theShape1,theShape2 Lines or linear edges to find angle between.
9268
9269             Note:
9270                 If both arguments are vectors, the angle is computed in accordance
9271                 with their orientations, otherwise the minimum angle is computed.
9272
9273             Returns:  
9274                 Value of the angle between the given shapes in degrees.
9275             """
9276             # Example: see GEOM_TestMeasures.py
9277             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
9278             RaiseIfFailed("GetAngle", self.MeasuOp)
9279             return anAngle
9280
9281         ## Get angle between the given shapes in radians.
9282         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9283         #  @note If both arguments are vectors, the angle is computed in accordance
9284         #        with their orientations, otherwise the minimum angle is computed.
9285         #  @return Value of the angle between the given shapes in radians.
9286         #
9287         #  @ref tui_measurement_tools_page "Example"
9288         def GetAngleRadians(self, theShape1, theShape2):
9289             """
9290             Get angle between the given shapes in radians.
9291
9292             Parameters: 
9293                 theShape1,theShape2 Lines or linear edges to find angle between.
9294
9295                 
9296             Note:
9297                 If both arguments are vectors, the angle is computed in accordance
9298                 with their orientations, otherwise the minimum angle is computed.
9299
9300             Returns:  
9301                 Value of the angle between the given shapes in radians.
9302             """
9303             # Example: see GEOM_TestMeasures.py
9304             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
9305             RaiseIfFailed("GetAngle", self.MeasuOp)
9306             return anAngle
9307
9308         ## Get angle between the given vectors in degrees.
9309         #  @param theShape1,theShape2 Vectors to find angle between.
9310         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
9311         #                 if False, the opposite vector to the normal vector is used.
9312         #  @return Value of the angle between the given vectors in degrees.
9313         #
9314         #  @ref tui_measurement_tools_page "Example"
9315         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
9316             """
9317             Get angle between the given vectors in degrees.
9318
9319             Parameters: 
9320                 theShape1,theShape2 Vectors to find angle between.
9321                 theFlag If True, the normal vector is defined by the two vectors cross,
9322                         if False, the opposite vector to the normal vector is used.
9323
9324             Returns:  
9325                 Value of the angle between the given vectors in degrees.
9326             """
9327             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
9328             if not theFlag:
9329                 anAngle = 360. - anAngle
9330             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
9331             return anAngle
9332
9333         ## The same as GetAngleVectors, but the result is in radians.
9334         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
9335             """
9336             Get angle between the given vectors in radians.
9337
9338             Parameters: 
9339                 theShape1,theShape2 Vectors to find angle between.
9340                 theFlag If True, the normal vector is defined by the two vectors cross,
9341                         if False, the opposite vector to the normal vector is used.
9342
9343             Returns:  
9344                 Value of the angle between the given vectors in radians.
9345             """
9346             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
9347             return anAngle
9348
9349         ## @name Curve Curvature Measurement
9350         #  Methods for receiving radius of curvature of curves
9351         #  in the given point
9352         ## @{
9353
9354         ## Measure curvature of a curve at a point, set by parameter.
9355         #  @param theCurve a curve.
9356         #  @param theParam parameter.
9357         #  @return radius of curvature of \a theCurve.
9358         #
9359         #  @ref swig_todo "Example"
9360         def CurveCurvatureByParam(self, theCurve, theParam):
9361             """
9362             Measure curvature of a curve at a point, set by parameter.
9363
9364             Parameters: 
9365                 theCurve a curve.
9366                 theParam parameter.
9367
9368             Returns: 
9369                 radius of curvature of theCurve.
9370             """
9371             # Example: see GEOM_TestMeasures.py
9372             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
9373             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
9374             return aCurv
9375
9376         ## Measure curvature of a curve at a point.
9377         #  @param theCurve a curve.
9378         #  @param thePoint given point.
9379         #  @return radius of curvature of \a theCurve.
9380         #
9381         #  @ref swig_todo "Example"
9382         def CurveCurvatureByPoint(self, theCurve, thePoint):
9383             """
9384             Measure curvature of a curve at a point.
9385
9386             Parameters: 
9387                 theCurve a curve.
9388                 thePoint given point.
9389
9390             Returns: 
9391                 radius of curvature of theCurve.           
9392             """
9393             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
9394             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
9395             return aCurv
9396         ## @}
9397
9398         ## @name Surface Curvature Measurement
9399         #  Methods for receiving max and min radius of curvature of surfaces
9400         #  in the given point
9401         ## @{
9402
9403         ## Measure max radius of curvature of surface.
9404         #  @param theSurf the given surface.
9405         #  @param theUParam Value of U-parameter on the referenced surface.
9406         #  @param theVParam Value of V-parameter on the referenced surface.
9407         #  @return max radius of curvature of theSurf.
9408         #
9409         ## @ref swig_todo "Example"
9410         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9411             """
9412             Measure max radius of curvature of surface.
9413
9414             Parameters: 
9415                 theSurf the given surface.
9416                 theUParam Value of U-parameter on the referenced surface.
9417                 theVParam Value of V-parameter on the referenced surface.
9418                 
9419             Returns:     
9420                 max radius of curvature of theSurf.
9421             """
9422             # Example: see GEOM_TestMeasures.py
9423             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9424             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
9425             return aSurf
9426
9427         ## Measure max radius of curvature of surface in the given point
9428         #  @param theSurf the given surface.
9429         #  @param thePoint given point.
9430         #  @return max radius of curvature of theSurf.
9431         #
9432         ## @ref swig_todo "Example"
9433         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
9434             """
9435             Measure max radius of curvature of surface in the given point.
9436
9437             Parameters: 
9438                 theSurf the given surface.
9439                 thePoint given point.
9440                 
9441             Returns:     
9442                 max radius of curvature of theSurf.          
9443             """
9444             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
9445             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
9446             return aSurf
9447
9448         ## Measure min radius of curvature of surface.
9449         #  @param theSurf the given surface.
9450         #  @param theUParam Value of U-parameter on the referenced surface.
9451         #  @param theVParam Value of V-parameter on the referenced surface.
9452         #  @return min radius of curvature of theSurf.
9453         #   
9454         ## @ref swig_todo "Example"
9455         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9456             """
9457             Measure min radius of curvature of surface.
9458
9459             Parameters: 
9460                 theSurf the given surface.
9461                 theUParam Value of U-parameter on the referenced surface.
9462                 theVParam Value of V-parameter on the referenced surface.
9463                 
9464             Returns:     
9465                 Min radius of curvature of theSurf.
9466             """
9467             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9468             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
9469             return aSurf
9470
9471         ## Measure min radius of curvature of surface in the given point
9472         #  @param theSurf the given surface.
9473         #  @param thePoint given point.
9474         #  @return min radius of curvature of theSurf.
9475         #
9476         ## @ref swig_todo "Example"
9477         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
9478             """
9479             Measure min radius of curvature of surface in the given point.
9480
9481             Parameters: 
9482                 theSurf the given surface.
9483                 thePoint given point.
9484                 
9485             Returns:     
9486                 Min radius of curvature of theSurf.          
9487             """
9488             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
9489             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
9490             return aSurf
9491         ## @}
9492
9493         ## Get min and max tolerances of sub-shapes of theShape
9494         #  @param theShape Shape, to get tolerances of.
9495         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
9496         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
9497         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
9498         #  VertMin,VertMax: Min and max tolerances of the vertices.
9499         #
9500         #  @ref tui_measurement_tools_page "Example"
9501         def Tolerance(self,theShape):
9502             """
9503             Get min and max tolerances of sub-shapes of theShape
9504
9505             Parameters: 
9506                 theShape Shape, to get tolerances of.
9507
9508             Returns:    
9509                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
9510                  FaceMin,FaceMax: Min and max tolerances of the faces.
9511                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
9512                  VertMin,VertMax: Min and max tolerances of the vertices.
9513             """
9514             # Example: see GEOM_TestMeasures.py
9515             aTuple = self.MeasuOp.GetTolerance(theShape)
9516             RaiseIfFailed("GetTolerance", self.MeasuOp)
9517             return aTuple
9518
9519         ## Obtain description of the given shape (number of sub-shapes of each type)
9520         #  @param theShape Shape to be described.
9521         #  @return Description of the given shape.
9522         #
9523         #  @ref tui_measurement_tools_page "Example"
9524         def WhatIs(self,theShape):
9525             """
9526             Obtain description of the given shape (number of sub-shapes of each type)
9527
9528             Parameters:
9529                 theShape Shape to be described.
9530
9531             Returns:
9532                 Description of the given shape.
9533             """
9534             # Example: see GEOM_TestMeasures.py
9535             aDescr = self.MeasuOp.WhatIs(theShape)
9536             RaiseIfFailed("WhatIs", self.MeasuOp)
9537             return aDescr
9538
9539         ## Obtain quantity of shapes of the given type in \a theShape.
9540         #  If \a theShape is of type \a theType, it is also counted.
9541         #  @param theShape Shape to be described.
9542         #  @param theType the given ShapeType().
9543         #  @return Quantity of shapes of type \a theType in \a theShape.
9544         #
9545         #  @ref tui_measurement_tools_page "Example"
9546         def NbShapes (self, theShape, theType):
9547             """
9548             Obtain quantity of shapes of the given type in theShape.
9549             If theShape is of type theType, it is also counted.
9550
9551             Parameters:
9552                 theShape Shape to be described.
9553                 theType the given geompy.ShapeType
9554
9555             Returns:
9556                 Quantity of shapes of type theType in theShape.
9557             """
9558             # Example: see GEOM_TestMeasures.py
9559             listSh = self.SubShapeAllIDs(theShape, theType)
9560             Nb = len(listSh)
9561             t       = EnumToLong(theShape.GetShapeType())
9562             theType = EnumToLong(theType)
9563             if t == theType:
9564                 Nb = Nb + 1
9565                 pass
9566             return Nb
9567
9568         ## Obtain quantity of shapes of each type in \a theShape.
9569         #  The \a theShape is also counted.
9570         #  @param theShape Shape to be described.
9571         #  @return Dictionary of ShapeType() with bound quantities of shapes.
9572         #
9573         #  @ref tui_measurement_tools_page "Example"
9574         def ShapeInfo (self, theShape):
9575             """
9576             Obtain quantity of shapes of each type in theShape.
9577             The theShape is also counted.
9578
9579             Parameters:
9580                 theShape Shape to be described.
9581
9582             Returns:
9583                 Dictionary of geompy.ShapeType with bound quantities of shapes.
9584             """
9585             # Example: see GEOM_TestMeasures.py
9586             aDict = {}
9587             for typeSh in self.ShapeType:
9588                 if typeSh in ( "AUTO", "SHAPE" ): continue
9589                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
9590                 Nb = len(listSh)
9591                 if EnumToLong(theShape.GetShapeType()) == self.ShapeType[typeSh]:
9592                     Nb = Nb + 1
9593                     pass
9594                 aDict[typeSh] = Nb
9595                 pass
9596             return aDict
9597
9598         ## Get a point, situated at the centre of mass of theShape.
9599         #  @param theShape Shape to define centre of mass of.
9600         #  @param theName Object name; when specified, this parameter is used
9601         #         for result publication in the study. Otherwise, if automatic
9602         #         publication is switched on, default value is used for result name.
9603         #
9604         #  @return New GEOM.GEOM_Object, containing the created point.
9605         #
9606         #  @ref tui_measurement_tools_page "Example"
9607         def MakeCDG(self, theShape, theName=None):
9608             """
9609             Get a point, situated at the centre of mass of theShape.
9610
9611             Parameters:
9612                 theShape Shape to define centre of mass of.
9613                 theName Object name; when specified, this parameter is used
9614                         for result publication in the study. Otherwise, if automatic
9615                         publication is switched on, default value is used for result name.
9616
9617             Returns:
9618                 New GEOM.GEOM_Object, containing the created point.
9619             """
9620             # Example: see GEOM_TestMeasures.py
9621             anObj = self.MeasuOp.GetCentreOfMass(theShape)
9622             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
9623             self._autoPublish(anObj, theName, "centerOfMass")
9624             return anObj
9625
9626         ## Get a vertex sub-shape by index depended with orientation.
9627         #  @param theShape Shape to find sub-shape.
9628         #  @param theIndex Index to find vertex by this index (starting from zero)
9629         #  @param theName Object name; when specified, this parameter is used
9630         #         for result publication in the study. Otherwise, if automatic
9631         #         publication is switched on, default value is used for result name.
9632         #
9633         #  @return New GEOM.GEOM_Object, containing the created vertex.
9634         #
9635         #  @ref tui_measurement_tools_page "Example"
9636         def GetVertexByIndex(self, theShape, theIndex, theName=None):
9637             """
9638             Get a vertex sub-shape by index depended with orientation.
9639
9640             Parameters:
9641                 theShape Shape to find sub-shape.
9642                 theIndex Index to find vertex by this index (starting from zero)
9643                 theName Object name; when specified, this parameter is used
9644                         for result publication in the study. Otherwise, if automatic
9645                         publication is switched on, default value is used for result name.
9646
9647             Returns:
9648                 New GEOM.GEOM_Object, containing the created vertex.
9649             """
9650             # Example: see GEOM_TestMeasures.py
9651             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
9652             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
9653             self._autoPublish(anObj, theName, "vertex")
9654             return anObj
9655
9656         ## Get the first vertex of wire/edge depended orientation.
9657         #  @param theShape Shape to find first vertex.
9658         #  @param theName Object name; when specified, this parameter is used
9659         #         for result publication in the study. Otherwise, if automatic
9660         #         publication is switched on, default value is used for result name.
9661         #
9662         #  @return New GEOM.GEOM_Object, containing the created vertex.
9663         #
9664         #  @ref tui_measurement_tools_page "Example"
9665         def GetFirstVertex(self, theShape, theName=None):
9666             """
9667             Get the first vertex of wire/edge depended orientation.
9668
9669             Parameters:
9670                 theShape Shape to find first vertex.
9671                 theName Object name; when specified, this parameter is used
9672                         for result publication in the study. Otherwise, if automatic
9673                         publication is switched on, default value is used for result name.
9674
9675             Returns:    
9676                 New GEOM.GEOM_Object, containing the created vertex.
9677             """
9678             # Example: see GEOM_TestMeasures.py
9679             # note: auto-publishing is done in self.GetVertexByIndex()
9680             anObj = self.GetVertexByIndex(theShape, 0, theName)
9681             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
9682             return anObj
9683
9684         ## Get the last vertex of wire/edge depended orientation.
9685         #  @param theShape Shape to find last vertex.
9686         #  @param theName Object name; when specified, this parameter is used
9687         #         for result publication in the study. Otherwise, if automatic
9688         #         publication is switched on, default value is used for result name.
9689         #
9690         #  @return New GEOM.GEOM_Object, containing the created vertex.
9691         #
9692         #  @ref tui_measurement_tools_page "Example"
9693         def GetLastVertex(self, theShape, theName=None):
9694             """
9695             Get the last vertex of wire/edge depended orientation.
9696
9697             Parameters: 
9698                 theShape Shape to find last vertex.
9699                 theName Object name; when specified, this parameter is used
9700                         for result publication in the study. Otherwise, if automatic
9701                         publication is switched on, default value is used for result name.
9702
9703             Returns:   
9704                 New GEOM.GEOM_Object, containing the created vertex.
9705             """
9706             # Example: see GEOM_TestMeasures.py
9707             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
9708             # note: auto-publishing is done in self.GetVertexByIndex()
9709             anObj = self.GetVertexByIndex(theShape, (nb_vert-1), theName)
9710             RaiseIfFailed("GetLastVertex", self.MeasuOp)
9711             return anObj
9712
9713         ## Get a normale to the given face. If the point is not given,
9714         #  the normale is calculated at the center of mass.
9715         #  @param theFace Face to define normale of.
9716         #  @param theOptionalPoint Point to compute the normale at.
9717         #  @param theName Object name; when specified, this parameter is used
9718         #         for result publication in the study. Otherwise, if automatic
9719         #         publication is switched on, default value is used for result name.
9720         #
9721         #  @return New GEOM.GEOM_Object, containing the created vector.
9722         #
9723         #  @ref swig_todo "Example"
9724         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
9725             """
9726             Get a normale to the given face. If the point is not given,
9727             the normale is calculated at the center of mass.
9728             
9729             Parameters: 
9730                 theFace Face to define normale of.
9731                 theOptionalPoint Point to compute the normale at.
9732                 theName Object name; when specified, this parameter is used
9733                         for result publication in the study. Otherwise, if automatic
9734                         publication is switched on, default value is used for result name.
9735
9736             Returns:   
9737                 New GEOM.GEOM_Object, containing the created vector.
9738             """
9739             # Example: see GEOM_TestMeasures.py
9740             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
9741             RaiseIfFailed("GetNormal", self.MeasuOp)
9742             self._autoPublish(anObj, theName, "normal")
9743             return anObj
9744
9745         ## Check a topology of the given shape.
9746         #  @param theShape Shape to check validity of.
9747         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
9748         #                        if TRUE, the shape's geometry will be checked also.
9749         #  @param theReturnStatus If FALSE and if theShape is invalid, a description \n
9750         #                        of problem is printed.
9751         #                        if TRUE and if theShape is invalid, the description 
9752         #                        of problem is also returned.
9753         #  @return TRUE, if the shape "seems to be valid".
9754         #
9755         #  @ref tui_measurement_tools_page "Example"
9756         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
9757             """
9758             Check a topology of the given shape.
9759
9760             Parameters: 
9761                 theShape Shape to check validity of.
9762                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
9763                                if TRUE, the shape's geometry will be checked also.
9764                 theReturnStatus If FALSE and if theShape is invalid, a description
9765                                 of problem is printed.
9766                                 if TRUE and if theShape is invalid, the description 
9767                                 of problem is returned.
9768
9769             Returns:   
9770                 TRUE, if the shape "seems to be valid".
9771                 If theShape is invalid, prints a description of problem.
9772                 This description can also be returned.
9773             """
9774             # Example: see GEOM_TestMeasures.py
9775             if theIsCheckGeom:
9776                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
9777                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
9778             else:
9779                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
9780                 RaiseIfFailed("CheckShape", self.MeasuOp)
9781             if IsValid == 0:
9782                 if theReturnStatus == 0:
9783                     print Status
9784             if theReturnStatus == 1:
9785               return (IsValid, Status)
9786             return IsValid
9787
9788         ## Detect self-intersections in the given shape.
9789         #  @param theShape Shape to check.
9790         #  @return TRUE, if the shape contains no self-intersections.
9791         #
9792         #  @ref tui_measurement_tools_page "Example"
9793         def CheckSelfIntersections(self, theShape):
9794             """
9795             Detect self-intersections in the given shape.
9796
9797             Parameters: 
9798                 theShape Shape to check.
9799
9800             Returns:   
9801                 TRUE, if the shape contains no self-intersections.
9802             """
9803             # Example: see GEOM_TestMeasures.py
9804             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
9805             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
9806             return IsValid
9807
9808         ## Get position (LCS) of theShape.
9809         #
9810         #  Origin of the LCS is situated at the shape's center of mass.
9811         #  Axes of the LCS are obtained from shape's location or,
9812         #  if the shape is a planar face, from position of its plane.
9813         #
9814         #  @param theShape Shape to calculate position of.
9815         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9816         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
9817         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9818         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9819         #
9820         #  @ref swig_todo "Example"
9821         def GetPosition(self,theShape):
9822             """
9823             Get position (LCS) of theShape.
9824             Origin of the LCS is situated at the shape's center of mass.
9825             Axes of the LCS are obtained from shape's location or,
9826             if the shape is a planar face, from position of its plane.
9827
9828             Parameters: 
9829                 theShape Shape to calculate position of.
9830
9831             Returns:  
9832                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9833                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
9834                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9835                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9836             """
9837             # Example: see GEOM_TestMeasures.py
9838             aTuple = self.MeasuOp.GetPosition(theShape)
9839             RaiseIfFailed("GetPosition", self.MeasuOp)
9840             return aTuple
9841
9842         ## Get kind of theShape.
9843         #
9844         #  @param theShape Shape to get a kind of.
9845         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
9846         #          and a list of parameters, describing the shape.
9847         #  @note  Concrete meaning of each value, returned via \a theIntegers
9848         #         or \a theDoubles list depends on the kind() of the shape.
9849         #
9850         #  @ref swig_todo "Example"
9851         def KindOfShape(self,theShape):
9852             """
9853             Get kind of theShape.
9854          
9855             Parameters: 
9856                 theShape Shape to get a kind of.
9857
9858             Returns:
9859                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
9860                     and a list of parameters, describing the shape.
9861             Note:
9862                 Concrete meaning of each value, returned via theIntegers
9863                 or theDoubles list depends on the geompy.kind of the shape
9864             """
9865             # Example: see GEOM_TestMeasures.py
9866             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
9867             RaiseIfFailed("KindOfShape", self.MeasuOp)
9868
9869             aKind  = aRoughTuple[0]
9870             anInts = aRoughTuple[1]
9871             aDbls  = aRoughTuple[2]
9872
9873             # Now there is no exception from this rule:
9874             aKindTuple = [aKind] + aDbls + anInts
9875
9876             # If they are we will regroup parameters for such kind of shape.
9877             # For example:
9878             #if aKind == kind.SOME_KIND:
9879             #    #  SOME_KIND     int int double int double double
9880             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
9881
9882             return aKindTuple
9883
9884         # end of l2_measure
9885         ## @}
9886
9887         ## @addtogroup l2_import_export
9888         ## @{
9889
9890         ## Import a shape from the BREP or IGES or STEP file
9891         #  (depends on given format) with given name.
9892         #  @param theFileName The file, containing the shape.
9893         #  @param theFormatName Specify format for the file reading.
9894         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
9895         #         If format 'IGES_SCALE' is used instead of 'IGES' or
9896         #            format 'STEP_SCALE' is used instead of 'STEP',
9897         #            length unit will be set to 'meter' and result model will be scaled.
9898         #  @param theName Object name; when specified, this parameter is used
9899         #         for result publication in the study. Otherwise, if automatic
9900         #         publication is switched on, default value is used for result name.
9901         #
9902         #  @return New GEOM.GEOM_Object, containing the imported shape.
9903         #
9904         #  @ref swig_Import_Export "Example"
9905         def ImportFile(self, theFileName, theFormatName, theName=None):
9906             """
9907             Import a shape from the BREP or IGES or STEP file
9908             (depends on given format) with given name.
9909
9910             Parameters: 
9911                 theFileName The file, containing the shape.
9912                 theFormatName Specify format for the file reading.
9913                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
9914                     If format 'IGES_SCALE' is used instead of 'IGES' or
9915                        format 'STEP_SCALE' is used instead of 'STEP',
9916                        length unit will be set to 'meter' and result model will be scaled.
9917                 theName Object name; when specified, this parameter is used
9918                         for result publication in the study. Otherwise, if automatic
9919                         publication is switched on, default value is used for result name.
9920
9921             Returns:
9922                 New GEOM.GEOM_Object, containing the imported shape.
9923             """
9924             # Example: see GEOM_TestOthers.py
9925             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
9926             RaiseIfFailed("ImportFile", self.InsertOp)
9927             self._autoPublish(anObj, theName, "imported")
9928             return anObj
9929
9930         ## Deprecated analog of ImportFile()
9931         def Import(self, theFileName, theFormatName, theName=None):
9932             """
9933             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
9934             """
9935             print "WARNING: Function Import is deprecated, use ImportFile instead"
9936             # note: auto-publishing is done in self.ImportFile()
9937             return self.ImportFile(theFileName, theFormatName, theName)
9938
9939         ## Shortcut to ImportFile() for BREP format.
9940         #  Import a shape from the BREP file with given name.
9941         #  @param theFileName The file, containing the shape.
9942         #  @param theName Object name; when specified, this parameter is used
9943         #         for result publication in the study. Otherwise, if automatic
9944         #         publication is switched on, default value is used for result name.
9945         #
9946         #  @return New GEOM.GEOM_Object, containing the imported shape.
9947         #
9948         #  @ref swig_Import_Export "Example"
9949         def ImportBREP(self, theFileName, theName=None):
9950             """
9951             geompy.ImportFile(...) function for BREP format
9952             Import a shape from the BREP file with given name.
9953
9954             Parameters: 
9955                 theFileName The file, containing the shape.
9956                 theName Object name; when specified, this parameter is used
9957                         for result publication in the study. Otherwise, if automatic
9958                         publication is switched on, default value is used for result name.
9959
9960             Returns:
9961                 New GEOM.GEOM_Object, containing the imported shape.
9962             """
9963             # Example: see GEOM_TestOthers.py
9964             # note: auto-publishing is done in self.ImportFile()
9965             return self.ImportFile(theFileName, "BREP", theName)
9966
9967         ## Shortcut to ImportFile() for IGES format
9968         #  Import a shape from the IGES file with given name.
9969         #  @param theFileName The file, containing the shape.
9970         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
9971         #                     and result model will be scaled, if its units are not meters.
9972         #                     If False (default), file length units will be taken into account.
9973         #  @param theName Object name; when specified, this parameter is used
9974         #         for result publication in the study. Otherwise, if automatic
9975         #         publication is switched on, default value is used for result name.
9976         #
9977         #  @return New GEOM.GEOM_Object, containing the imported shape.
9978         #
9979         #  @ref swig_Import_Export "Example"
9980         def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
9981             """
9982             geompy.ImportFile(...) function for IGES format
9983
9984             Parameters:
9985                 theFileName The file, containing the shape.
9986                 ignoreUnits If True, file length units will be ignored (set to 'meter')
9987                             and result model will be scaled, if its units are not meters.
9988                             If False (default), file length units will be taken into account.
9989                 theName Object name; when specified, this parameter is used
9990                         for result publication in the study. Otherwise, if automatic
9991                         publication is switched on, default value is used for result name.
9992
9993             Returns:
9994                 New GEOM.GEOM_Object, containing the imported shape.
9995             """
9996             # Example: see GEOM_TestOthers.py
9997             # note: auto-publishing is done in self.ImportFile()
9998             if ignoreUnits:
9999                 return self.ImportFile(theFileName, "IGES_SCALE", theName)
10000             return self.ImportFile(theFileName, "IGES", theName)
10001
10002         ## Return length unit from given IGES file
10003         #  @param theFileName The file, containing the shape.
10004         #  @return String, containing the units name.
10005         #
10006         #  @ref swig_Import_Export "Example"
10007         def GetIGESUnit(self, theFileName):
10008             """
10009             Return length units from given IGES file
10010
10011             Parameters:
10012                 theFileName The file, containing the shape.
10013
10014             Returns:
10015                 String, containing the units name.
10016             """
10017             # Example: see GEOM_TestOthers.py
10018             aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
10019             return aUnitName
10020
10021         ## Shortcut to ImportFile() for STEP format
10022         #  Import a shape from the STEP file with given name.
10023         #  @param theFileName The file, containing the shape.
10024         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10025         #                     and result model will be scaled, if its units are not meters.
10026         #                     If False (default), file length units will be taken into account.
10027         #  @param theName Object name; when specified, this parameter is used
10028         #         for result publication in the study. Otherwise, if automatic
10029         #         publication is switched on, default value is used for result name.
10030         #
10031         #  @return New GEOM.GEOM_Object, containing the imported shape.
10032         #
10033         #  @ref swig_Import_Export "Example"
10034         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
10035             """
10036             geompy.ImportFile(...) function for STEP format
10037
10038             Parameters:
10039                 theFileName The file, containing the shape.
10040                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10041                             and result model will be scaled, if its units are not meters.
10042                             If False (default), file length units will be taken into account.
10043                 theName Object name; when specified, this parameter is used
10044                         for result publication in the study. Otherwise, if automatic
10045                         publication is switched on, default value is used for result name.
10046
10047             Returns:
10048                 New GEOM.GEOM_Object, containing the imported shape.
10049             """
10050             # Example: see GEOM_TestOthers.py
10051             # note: auto-publishing is done in self.ImportFile()
10052             if ignoreUnits:
10053                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
10054             return self.ImportFile(theFileName, "STEP", theName)
10055
10056         ## Return length unit from given IGES or STEP file
10057         #  @param theFileName The file, containing the shape.
10058         #  @return String, containing the units name.
10059         #
10060         #  @ref swig_Import_Export "Example"
10061         def GetSTEPUnit(self, theFileName):
10062             """
10063             Return length units from given STEP file
10064
10065             Parameters:
10066                 theFileName The file, containing the shape.
10067
10068             Returns:
10069                 String, containing the units name.
10070             """
10071             # Example: see GEOM_TestOthers.py
10072             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
10073             return aUnitName
10074
10075         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10076         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10077         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10078         #  @param theStream The BRep binary stream.
10079         #  @param theName Object name; when specified, this parameter is used
10080         #         for result publication in the study. Otherwise, if automatic
10081         #         publication is switched on, default value is used for result name.
10082         #
10083         #  @return New GEOM_Object, containing the shape, read from theStream.
10084         #
10085         #  @ref swig_Import_Export "Example"
10086         def RestoreShape (self, theStream, theName=None):
10087             """
10088             Read a shape from the binary stream, containing its bounding representation (BRep).
10089
10090             Note:
10091                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10092
10093             Parameters: 
10094                 theStream The BRep binary stream.
10095                 theName Object name; when specified, this parameter is used
10096                         for result publication in the study. Otherwise, if automatic
10097                         publication is switched on, default value is used for result name.
10098
10099             Returns:
10100                 New GEOM_Object, containing the shape, read from theStream.
10101             """
10102             # Example: see GEOM_TestOthers.py
10103             anObj = self.InsertOp.RestoreShape(theStream)
10104             RaiseIfFailed("RestoreShape", self.InsertOp)
10105             self._autoPublish(anObj, theName, "restored")
10106             return anObj
10107
10108         ## Export the given shape into a file with given name.
10109         #  @param theObject Shape to be stored in the file.
10110         #  @param theFileName Name of the file to store the given shape in.
10111         #  @param theFormatName Specify format for the shape storage.
10112         #         Available formats can be obtained with
10113         #         geompy.InsertOp.ExportTranslators()[0] method.
10114         #
10115         #  @ref swig_Import_Export "Example"
10116         def Export(self, theObject, theFileName, theFormatName):
10117             """
10118             Export the given shape into a file with given name.
10119
10120             Parameters: 
10121                 theObject Shape to be stored in the file.
10122                 theFileName Name of the file to store the given shape in.
10123                 theFormatName Specify format for the shape storage.
10124                               Available formats can be obtained with
10125                               geompy.InsertOp.ExportTranslators()[0] method.
10126             """
10127             # Example: see GEOM_TestOthers.py
10128             self.InsertOp.Export(theObject, theFileName, theFormatName)
10129             if self.InsertOp.IsDone() == 0:
10130                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10131                 pass
10132             pass
10133
10134         ## Shortcut to Export() for BREP format
10135         #
10136         #  @ref swig_Import_Export "Example"
10137         def ExportBREP(self,theObject, theFileName):
10138             """
10139             geompy.Export(...) function for BREP format
10140             """
10141             # Example: see GEOM_TestOthers.py
10142             return self.Export(theObject, theFileName, "BREP")
10143
10144         ## Shortcut to Export() for IGES format
10145         #
10146         #  @ref swig_Import_Export "Example"
10147         def ExportIGES(self,theObject, theFileName):
10148             """
10149             geompy.Export(...) function for IGES format
10150             """
10151             # Example: see GEOM_TestOthers.py
10152             return self.Export(theObject, theFileName, "IGES")
10153
10154         ## Shortcut to Export() for STEP format
10155         #
10156         #  @ref swig_Import_Export "Example"
10157         def ExportSTEP(self,theObject, theFileName):
10158             """
10159             geompy.Export(...) function for STEP format
10160             """
10161             # Example: see GEOM_TestOthers.py
10162             return self.Export(theObject, theFileName, "STEP")
10163
10164         # end of l2_import_export
10165         ## @}
10166
10167         ## @addtogroup l3_blocks
10168         ## @{
10169
10170         ## Create a quadrangle face from four edges. Order of Edges is not
10171         #  important. It is  not necessary that edges share the same vertex.
10172         #  @param E1,E2,E3,E4 Edges for the face bound.
10173         #  @param theName Object name; when specified, this parameter is used
10174         #         for result publication in the study. Otherwise, if automatic
10175         #         publication is switched on, default value is used for result name.
10176         #
10177         #  @return New GEOM.GEOM_Object, containing the created face.
10178         #
10179         #  @ref tui_building_by_blocks_page "Example"
10180         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10181             """
10182             Create a quadrangle face from four edges. Order of Edges is not
10183             important. It is  not necessary that edges share the same vertex.
10184
10185             Parameters: 
10186                 E1,E2,E3,E4 Edges for the face bound.
10187                 theName Object name; when specified, this parameter is used
10188                         for result publication in the study. Otherwise, if automatic
10189                         publication is switched on, default value is used for result name.
10190
10191             Returns: 
10192                 New GEOM.GEOM_Object, containing the created face.
10193
10194             Example of usage:               
10195                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10196             """
10197             # Example: see GEOM_Spanner.py
10198             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10199             RaiseIfFailed("MakeQuad", self.BlocksOp)
10200             self._autoPublish(anObj, theName, "quad")
10201             return anObj
10202
10203         ## Create a quadrangle face on two edges.
10204         #  The missing edges will be built by creating the shortest ones.
10205         #  @param E1,E2 Two opposite edges for the face.
10206         #  @param theName Object name; when specified, this parameter is used
10207         #         for result publication in the study. Otherwise, if automatic
10208         #         publication is switched on, default value is used for result name.
10209         #
10210         #  @return New GEOM.GEOM_Object, containing the created face.
10211         #
10212         #  @ref tui_building_by_blocks_page "Example"
10213         def MakeQuad2Edges(self, E1, E2, theName=None):
10214             """
10215             Create a quadrangle face on two edges.
10216             The missing edges will be built by creating the shortest ones.
10217
10218             Parameters: 
10219                 E1,E2 Two opposite edges for the face.
10220                 theName Object name; when specified, this parameter is used
10221                         for result publication in the study. Otherwise, if automatic
10222                         publication is switched on, default value is used for result name.
10223
10224             Returns: 
10225                 New GEOM.GEOM_Object, containing the created face.
10226             
10227             Example of usage:
10228                 # create vertices
10229                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10230                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10231                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10232                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10233                 # create edges
10234                 edge1 = geompy.MakeEdge(p1, p2)
10235                 edge2 = geompy.MakeEdge(p3, p4)
10236                 # create a quadrangle face from two edges
10237                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10238             """
10239             # Example: see GEOM_Spanner.py
10240             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10241             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10242             self._autoPublish(anObj, theName, "quad")
10243             return anObj
10244
10245         ## Create a quadrangle face with specified corners.
10246         #  The missing edges will be built by creating the shortest ones.
10247         #  @param V1,V2,V3,V4 Corner vertices for the face.
10248         #  @param theName Object name; when specified, this parameter is used
10249         #         for result publication in the study. Otherwise, if automatic
10250         #         publication is switched on, default value is used for result name.
10251         #
10252         #  @return New GEOM.GEOM_Object, containing the created face.
10253         #
10254         #  @ref tui_building_by_blocks_page "Example 1"
10255         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10256         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10257             """
10258             Create a quadrangle face with specified corners.
10259             The missing edges will be built by creating the shortest ones.
10260
10261             Parameters: 
10262                 V1,V2,V3,V4 Corner vertices for the face.
10263                 theName Object name; when specified, this parameter is used
10264                         for result publication in the study. Otherwise, if automatic
10265                         publication is switched on, default value is used for result name.
10266
10267             Returns: 
10268                 New GEOM.GEOM_Object, containing the created face.
10269
10270             Example of usage:
10271                 # create vertices
10272                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10273                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10274                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10275                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10276                 # create a quadrangle from four points in its corners
10277                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10278             """
10279             # Example: see GEOM_Spanner.py
10280             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10281             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10282             self._autoPublish(anObj, theName, "quad")
10283             return anObj
10284
10285         ## Create a hexahedral solid, bounded by the six given faces. Order of
10286         #  faces is not important. It is  not necessary that Faces share the same edge.
10287         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10288         #  @param theName Object name; when specified, this parameter is used
10289         #         for result publication in the study. Otherwise, if automatic
10290         #         publication is switched on, default value is used for result name.
10291         #
10292         #  @return New GEOM.GEOM_Object, containing the created solid.
10293         #
10294         #  @ref tui_building_by_blocks_page "Example 1"
10295         #  \n @ref swig_MakeHexa "Example 2"
10296         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
10297             """
10298             Create a hexahedral solid, bounded by the six given faces. Order of
10299             faces is not important. It is  not necessary that Faces share the same edge.
10300
10301             Parameters: 
10302                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10303                 theName Object name; when specified, this parameter is used
10304                         for result publication in the study. Otherwise, if automatic
10305                         publication is switched on, default value is used for result name.
10306
10307             Returns:    
10308                 New GEOM.GEOM_Object, containing the created solid.
10309
10310             Example of usage:
10311                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
10312             """
10313             # Example: see GEOM_Spanner.py
10314             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
10315             RaiseIfFailed("MakeHexa", self.BlocksOp)
10316             self._autoPublish(anObj, theName, "hexa")
10317             return anObj
10318
10319         ## Create a hexahedral solid between two given faces.
10320         #  The missing faces will be built by creating the smallest ones.
10321         #  @param F1,F2 Two opposite faces for the hexahedral solid.
10322         #  @param theName Object name; when specified, this parameter is used
10323         #         for result publication in the study. Otherwise, if automatic
10324         #         publication is switched on, default value is used for result name.
10325         #
10326         #  @return New GEOM.GEOM_Object, containing the created solid.
10327         #
10328         #  @ref tui_building_by_blocks_page "Example 1"
10329         #  \n @ref swig_MakeHexa2Faces "Example 2"
10330         def MakeHexa2Faces(self, F1, F2, theName=None):
10331             """
10332             Create a hexahedral solid between two given faces.
10333             The missing faces will be built by creating the smallest ones.
10334
10335             Parameters: 
10336                 F1,F2 Two opposite faces for the hexahedral solid.
10337                 theName Object name; when specified, this parameter is used
10338                         for result publication in the study. Otherwise, if automatic
10339                         publication is switched on, default value is used for result name.
10340
10341             Returns:
10342                 New GEOM.GEOM_Object, containing the created solid.
10343
10344             Example of usage:
10345                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
10346             """
10347             # Example: see GEOM_Spanner.py
10348             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
10349             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
10350             self._autoPublish(anObj, theName, "hexa")
10351             return anObj
10352
10353         # end of l3_blocks
10354         ## @}
10355
10356         ## @addtogroup l3_blocks_op
10357         ## @{
10358
10359         ## Get a vertex, found in the given shape by its coordinates.
10360         #  @param theShape Block or a compound of blocks.
10361         #  @param theX,theY,theZ Coordinates of the sought vertex.
10362         #  @param theEpsilon Maximum allowed distance between the resulting
10363         #                    vertex and point with the given coordinates.
10364         #  @param theName Object name; when specified, this parameter is used
10365         #         for result publication in the study. Otherwise, if automatic
10366         #         publication is switched on, default value is used for result name.
10367         #
10368         #  @return New GEOM.GEOM_Object, containing the found vertex.
10369         #
10370         #  @ref swig_GetPoint "Example"
10371         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
10372             """
10373             Get a vertex, found in the given shape by its coordinates.
10374
10375             Parameters: 
10376                 theShape Block or a compound of blocks.
10377                 theX,theY,theZ Coordinates of the sought vertex.
10378                 theEpsilon Maximum allowed distance between the resulting
10379                            vertex and point with the given coordinates.
10380                 theName Object name; when specified, this parameter is used
10381                         for result publication in the study. Otherwise, if automatic
10382                         publication is switched on, default value is used for result name.
10383
10384             Returns:                  
10385                 New GEOM.GEOM_Object, containing the found vertex.
10386
10387             Example of usage:
10388                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
10389             """
10390             # Example: see GEOM_TestOthers.py
10391             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
10392             RaiseIfFailed("GetPoint", self.BlocksOp)
10393             self._autoPublish(anObj, theName, "vertex")
10394             return anObj
10395
10396         ## Find a vertex of the given shape, which has minimal distance to the given point.
10397         #  @param theShape Any shape.
10398         #  @param thePoint Point, close to the desired vertex.
10399         #  @param theName Object name; when specified, this parameter is used
10400         #         for result publication in the study. Otherwise, if automatic
10401         #         publication is switched on, default value is used for result name.
10402         #
10403         #  @return New GEOM.GEOM_Object, containing the found vertex.
10404         #
10405         #  @ref swig_GetVertexNearPoint "Example"
10406         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
10407             """
10408             Find a vertex of the given shape, which has minimal distance to the given point.
10409
10410             Parameters: 
10411                 theShape Any shape.
10412                 thePoint Point, close to the desired vertex.
10413                 theName Object name; when specified, this parameter is used
10414                         for result publication in the study. Otherwise, if automatic
10415                         publication is switched on, default value is used for result name.
10416
10417             Returns:
10418                 New GEOM.GEOM_Object, containing the found vertex.
10419
10420             Example of usage:
10421                 pmidle = geompy.MakeVertex(50, 0, 50)
10422                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
10423             """
10424             # Example: see GEOM_TestOthers.py
10425             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
10426             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
10427             self._autoPublish(anObj, theName, "vertex")
10428             return anObj
10429
10430         ## Get an edge, found in the given shape by two given vertices.
10431         #  @param theShape Block or a compound of blocks.
10432         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
10433         #  @param theName Object name; when specified, this parameter is used
10434         #         for result publication in the study. Otherwise, if automatic
10435         #         publication is switched on, default value is used for result name.
10436         #
10437         #  @return New GEOM.GEOM_Object, containing the found edge.
10438         #
10439         #  @ref swig_GetEdge "Example"
10440         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
10441             """
10442             Get an edge, found in the given shape by two given vertices.
10443
10444             Parameters: 
10445                 theShape Block or a compound of blocks.
10446                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
10447                 theName Object name; when specified, this parameter is used
10448                         for result publication in the study. Otherwise, if automatic
10449                         publication is switched on, default value is used for result name.
10450
10451             Returns:
10452                 New GEOM.GEOM_Object, containing the found edge.
10453             """
10454             # Example: see GEOM_Spanner.py
10455             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
10456             RaiseIfFailed("GetEdge", self.BlocksOp)
10457             self._autoPublish(anObj, theName, "edge")
10458             return anObj
10459
10460         ## Find an edge of the given shape, which has minimal distance to the given point.
10461         #  @param theShape Block or a compound of blocks.
10462         #  @param thePoint Point, close to the desired edge.
10463         #  @param theName Object name; when specified, this parameter is used
10464         #         for result publication in the study. Otherwise, if automatic
10465         #         publication is switched on, default value is used for result name.
10466         #
10467         #  @return New GEOM.GEOM_Object, containing the found edge.
10468         #
10469         #  @ref swig_GetEdgeNearPoint "Example"
10470         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
10471             """
10472             Find an edge of the given shape, which has minimal distance to the given point.
10473
10474             Parameters: 
10475                 theShape Block or a compound of blocks.
10476                 thePoint Point, close to the desired edge.
10477                 theName Object name; when specified, this parameter is used
10478                         for result publication in the study. Otherwise, if automatic
10479                         publication is switched on, default value is used for result name.
10480
10481             Returns:
10482                 New GEOM.GEOM_Object, containing the found edge.
10483             """
10484             # Example: see GEOM_TestOthers.py
10485             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
10486             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
10487             self._autoPublish(anObj, theName, "edge")
10488             return anObj
10489
10490         ## Returns a face, found in the given shape by four given corner vertices.
10491         #  @param theShape Block or a compound of blocks.
10492         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10493         #  @param theName Object name; when specified, this parameter is used
10494         #         for result publication in the study. Otherwise, if automatic
10495         #         publication is switched on, default value is used for result name.
10496         #
10497         #  @return New GEOM.GEOM_Object, containing the found face.
10498         #
10499         #  @ref swig_todo "Example"
10500         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
10501             """
10502             Returns a face, found in the given shape by four given corner vertices.
10503
10504             Parameters:
10505                 theShape Block or a compound of blocks.
10506                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
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.GEOM_Object, containing the found face.
10513             """
10514             # Example: see GEOM_Spanner.py
10515             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
10516             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
10517             self._autoPublish(anObj, theName, "face")
10518             return anObj
10519
10520         ## Get a face of block, found in the given shape by two given edges.
10521         #  @param theShape Block or a compound of blocks.
10522         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
10523         #  @param theName Object name; when specified, this parameter is used
10524         #         for result publication in the study. Otherwise, if automatic
10525         #         publication is switched on, default value is used for result name.
10526         #
10527         #  @return New GEOM.GEOM_Object, containing the found face.
10528         #
10529         #  @ref swig_todo "Example"
10530         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
10531             """
10532             Get a face of block, found in the given shape by two given edges.
10533
10534             Parameters:
10535                 theShape Block or a compound of blocks.
10536                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
10537                 theName Object name; when specified, this parameter is used
10538                         for result publication in the study. Otherwise, if automatic
10539                         publication is switched on, default value is used for result name.
10540
10541             Returns:
10542                 New GEOM.GEOM_Object, containing the found face.
10543             """
10544             # Example: see GEOM_Spanner.py
10545             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
10546             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
10547             self._autoPublish(anObj, theName, "face")
10548             return anObj
10549
10550         ## Find a face, opposite to the given one in the given block.
10551         #  @param theBlock Must be a hexahedral solid.
10552         #  @param theFace Face of \a theBlock, opposite to the desired face.
10553         #  @param theName Object name; when specified, this parameter is used
10554         #         for result publication in the study. Otherwise, if automatic
10555         #         publication is switched on, default value is used for result name.
10556         #
10557         #  @return New GEOM.GEOM_Object, containing the found face.
10558         #
10559         #  @ref swig_GetOppositeFace "Example"
10560         def GetOppositeFace(self, theBlock, theFace, theName=None):
10561             """
10562             Find a face, opposite to the given one in the given block.
10563
10564             Parameters:
10565                 theBlock Must be a hexahedral solid.
10566                 theFace Face of theBlock, opposite to the desired face.
10567                 theName Object name; when specified, this parameter is used
10568                         for result publication in the study. Otherwise, if automatic
10569                         publication is switched on, default value is used for result name.
10570
10571             Returns: 
10572                 New GEOM.GEOM_Object, containing the found face.
10573             """
10574             # Example: see GEOM_Spanner.py
10575             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
10576             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
10577             self._autoPublish(anObj, theName, "face")
10578             return anObj
10579
10580         ## Find a face of the given shape, which has minimal distance to the given point.
10581         #  @param theShape Block or a compound of blocks.
10582         #  @param thePoint Point, close to the desired face.
10583         #  @param theName Object name; when specified, this parameter is used
10584         #         for result publication in the study. Otherwise, if automatic
10585         #         publication is switched on, default value is used for result name.
10586         #
10587         #  @return New GEOM.GEOM_Object, containing the found face.
10588         #
10589         #  @ref swig_GetFaceNearPoint "Example"
10590         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
10591             """
10592             Find a face of the given shape, which has minimal distance to the given point.
10593
10594             Parameters:
10595                 theShape Block or a compound of blocks.
10596                 thePoint Point, close to the desired face.
10597                 theName Object name; when specified, this parameter is used
10598                         for result publication in the study. Otherwise, if automatic
10599                         publication is switched on, default value is used for result name.
10600
10601             Returns:
10602                 New GEOM.GEOM_Object, containing the found face.
10603             """
10604             # Example: see GEOM_Spanner.py
10605             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
10606             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
10607             self._autoPublish(anObj, theName, "face")
10608             return anObj
10609
10610         ## Find a face of block, whose outside normale has minimal angle with the given vector.
10611         #  @param theBlock Block or a compound of blocks.
10612         #  @param theVector Vector, close to the normale of the desired face.
10613         #  @param theName Object name; when specified, this parameter is used
10614         #         for result publication in the study. Otherwise, if automatic
10615         #         publication is switched on, default value is used for result name.
10616         #
10617         #  @return New GEOM.GEOM_Object, containing the found face.
10618         #
10619         #  @ref swig_todo "Example"
10620         def GetFaceByNormale(self, theBlock, theVector, theName=None):
10621             """
10622             Find a face of block, whose outside normale has minimal angle with the given vector.
10623
10624             Parameters:
10625                 theBlock Block or a compound of blocks.
10626                 theVector Vector, close to the normale of the desired face.
10627                 theName Object name; when specified, this parameter is used
10628                         for result publication in the study. Otherwise, if automatic
10629                         publication is switched on, default value is used for result name.
10630
10631             Returns:
10632                 New GEOM.GEOM_Object, containing the found face.
10633             """
10634             # Example: see GEOM_Spanner.py
10635             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
10636             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
10637             self._autoPublish(anObj, theName, "face")
10638             return anObj
10639
10640         ## Find all sub-shapes of type \a theShapeType of the given shape,
10641         #  which have minimal distance to the given point.
10642         #  @param theShape Any shape.
10643         #  @param thePoint Point, close to the desired shape.
10644         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
10645         #  @param theTolerance The tolerance for distances comparison. All shapes
10646         #                      with distances to the given point in interval
10647         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
10648         #  @param theName Object name; when specified, this parameter is used
10649         #         for result publication in the study. Otherwise, if automatic
10650         #         publication is switched on, default value is used for result name.
10651         #
10652         #  @return New GEOM_Object, containing a group of all found shapes.
10653         #
10654         #  @ref swig_GetShapesNearPoint "Example"
10655         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
10656             """
10657             Find all sub-shapes of type theShapeType of the given shape,
10658             which have minimal distance to the given point.
10659
10660             Parameters:
10661                 theShape Any shape.
10662                 thePoint Point, close to the desired shape.
10663                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
10664                 theTolerance The tolerance for distances comparison. All shapes
10665                                 with distances to the given point in interval
10666                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
10667                 theName Object name; when specified, this parameter is used
10668                         for result publication in the study. Otherwise, if automatic
10669                         publication is switched on, default value is used for result name.
10670
10671             Returns:
10672                 New GEOM_Object, containing a group of all found shapes.
10673             """
10674             # Example: see GEOM_TestOthers.py
10675             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
10676             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
10677             self._autoPublish(anObj, theName, "group")
10678             return anObj
10679
10680         # end of l3_blocks_op
10681         ## @}
10682
10683         ## @addtogroup l4_blocks_measure
10684         ## @{
10685
10686         ## Check, if the compound of blocks is given.
10687         #  To be considered as a compound of blocks, the
10688         #  given shape must satisfy the following conditions:
10689         #  - Each element of the compound should be a Block (6 faces and 12 edges).
10690         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10691         #  - The compound should be connexe.
10692         #  - The glue between two quadrangle faces should be applied.
10693         #  @param theCompound The compound to check.
10694         #  @return TRUE, if the given shape is a compound of blocks.
10695         #  If theCompound is not valid, prints all discovered errors.
10696         #
10697         #  @ref tui_measurement_tools_page "Example 1"
10698         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
10699         def CheckCompoundOfBlocks(self,theCompound):
10700             """
10701             Check, if the compound of blocks is given.
10702             To be considered as a compound of blocks, the
10703             given shape must satisfy the following conditions:
10704             - Each element of the compound should be a Block (6 faces and 12 edges).
10705             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10706             - The compound should be connexe.
10707             - The glue between two quadrangle faces should be applied.
10708
10709             Parameters:
10710                 theCompound The compound to check.
10711
10712             Returns:
10713                 TRUE, if the given shape is a compound of blocks.
10714                 If theCompound is not valid, prints all discovered errors.            
10715             """
10716             # Example: see GEOM_Spanner.py
10717             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
10718             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
10719             if IsValid == 0:
10720                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
10721                 print Descr
10722             return IsValid
10723
10724         ## Retrieve all non blocks solids and faces from \a theShape.
10725         #  @param theShape The shape to explore.
10726         #  @param theName Object name; when specified, this parameter is used
10727         #         for result publication in the study. Otherwise, if automatic
10728         #         publication is switched on, default value is used for result name.
10729         #
10730         #  @return A tuple of two GEOM_Objects. The first object is a group of all
10731         #          non block solids (= not 6 faces, or with 6 faces, but with the
10732         #          presence of non-quadrangular faces). The second object is a
10733         #          group of all non quadrangular faces.
10734         #
10735         #  @ref tui_measurement_tools_page "Example 1"
10736         #  \n @ref swig_GetNonBlocks "Example 2"
10737         def GetNonBlocks (self, theShape, theName=None):
10738             """
10739             Retrieve all non blocks solids and faces from theShape.
10740
10741             Parameters:
10742                 theShape The shape to explore.
10743                 theName Object name; when specified, this parameter is used
10744                         for result publication in the study. Otherwise, if automatic
10745                         publication is switched on, default value is used for result name.
10746
10747             Returns:
10748                 A tuple of two GEOM_Objects. The first object is a group of all
10749                 non block solids (= not 6 faces, or with 6 faces, but with the
10750                 presence of non-quadrangular faces). The second object is a
10751                 group of all non quadrangular faces.
10752
10753             Usage:
10754                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
10755             """
10756             # Example: see GEOM_Spanner.py
10757             aTuple = self.BlocksOp.GetNonBlocks(theShape)
10758             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
10759             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
10760             return aTuple
10761
10762         ## Remove all seam and degenerated edges from \a theShape.
10763         #  Unite faces and edges, sharing one surface. It means that
10764         #  this faces must have references to one C++ surface object (handle).
10765         #  @param theShape The compound or single solid to remove irregular edges from.
10766         #  @param doUnionFaces If True, then unite faces. If False (the default value),
10767         #         do not unite faces.
10768         #  @param theName Object name; when specified, this parameter is used
10769         #         for result publication in the study. Otherwise, if automatic
10770         #         publication is switched on, default value is used for result name.
10771         #
10772         #  @return Improved shape.
10773         #
10774         #  @ref swig_RemoveExtraEdges "Example"
10775         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
10776             """
10777             Remove all seam and degenerated edges from theShape.
10778             Unite faces and edges, sharing one surface. It means that
10779             this faces must have references to one C++ surface object (handle).
10780
10781             Parameters:
10782                 theShape The compound or single solid to remove irregular edges from.
10783                 doUnionFaces If True, then unite faces. If False (the default value),
10784                              do not unite faces.
10785                 theName Object name; when specified, this parameter is used
10786                         for result publication in the study. Otherwise, if automatic
10787                         publication is switched on, default value is used for result name.
10788
10789             Returns: 
10790                 Improved shape.
10791             """
10792             # Example: see GEOM_TestOthers.py
10793             nbFacesOptimum = -1 # -1 means do not unite faces
10794             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
10795             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
10796             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
10797             self._autoPublish(anObj, theName, "removeExtraEdges")
10798             return anObj
10799
10800         ## Performs union faces of \a theShape
10801         #  Unite faces sharing one surface. It means that
10802         #  these faces must have references to one C++ surface object (handle).
10803         #  @param theShape The compound or single solid that contains faces
10804         #         to perform union.
10805         #  @param theName Object name; when specified, this parameter is used
10806         #         for result publication in the study. Otherwise, if automatic
10807         #         publication is switched on, default value is used for result name.
10808         #
10809         #  @return Improved shape.
10810         #
10811         #  @ref swig_UnionFaces "Example"
10812         def UnionFaces(self, theShape, theName=None):
10813             """
10814             Performs union faces of theShape.
10815             Unite faces sharing one surface. It means that
10816             these faces must have references to one C++ surface object (handle).
10817
10818             Parameters:
10819                 theShape The compound or single solid that contains faces
10820                          to perform union.
10821                 theName Object name; when specified, this parameter is used
10822                         for result publication in the study. Otherwise, if automatic
10823                         publication is switched on, default value is used for result name.
10824
10825             Returns: 
10826                 Improved shape.
10827             """
10828             # Example: see GEOM_TestOthers.py
10829             anObj = self.BlocksOp.UnionFaces(theShape)
10830             RaiseIfFailed("UnionFaces", self.BlocksOp)
10831             self._autoPublish(anObj, theName, "unionFaces")
10832             return anObj
10833
10834         ## Check, if the given shape is a blocks compound.
10835         #  Fix all detected errors.
10836         #    \note Single block can be also fixed by this method.
10837         #  @param theShape The compound to check and improve.
10838         #  @param theName Object name; when specified, this parameter is used
10839         #         for result publication in the study. Otherwise, if automatic
10840         #         publication is switched on, default value is used for result name.
10841         #
10842         #  @return Improved compound.
10843         #
10844         #  @ref swig_CheckAndImprove "Example"
10845         def CheckAndImprove(self, theShape, theName=None):
10846             """
10847             Check, if the given shape is a blocks compound.
10848             Fix all detected errors.
10849
10850             Note:
10851                 Single block can be also fixed by this method.
10852
10853             Parameters:
10854                 theShape The compound to check and improve.
10855                 theName Object name; when specified, this parameter is used
10856                         for result publication in the study. Otherwise, if automatic
10857                         publication is switched on, default value is used for result name.
10858
10859             Returns: 
10860                 Improved compound.
10861             """
10862             # Example: see GEOM_TestOthers.py
10863             anObj = self.BlocksOp.CheckAndImprove(theShape)
10864             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
10865             self._autoPublish(anObj, theName, "improved")
10866             return anObj
10867
10868         # end of l4_blocks_measure
10869         ## @}
10870
10871         ## @addtogroup l3_blocks_op
10872         ## @{
10873
10874         ## Get all the blocks, contained in the given compound.
10875         #  @param theCompound The compound to explode.
10876         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
10877         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
10878         #  @param theName Object name; when specified, this parameter is used
10879         #         for result publication in the study. Otherwise, if automatic
10880         #         publication is switched on, default value is used for result name.
10881         #
10882         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10883         #
10884         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
10885         #
10886         #  @ref tui_explode_on_blocks "Example 1"
10887         #  \n @ref swig_MakeBlockExplode "Example 2"
10888         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
10889             """
10890             Get all the blocks, contained in the given compound.
10891
10892             Parameters:
10893                 theCompound The compound to explode.
10894                 theMinNbFaces If solid has lower number of faces, it is not a block.
10895                 theMaxNbFaces If solid has higher number of faces, it is not a block.
10896                 theName Object name; when specified, this parameter is used
10897                         for result publication in the study. Otherwise, if automatic
10898                         publication is switched on, default value is used for result name.
10899
10900             Note:
10901                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10902
10903             Returns:  
10904                 List of GEOM.GEOM_Object, containing the retrieved blocks.
10905             """
10906             # Example: see GEOM_TestOthers.py
10907             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
10908             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
10909             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
10910             for anObj in aList:
10911                 anObj.SetParameters(Parameters)
10912                 pass
10913             self._autoPublish(aList, theName, "block")
10914             return aList
10915
10916         ## Find block, containing the given point inside its volume or on boundary.
10917         #  @param theCompound Compound, to find block in.
10918         #  @param thePoint Point, close to the desired block. If the point lays on
10919         #         boundary between some blocks, we return block with nearest center.
10920         #  @param theName Object name; when specified, this parameter is used
10921         #         for result publication in the study. Otherwise, if automatic
10922         #         publication is switched on, default value is used for result name.
10923         #
10924         #  @return New GEOM.GEOM_Object, containing the found block.
10925         #
10926         #  @ref swig_todo "Example"
10927         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
10928             """
10929             Find block, containing the given point inside its volume or on boundary.
10930
10931             Parameters:
10932                 theCompound Compound, to find block in.
10933                 thePoint Point, close to the desired block. If the point lays on
10934                          boundary between some blocks, we return block with nearest center.
10935                 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             Returns:
10940                 New GEOM.GEOM_Object, containing the found block.
10941             """
10942             # Example: see GEOM_Spanner.py
10943             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
10944             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
10945             self._autoPublish(anObj, theName, "block")
10946             return anObj
10947
10948         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
10949         #  @param theCompound Compound, to find block in.
10950         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
10951         #  @param theName Object name; when specified, this parameter is used
10952         #         for result publication in the study. Otherwise, if automatic
10953         #         publication is switched on, default value is used for result name.
10954         #
10955         #  @return New GEOM.GEOM_Object, containing the found block.
10956         #
10957         #  @ref swig_GetBlockByParts "Example"
10958         def GetBlockByParts(self, theCompound, theParts, theName=None):
10959             """
10960              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
10961
10962              Parameters:
10963                 theCompound Compound, to find block in.
10964                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
10965                 theName Object name; when specified, this parameter is used
10966                         for result publication in the study. Otherwise, if automatic
10967                         publication is switched on, default value is used for result name.
10968
10969             Returns: 
10970                 New GEOM_Object, containing the found block.
10971             """
10972             # Example: see GEOM_TestOthers.py
10973             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
10974             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
10975             self._autoPublish(anObj, theName, "block")
10976             return anObj
10977
10978         ## Return all blocks, containing all the elements, passed as the parts.
10979         #  @param theCompound Compound, to find blocks in.
10980         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
10981         #  @param theName Object name; when specified, this parameter is used
10982         #         for result publication in the study. Otherwise, if automatic
10983         #         publication is switched on, default value is used for result name.
10984         #
10985         #  @return List of GEOM.GEOM_Object, containing the found blocks.
10986         #
10987         #  @ref swig_todo "Example"
10988         def GetBlocksByParts(self, theCompound, theParts, theName=None):
10989             """
10990             Return all blocks, containing all the elements, passed as the parts.
10991
10992             Parameters:
10993                 theCompound Compound, to find blocks in.
10994                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
10995                 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             Returns:
11000                 List of GEOM.GEOM_Object, containing the found blocks.
11001             """
11002             # Example: see GEOM_Spanner.py
11003             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11004             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11005             self._autoPublish(aList, theName, "block")
11006             return aList
11007
11008         ## Multi-transformate block and glue the result.
11009         #  Transformation is defined so, as to superpose direction faces.
11010         #  @param Block Hexahedral solid to be multi-transformed.
11011         #  @param DirFace1 ID of First direction face.
11012         #  @param DirFace2 ID of Second direction face.
11013         #  @param NbTimes Quantity of transformations to be done.
11014         #  @param theName Object name; when specified, this parameter is used
11015         #         for result publication in the study. Otherwise, if automatic
11016         #         publication is switched on, default value is used for result name.
11017         #
11018         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11019         #
11020         #  @return New GEOM.GEOM_Object, containing the result shape.
11021         #
11022         #  @ref tui_multi_transformation "Example"
11023         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11024             """
11025             Multi-transformate block and glue the result.
11026             Transformation is defined so, as to superpose direction faces.
11027
11028             Parameters:
11029                 Block Hexahedral solid to be multi-transformed.
11030                 DirFace1 ID of First direction face.
11031                 DirFace2 ID of Second direction face.
11032                 NbTimes Quantity of transformations to be done.
11033                 theName Object name; when specified, this parameter is used
11034                         for result publication in the study. Otherwise, if automatic
11035                         publication is switched on, default value is used for result name.
11036
11037             Note:
11038                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11039
11040             Returns:
11041                 New GEOM.GEOM_Object, containing the result shape.
11042             """
11043             # Example: see GEOM_Spanner.py
11044             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11045             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11046             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11047             anObj.SetParameters(Parameters)
11048             self._autoPublish(anObj, theName, "transformed")
11049             return anObj
11050
11051         ## Multi-transformate block and glue the result.
11052         #  @param Block Hexahedral solid to be multi-transformed.
11053         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11054         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11055         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11056         #  @param theName Object name; when specified, this parameter is used
11057         #         for result publication in the study. Otherwise, if automatic
11058         #         publication is switched on, default value is used for result name.
11059         #
11060         #  @return New GEOM.GEOM_Object, containing the result shape.
11061         #
11062         #  @ref tui_multi_transformation "Example"
11063         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11064                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11065             """
11066             Multi-transformate block and glue the result.
11067
11068             Parameters:
11069                 Block Hexahedral solid to be multi-transformed.
11070                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11071                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11072                 NbTimesU,NbTimesV Quantity of transformations to be done.
11073                 theName Object name; when specified, this parameter is used
11074                         for result publication in the study. Otherwise, if automatic
11075                         publication is switched on, default value is used for result name.
11076
11077             Returns:
11078                 New GEOM.GEOM_Object, containing the result shape.
11079             """
11080             # Example: see GEOM_Spanner.py
11081             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11082               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11083             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11084                                                             DirFace1V, DirFace2V, NbTimesV)
11085             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11086             anObj.SetParameters(Parameters)
11087             self._autoPublish(anObj, theName, "transformed")
11088             return anObj
11089
11090         ## Build all possible propagation groups.
11091         #  Propagation group is a set of all edges, opposite to one (main)
11092         #  edge of this group directly or through other opposite edges.
11093         #  Notion of Opposite Edge make sence only on quadrangle face.
11094         #  @param theShape Shape to build propagation groups on.
11095         #  @param theName Object name; when specified, this parameter is used
11096         #         for result publication in the study. Otherwise, if automatic
11097         #         publication is switched on, default value is used for result name.
11098         #
11099         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11100         #
11101         #  @ref swig_Propagate "Example"
11102         def Propagate(self, theShape, theName=None):
11103             """
11104             Build all possible propagation groups.
11105             Propagation group is a set of all edges, opposite to one (main)
11106             edge of this group directly or through other opposite edges.
11107             Notion of Opposite Edge make sence only on quadrangle face.
11108
11109             Parameters:
11110                 theShape Shape to build propagation groups on.
11111                 theName Object name; when specified, this parameter is used
11112                         for result publication in the study. Otherwise, if automatic
11113                         publication is switched on, default value is used for result name.
11114
11115             Returns:
11116                 List of GEOM.GEOM_Object, each of them is a propagation group.
11117             """
11118             # Example: see GEOM_TestOthers.py
11119             listChains = self.BlocksOp.Propagate(theShape)
11120             RaiseIfFailed("Propagate", self.BlocksOp)
11121             self._autoPublish(listChains, theName, "propagate")
11122             return listChains
11123
11124         # end of l3_blocks_op
11125         ## @}
11126
11127         ## @addtogroup l3_groups
11128         ## @{
11129
11130         ## Creates a new group which will store sub-shapes of theMainShape
11131         #  @param theMainShape is a GEOM object on which the group is selected
11132         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
11133         #  @param theName Object name; when specified, this parameter is used
11134         #         for result publication in the study. Otherwise, if automatic
11135         #         publication is switched on, default value is used for result name.
11136         #
11137         #  @return a newly created GEOM group (GEOM.GEOM_Object)
11138         #
11139         #  @ref tui_working_with_groups_page "Example 1"
11140         #  \n @ref swig_CreateGroup "Example 2"
11141         def CreateGroup(self, theMainShape, theShapeType, theName=None):
11142             """
11143             Creates a new group which will store sub-shapes of theMainShape
11144
11145             Parameters:
11146                theMainShape is a GEOM object on which the group is selected
11147                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
11148                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
11149                 theName Object name; when specified, this parameter is used
11150                         for result publication in the study. Otherwise, if automatic
11151                         publication is switched on, default value is used for result name.
11152
11153             Returns:
11154                a newly created GEOM group
11155
11156             Example of usage:
11157                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
11158                 
11159             """
11160             # Example: see GEOM_TestOthers.py
11161             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
11162             RaiseIfFailed("CreateGroup", self.GroupOp)
11163             self._autoPublish(anObj, theName, "group")
11164             return anObj
11165
11166         ## Adds a sub-object with ID theSubShapeId to the group
11167         #  @param theGroup is a GEOM group to which the new sub-shape is added
11168         #  @param theSubShapeID is a sub-shape ID in the main object.
11169         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11170         #
11171         #  @ref tui_working_with_groups_page "Example"
11172         def AddObject(self,theGroup, theSubShapeID):
11173             """
11174             Adds a sub-object with ID theSubShapeId to the group
11175
11176             Parameters:
11177                 theGroup       is a GEOM group to which the new sub-shape is added
11178                 theSubShapeID  is a sub-shape ID in the main object.
11179
11180             Note:
11181                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
11182             """
11183             # Example: see GEOM_TestOthers.py
11184             self.GroupOp.AddObject(theGroup, theSubShapeID)
11185             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
11186                 RaiseIfFailed("AddObject", self.GroupOp)
11187                 pass
11188             pass
11189
11190         ## Removes a sub-object with ID \a theSubShapeId from the group
11191         #  @param theGroup is a GEOM group from which the new sub-shape is removed
11192         #  @param theSubShapeID is a sub-shape ID in the main object.
11193         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11194         #
11195         #  @ref tui_working_with_groups_page "Example"
11196         def RemoveObject(self,theGroup, theSubShapeID):
11197             """
11198             Removes a sub-object with ID theSubShapeId from the group
11199
11200             Parameters:
11201                 theGroup is a GEOM group from which the new sub-shape is removed
11202                 theSubShapeID is a sub-shape ID in the main object.
11203
11204             Note:
11205                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11206             """
11207             # Example: see GEOM_TestOthers.py
11208             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
11209             RaiseIfFailed("RemoveObject", self.GroupOp)
11210             pass
11211
11212         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11213         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11214         #  @param theSubShapes is a list of sub-shapes to be added.
11215         #
11216         #  @ref tui_working_with_groups_page "Example"
11217         def UnionList (self,theGroup, theSubShapes):
11218             """
11219             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11220
11221             Parameters:
11222                 theGroup is a GEOM group to which the new sub-shapes are added.
11223                 theSubShapes is a list of sub-shapes to be added.
11224             """
11225             # Example: see GEOM_TestOthers.py
11226             self.GroupOp.UnionList(theGroup, theSubShapes)
11227             RaiseIfFailed("UnionList", self.GroupOp)
11228             pass
11229
11230         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11231         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11232         #  @param theSubShapes is a list of indices of sub-shapes to be added.
11233         #
11234         #  @ref swig_UnionIDs "Example"
11235         def UnionIDs(self,theGroup, theSubShapes):
11236             """
11237             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11238
11239             Parameters:
11240                 theGroup is a GEOM group to which the new sub-shapes are added.
11241                 theSubShapes is a list of indices of sub-shapes to be added.
11242             """
11243             # Example: see GEOM_TestOthers.py
11244             self.GroupOp.UnionIDs(theGroup, theSubShapes)
11245             RaiseIfFailed("UnionIDs", self.GroupOp)
11246             pass
11247
11248         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11249         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11250         #  @param theSubShapes is a list of sub-shapes to be removed.
11251         #
11252         #  @ref tui_working_with_groups_page "Example"
11253         def DifferenceList (self,theGroup, theSubShapes):
11254             """
11255             Removes from the group all the given shapes. No errors, if some shapes are not included.
11256
11257             Parameters:
11258                 theGroup is a GEOM group from which the sub-shapes are removed.
11259                 theSubShapes is a list of sub-shapes to be removed.
11260             """
11261             # Example: see GEOM_TestOthers.py
11262             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11263             RaiseIfFailed("DifferenceList", self.GroupOp)
11264             pass
11265
11266         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11267         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11268         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
11269         #
11270         #  @ref swig_DifferenceIDs "Example"
11271         def DifferenceIDs(self,theGroup, theSubShapes):
11272             """
11273             Removes from the group all the given shapes. No errors, if some shapes are not included.
11274
11275             Parameters:
11276                 theGroup is a GEOM group from which the sub-shapes are removed.
11277                 theSubShapes is a list of indices of sub-shapes to be removed.
11278             """            
11279             # Example: see GEOM_TestOthers.py
11280             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
11281             RaiseIfFailed("DifferenceIDs", self.GroupOp)
11282             pass
11283
11284         ## Union of two groups.
11285         #  New group is created. It will contain all entities
11286         #  which are present in groups theGroup1 and theGroup2.
11287         #  @param theGroup1, theGroup2 are the initial GEOM groups
11288         #                              to create the united group from.
11289         #  @param theName Object name; when specified, this parameter is used
11290         #         for result publication in the study. Otherwise, if automatic
11291         #         publication is switched on, default value is used for result name.
11292         #
11293         #  @return a newly created GEOM group.
11294         #
11295         #  @ref tui_union_groups_anchor "Example"
11296         def UnionGroups (self, theGroup1, theGroup2, theName=None):
11297             """
11298             Union of two groups.
11299             New group is created. It will contain all entities
11300             which are present in groups theGroup1 and theGroup2.
11301
11302             Parameters:
11303                 theGroup1, theGroup2 are the initial GEOM groups
11304                                      to create the united group from.
11305                 theName Object name; when specified, this parameter is used
11306                         for result publication in the study. Otherwise, if automatic
11307                         publication is switched on, default value is used for result name.
11308
11309             Returns:
11310                 a newly created GEOM group.
11311             """
11312             # Example: see GEOM_TestOthers.py
11313             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
11314             RaiseIfFailed("UnionGroups", self.GroupOp)
11315             self._autoPublish(aGroup, theName, "group")
11316             return aGroup
11317
11318         ## Intersection of two groups.
11319         #  New group is created. It will contain only those entities
11320         #  which are present in both groups theGroup1 and theGroup2.
11321         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11322         #  @param theName Object name; when specified, this parameter is used
11323         #         for result publication in the study. Otherwise, if automatic
11324         #         publication is switched on, default value is used for result name.
11325         #
11326         #  @return a newly created GEOM group.
11327         #
11328         #  @ref tui_intersect_groups_anchor "Example"
11329         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
11330             """
11331             Intersection of two groups.
11332             New group is created. It will contain only those entities
11333             which are present in both groups theGroup1 and theGroup2.
11334
11335             Parameters:
11336                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11337                 theName Object name; when specified, this parameter is used
11338                         for result publication in the study. Otherwise, if automatic
11339                         publication is switched on, default value is used for result name.
11340
11341             Returns:
11342                 a newly created GEOM group.
11343             """
11344             # Example: see GEOM_TestOthers.py
11345             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
11346             RaiseIfFailed("IntersectGroups", self.GroupOp)
11347             self._autoPublish(aGroup, theName, "group")
11348             return aGroup
11349
11350         ## Cut of two groups.
11351         #  New group is created. It will contain entities which are
11352         #  present in group theGroup1 but are not present in group theGroup2.
11353         #  @param theGroup1 is a GEOM group to include elements of.
11354         #  @param theGroup2 is a GEOM group to exclude elements of.
11355         #  @param theName Object name; when specified, this parameter is used
11356         #         for result publication in the study. Otherwise, if automatic
11357         #         publication is switched on, default value is used for result name.
11358         #
11359         #  @return a newly created GEOM group.
11360         #
11361         #  @ref tui_cut_groups_anchor "Example"
11362         def CutGroups (self, theGroup1, theGroup2, theName=None):
11363             """
11364             Cut of two groups.
11365             New group is created. It will contain entities which are
11366             present in group theGroup1 but are not present in group theGroup2.
11367
11368             Parameters:
11369                 theGroup1 is a GEOM group to include elements of.
11370                 theGroup2 is a GEOM group to exclude elements of.
11371                 theName Object name; when specified, this parameter is used
11372                         for result publication in the study. Otherwise, if automatic
11373                         publication is switched on, default value is used for result name.
11374
11375             Returns:
11376                 a newly created GEOM group.
11377             """
11378             # Example: see GEOM_TestOthers.py
11379             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
11380             RaiseIfFailed("CutGroups", self.GroupOp)
11381             self._autoPublish(aGroup, theName, "group")
11382             return aGroup
11383
11384         ## Union of list of groups.
11385         #  New group is created. It will contain all entities that are
11386         #  present in groups listed in theGList.
11387         #  @param theGList is a list of GEOM groups to create the united group from.
11388         #  @param theName Object name; when specified, this parameter is used
11389         #         for result publication in the study. Otherwise, if automatic
11390         #         publication is switched on, default value is used for result name.
11391         #
11392         #  @return a newly created GEOM group.
11393         #
11394         #  @ref tui_union_groups_anchor "Example"
11395         def UnionListOfGroups (self, theGList, theName=None):
11396             """
11397             Union of list of groups.
11398             New group is created. It will contain all entities that are
11399             present in groups listed in theGList.
11400
11401             Parameters:
11402                 theGList is a list of GEOM groups to create the united group from.
11403                 theName Object name; when specified, this parameter is used
11404                         for result publication in the study. Otherwise, if automatic
11405                         publication is switched on, default value is used for result name.
11406
11407             Returns:
11408                 a newly created GEOM group.
11409             """
11410             # Example: see GEOM_TestOthers.py
11411             aGroup = self.GroupOp.UnionListOfGroups(theGList)
11412             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
11413             self._autoPublish(aGroup, theName, "group")
11414             return aGroup
11415
11416         ## Cut of lists of groups.
11417         #  New group is created. It will contain only entities
11418         #  which are present in groups listed in theGList1 but 
11419         #  are not present in groups from theGList2.
11420         #  @param theGList1 is a list of GEOM groups to include elements of.
11421         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11422         #  @param theName Object name; when specified, this parameter is used
11423         #         for result publication in the study. Otherwise, if automatic
11424         #         publication is switched on, default value is used for result name.
11425         #
11426         #  @return a newly created GEOM group.
11427         #
11428         #  @ref tui_intersect_groups_anchor "Example"
11429         def IntersectListOfGroups (self, theGList, theName=None):
11430             """
11431             Cut of lists of groups.
11432             New group is created. It will contain only entities
11433             which are present in groups listed in theGList1 but 
11434             are not present in groups from theGList2.
11435
11436             Parameters:
11437                 theGList1 is a list of GEOM groups to include elements of.
11438                 theGList2 is a list of GEOM groups to exclude elements of.
11439                 theName Object name; when specified, this parameter is used
11440                         for result publication in the study. Otherwise, if automatic
11441                         publication is switched on, default value is used for result name.
11442
11443             Returns:
11444                 a newly created GEOM group.
11445             """
11446             # Example: see GEOM_TestOthers.py
11447             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
11448             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
11449             self._autoPublish(aGroup, theName, "group")
11450             return aGroup
11451
11452         ## Cut of lists of groups.
11453         #  New group is created. It will contain only entities
11454         #  which are present in groups listed in theGList1 but 
11455         #  are not present in groups from theGList2.
11456         #  @param theGList1 is a list of GEOM groups to include elements of.
11457         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11458         #  @param theName Object name; when specified, this parameter is used
11459         #         for result publication in the study. Otherwise, if automatic
11460         #         publication is switched on, default value is used for result name.
11461         #
11462         #  @return a newly created GEOM group.
11463         #
11464         #  @ref tui_cut_groups_anchor "Example"
11465         def CutListOfGroups (self, theGList1, theGList2, theName=None):
11466             """
11467             Cut of lists of groups.
11468             New group is created. It will contain only entities
11469             which are present in groups listed in theGList1 but 
11470             are not present in groups from theGList2.
11471
11472             Parameters:
11473                 theGList1 is a list of GEOM groups to include elements of.
11474                 theGList2 is a list of GEOM groups to exclude elements of.
11475                 theName Object name; when specified, this parameter is used
11476                         for result publication in the study. Otherwise, if automatic
11477                         publication is switched on, default value is used for result name.
11478
11479             Returns:
11480                 a newly created GEOM group.
11481             """
11482             # Example: see GEOM_TestOthers.py
11483             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
11484             RaiseIfFailed("CutListOfGroups", self.GroupOp)
11485             self._autoPublish(aGroup, theName, "group")
11486             return aGroup
11487
11488         ## Returns a list of sub-objects ID stored in the group
11489         #  @param theGroup is a GEOM group for which a list of IDs is requested
11490         #
11491         #  @ref swig_GetObjectIDs "Example"
11492         def GetObjectIDs(self,theGroup):
11493             """
11494             Returns a list of sub-objects ID stored in the group
11495
11496             Parameters:
11497                 theGroup is a GEOM group for which a list of IDs is requested
11498             """
11499             # Example: see GEOM_TestOthers.py
11500             ListIDs = self.GroupOp.GetObjects(theGroup)
11501             RaiseIfFailed("GetObjects", self.GroupOp)
11502             return ListIDs
11503
11504         ## Returns a type of sub-objects stored in the group
11505         #  @param theGroup is a GEOM group which type is returned.
11506         #
11507         #  @ref swig_GetType "Example"
11508         def GetType(self,theGroup):
11509             """
11510             Returns a type of sub-objects stored in the group
11511
11512             Parameters:
11513                 theGroup is a GEOM group which type is returned.
11514             """
11515             # Example: see GEOM_TestOthers.py
11516             aType = self.GroupOp.GetType(theGroup)
11517             RaiseIfFailed("GetType", self.GroupOp)
11518             return aType
11519
11520         ## Convert a type of geom object from id to string value
11521         #  @param theId is a GEOM obect type id.
11522         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11523         #  @ref swig_GetType "Example"
11524         def ShapeIdToType(self, theId):
11525             """
11526             Convert a type of geom object from id to string value
11527
11528             Parameters:
11529                 theId is a GEOM obect type id.
11530                 
11531             Returns:
11532                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11533             """
11534             if theId == 0:
11535                 return "COPY"
11536             if theId == 1:
11537                 return "IMPORT"
11538             if theId == 2:
11539                 return "POINT"
11540             if theId == 3:
11541                 return "VECTOR"
11542             if theId == 4:
11543                 return "PLANE"
11544             if theId == 5:
11545                 return "LINE"
11546             if theId == 6:
11547                 return "TORUS"
11548             if theId == 7:
11549                 return "BOX"
11550             if theId == 8:
11551                 return "CYLINDER"
11552             if theId == 9:
11553                 return "CONE"
11554             if theId == 10:
11555                 return "SPHERE"
11556             if theId == 11:
11557                 return "PRISM"
11558             if theId == 12:
11559                 return "REVOLUTION"
11560             if theId == 13:
11561                 return "BOOLEAN"
11562             if theId == 14:
11563                 return "PARTITION"
11564             if theId == 15:
11565                 return "POLYLINE"
11566             if theId == 16:
11567                 return "CIRCLE"
11568             if theId == 17:
11569                 return "SPLINE"
11570             if theId == 18:
11571                 return "ELLIPSE"
11572             if theId == 19:
11573                 return "CIRC_ARC"
11574             if theId == 20:
11575                 return "FILLET"
11576             if theId == 21:
11577                 return "CHAMFER"
11578             if theId == 22:
11579                 return "EDGE"
11580             if theId == 23:
11581                 return "WIRE"
11582             if theId == 24:
11583                 return "FACE"
11584             if theId == 25:
11585                 return "SHELL"
11586             if theId == 26:
11587                 return "SOLID"
11588             if theId == 27:
11589                 return "COMPOUND"
11590             if theId == 28:
11591                 return "SUBSHAPE"
11592             if theId == 29:
11593                 return "PIPE"
11594             if theId == 30:
11595                 return "ARCHIMEDE"
11596             if theId == 31:
11597                 return "FILLING"
11598             if theId == 32:
11599                 return "EXPLODE"
11600             if theId == 33:
11601                 return "GLUED"
11602             if theId == 34:
11603                 return "SKETCHER"
11604             if theId == 35:
11605                 return "CDG"
11606             if theId == 36:
11607                 return "FREE_BOUNDS"
11608             if theId == 37:
11609                 return "GROUP"
11610             if theId == 38:
11611                 return "BLOCK"
11612             if theId == 39:
11613                 return "MARKER"
11614             if theId == 40:
11615                 return "THRUSECTIONS"
11616             if theId == 41:
11617                 return "COMPOUNDFILTER"
11618             if theId == 42:
11619                 return "SHAPES_ON_SHAPE"
11620             if theId == 43:
11621                 return "ELLIPSE_ARC"
11622             if theId == 44:
11623                 return "3DSKETCHER"
11624             if theId == 45:
11625                 return "FILLET_2D"
11626             if theId == 46:
11627                 return "FILLET_1D"
11628             if theId == 201:
11629                 return "PIPETSHAPE"
11630             return "Shape Id not exist."
11631
11632         ## Returns a main shape associated with the group
11633         #  @param theGroup is a GEOM group for which a main shape object is requested
11634         #  @return a GEOM object which is a main shape for theGroup
11635         #
11636         #  @ref swig_GetMainShape "Example"
11637         def GetMainShape(self,theGroup):
11638             """
11639             Returns a main shape associated with the group
11640
11641             Parameters:
11642                 theGroup is a GEOM group for which a main shape object is requested
11643
11644             Returns:
11645                 a GEOM object which is a main shape for theGroup
11646
11647             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
11648             """
11649             # Example: see GEOM_TestOthers.py
11650             anObj = self.GroupOp.GetMainShape(theGroup)
11651             RaiseIfFailed("GetMainShape", self.GroupOp)
11652             return anObj
11653
11654         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
11655         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11656         #  @param theShape given shape (see GEOM.GEOM_Object)
11657         #  @param min_length minimum length of edges of theShape
11658         #  @param max_length maximum length of edges of theShape
11659         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11660         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11661         #  @param theName Object name; when specified, this parameter is used
11662         #         for result publication in the study. Otherwise, if automatic
11663         #         publication is switched on, default value is used for result name.
11664         #
11665         #  @return a newly created GEOM group of edges
11666         #
11667         #  @@ref swig_todo "Example"
11668         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
11669             """
11670             Create group of edges of theShape, whose length is in range [min_length, max_length].
11671             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11672
11673             Parameters:
11674                 theShape given shape
11675                 min_length minimum length of edges of theShape
11676                 max_length maximum length of edges of theShape
11677                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11678                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11679                 theName Object name; when specified, this parameter is used
11680                         for result publication in the study. Otherwise, if automatic
11681                         publication is switched on, default value is used for result name.
11682
11683              Returns:
11684                 a newly created GEOM group of edges.
11685             """
11686             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
11687             edges_in_range = []
11688             for edge in edges:
11689                 Props = self.BasicProperties(edge)
11690                 if min_length <= Props[0] and Props[0] <= max_length:
11691                     if (not include_min) and (min_length == Props[0]):
11692                         skip = 1
11693                     else:
11694                         if (not include_max) and (Props[0] == max_length):
11695                             skip = 1
11696                         else:
11697                             edges_in_range.append(edge)
11698
11699             if len(edges_in_range) <= 0:
11700                 print "No edges found by given criteria"
11701                 return None
11702
11703             # note: auto-publishing is done in self.CreateGroup()
11704             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
11705             self.UnionList(group_edges, edges_in_range)
11706
11707             return group_edges
11708
11709         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
11710         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11711         #  @param min_length minimum length of edges of selected shape
11712         #  @param max_length maximum length of edges of selected shape
11713         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11714         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11715         #  @return a newly created GEOM group of edges
11716         #  @ref swig_todo "Example"
11717         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
11718             """
11719             Create group of edges of selected shape, whose length is in range [min_length, max_length].
11720             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11721
11722             Parameters:
11723                 min_length minimum length of edges of selected shape
11724                 max_length maximum length of edges of selected shape
11725                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11726                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11727
11728              Returns:
11729                 a newly created GEOM group of edges.
11730             """
11731             nb_selected = sg.SelectedCount()
11732             if nb_selected < 1:
11733                 print "Select a shape before calling this function, please."
11734                 return 0
11735             if nb_selected > 1:
11736                 print "Only one shape must be selected"
11737                 return 0
11738
11739             id_shape = sg.getSelected(0)
11740             shape = IDToObject( id_shape )
11741
11742             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
11743
11744             left_str  = " < "
11745             right_str = " < "
11746             if include_min: left_str  = " <= "
11747             if include_max: right_str  = " <= "
11748
11749             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
11750                                     + left_str + "length" + right_str + `max_length`)
11751
11752             sg.updateObjBrowser(1)
11753
11754             return group_edges
11755
11756         # end of l3_groups
11757         ## @}
11758
11759         ## @addtogroup l4_advanced
11760         ## @{
11761
11762         ## Create a T-shape object with specified caracteristics for the main
11763         #  and the incident pipes (radius, width, half-length).
11764         #  The extremities of the main pipe are located on junctions points P1 and P2.
11765         #  The extremity of the incident pipe is located on junction point P3.
11766         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11767         #  the main plane of the T-shape is XOY.
11768         #
11769         #  @param theR1 Internal radius of main pipe
11770         #  @param theW1 Width of main pipe
11771         #  @param theL1 Half-length of main pipe
11772         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11773         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11774         #  @param theL2 Half-length of incident pipe
11775         #
11776         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11777         #  @param theP1 1st junction point of main pipe
11778         #  @param theP2 2nd junction point of main pipe
11779         #  @param theP3 Junction point of incident pipe
11780         #
11781         #  @param theRL Internal radius of left thickness reduction
11782         #  @param theWL Width of left thickness reduction
11783         #  @param theLtransL Length of left transition part
11784         #  @param theLthinL Length of left thin part
11785         #
11786         #  @param theRR Internal radius of right thickness reduction
11787         #  @param theWR Width of right thickness reduction
11788         #  @param theLtransR Length of right transition part
11789         #  @param theLthinR Length of right thin part
11790         #
11791         #  @param theRI Internal radius of incident thickness reduction
11792         #  @param theWI Width of incident thickness reduction
11793         #  @param theLtransI Length of incident transition part
11794         #  @param theLthinI Length of incident thin part
11795         #
11796         #  @param theName Object name; when specified, this parameter is used
11797         #         for result publication in the study. Otherwise, if automatic
11798         #         publication is switched on, default value is used for result name.
11799         #
11800         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11801         #
11802         #  @ref tui_creation_pipetshape "Example"
11803         def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
11804                             theHexMesh=True, theP1=None, theP2=None, theP3=None,
11805                             theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11806                             theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11807                             theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11808                             theName=None):
11809             """
11810             Create a T-shape object with specified caracteristics for the main
11811             and the incident pipes (radius, width, half-length).
11812             The extremities of the main pipe are located on junctions points P1 and P2.
11813             The extremity of the incident pipe is located on junction point P3.
11814             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11815             the main plane of the T-shape is XOY.
11816
11817             Parameters:
11818                 theR1 Internal radius of main pipe
11819                 theW1 Width of main pipe
11820                 theL1 Half-length of main pipe
11821                 theR2 Internal radius of incident pipe (R2 < R1)
11822                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11823                 theL2 Half-length of incident pipe
11824                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11825                 theP1 1st junction point of main pipe
11826                 theP2 2nd junction point of main pipe
11827                 theP3 Junction point of incident pipe
11828
11829                 theRL Internal radius of left thickness reduction
11830                 theWL Width of left thickness reduction
11831                 theLtransL Length of left transition part
11832                 theLthinL Length of left thin part
11833
11834                 theRR Internal radius of right thickness reduction
11835                 theWR Width of right thickness reduction
11836                 theLtransR Length of right transition part
11837                 theLthinR Length of right thin part
11838
11839                 theRI Internal radius of incident thickness reduction
11840                 theWI Width of incident thickness reduction
11841                 theLtransI Length of incident transition part
11842                 theLthinI Length of incident thin part
11843
11844                 theName Object name; when specified, this parameter is used
11845                         for result publication in the study. Otherwise, if automatic
11846                         publication is switched on, default value is used for result name.
11847
11848             Returns:
11849                 List of GEOM_Object, containing the created shape and propagation groups.
11850
11851             Example of usage:
11852                 # create PipeTShape object
11853                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
11854                 # create PipeTShape object with position
11855                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
11856                 # create PipeTShape object with left thickness reduction
11857                 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
11858             """
11859             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)
11860             if (theP1 and theP2 and theP3):
11861                 anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11862                                                                 theRL, theWL, theLtransL, theLthinL,
11863                                                                 theRR, theWR, theLtransR, theLthinR,
11864                                                                 theRI, theWI, theLtransI, theLthinI,
11865                                                                 theHexMesh, theP1, theP2, theP3)
11866             else:
11867                 anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
11868                                                     theRL, theWL, theLtransL, theLthinL,
11869                                                     theRR, theWR, theLtransR, theLthinR,
11870                                                     theRI, theWI, theLtransI, theLthinI,
11871                                                     theHexMesh)
11872             RaiseIfFailed("MakePipeTShape", self.AdvOp)
11873             if Parameters: anObj[0].SetParameters(Parameters)
11874             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11875             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11876             return anObj
11877
11878         ## Create a T-shape object with chamfer and with specified caracteristics for the main
11879         #  and the incident pipes (radius, width, half-length). The chamfer is
11880         #  created on the junction of the pipes.
11881         #  The extremities of the main pipe are located on junctions points P1 and P2.
11882         #  The extremity of the incident pipe is located on junction point P3.
11883         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11884         #  the main plane of the T-shape is XOY.
11885         #  @param theR1 Internal radius of main pipe
11886         #  @param theW1 Width of main pipe
11887         #  @param theL1 Half-length of main pipe
11888         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11889         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11890         #  @param theL2 Half-length of incident pipe
11891         #  @param theH Height of the chamfer.
11892         #  @param theW Width of the chamfer.
11893         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11894         #  @param theP1 1st junction point of main pipe
11895         #  @param theP2 2nd junction point of main pipe
11896         #  @param theP3 Junction point of incident pipe
11897         #
11898         #  @param theRL Internal radius of left thickness reduction
11899         #  @param theWL Width of left thickness reduction
11900         #  @param theLtransL Length of left transition part
11901         #  @param theLthinL Length of left thin part
11902         #
11903         #  @param theRR Internal radius of right thickness reduction
11904         #  @param theWR Width of right thickness reduction
11905         #  @param theLtransR Length of right transition part
11906         #  @param theLthinR Length of right thin part
11907         #
11908         #  @param theRI Internal radius of incident thickness reduction
11909         #  @param theWI Width of incident thickness reduction
11910         #  @param theLtransI Length of incident transition part
11911         #  @param theLthinI Length of incident thin part
11912         #
11913         #  @param theName Object name; when specified, this parameter is used
11914         #         for result publication in the study. Otherwise, if automatic
11915         #         publication is switched on, default value is used for result name.
11916         #
11917         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11918         #
11919         #  @ref tui_creation_pipetshape "Example"
11920         def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
11921                                    theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
11922                                    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11923                                    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11924                                    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11925                                    theName=None):
11926             """
11927             Create a T-shape object with chamfer and with specified caracteristics for the main
11928             and the incident pipes (radius, width, half-length). The chamfer is
11929             created on the junction of the pipes.
11930             The extremities of the main pipe are located on junctions points P1 and P2.
11931             The extremity of the incident pipe is located on junction point P3.
11932             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11933             the main plane of the T-shape is XOY.
11934
11935             Parameters:
11936                 theR1 Internal radius of main pipe
11937                 theW1 Width of main pipe
11938                 theL1 Half-length of main pipe
11939                 theR2 Internal radius of incident pipe (R2 < R1)
11940                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11941                 theL2 Half-length of incident pipe
11942                 theH Height of the chamfer.
11943                 theW Width of the chamfer.
11944                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11945                 theP1 1st junction point of main pipe
11946                 theP2 2nd junction point of main pipe
11947                 theP3 Junction point of incident pipe
11948
11949                 theRL Internal radius of left thickness reduction
11950                 theWL Width of left thickness reduction
11951                 theLtransL Length of left transition part
11952                 theLthinL Length of left thin part
11953
11954                 theRR Internal radius of right thickness reduction
11955                 theWR Width of right thickness reduction
11956                 theLtransR Length of right transition part
11957                 theLthinR Length of right thin part
11958
11959                 theRI Internal radius of incident thickness reduction
11960                 theWI Width of incident thickness reduction
11961                 theLtransI Length of incident transition part
11962                 theLthinI Length of incident thin part
11963
11964                 theName Object name; when specified, this parameter is used
11965                         for result publication in the study. Otherwise, if automatic
11966                         publication is switched on, default value is used for result name.
11967
11968             Returns:
11969                 List of GEOM_Object, containing the created shape and propagation groups.
11970
11971             Example of usage:
11972                 # create PipeTShape with chamfer object
11973                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
11974                 # create PipeTShape with chamfer object with position
11975                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
11976                 # create PipeTShape with chamfer object with left thickness reduction
11977                 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)
11978             """
11979             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)
11980             if (theP1 and theP2 and theP3):
11981               anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11982                                                                      theRL, theWL, theLtransL, theLthinL,
11983                                                                      theRR, theWR, theLtransR, theLthinR,
11984                                                                      theRI, theWI, theLtransI, theLthinI,
11985                                                                      theH, theW, theHexMesh, theP1, theP2, theP3)
11986             else:
11987               anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
11988                                                          theRL, theWL, theLtransL, theLthinL,
11989                                                          theRR, theWR, theLtransR, theLthinR,
11990                                                          theRI, theWI, theLtransI, theLthinI,
11991                                                          theH, theW, theHexMesh)
11992             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
11993             if Parameters: anObj[0].SetParameters(Parameters)
11994             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11995             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11996             return anObj
11997
11998         ## Create a T-shape object with fillet and with specified caracteristics for the main
11999         #  and the incident pipes (radius, width, half-length). The fillet is
12000         #  created on the junction of the pipes.
12001         #  The extremities of the main pipe are located on junctions points P1 and P2.
12002         #  The extremity of the incident pipe is located on junction point P3.
12003         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12004         #  the main plane of the T-shape is XOY.
12005         #  @param theR1 Internal radius of main pipe
12006         #  @param theW1 Width of main pipe
12007         #  @param theL1 Half-length of main pipe
12008         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12009         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12010         #  @param theL2 Half-length of incident pipe
12011         #  @param theRF Radius of curvature of fillet.
12012         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12013         #  @param theP1 1st junction point of main pipe
12014         #  @param theP2 2nd junction point of main pipe
12015         #  @param theP3 Junction point of incident pipe
12016         #
12017         #  @param theRL Internal radius of left thickness reduction
12018         #  @param theWL Width of left thickness reduction
12019         #  @param theLtransL Length of left transition part
12020         #  @param theLthinL Length of left thin part
12021         #
12022         #  @param theRR Internal radius of right thickness reduction
12023         #  @param theWR Width of right thickness reduction
12024         #  @param theLtransR Length of right transition part
12025         #  @param theLthinR Length of right thin part
12026         #
12027         #  @param theRI Internal radius of incident thickness reduction
12028         #  @param theWI Width of incident thickness reduction
12029         #  @param theLtransI Length of incident transition part
12030         #  @param theLthinI Length of incident thin part
12031         #
12032         #  @param theName Object name; when specified, this parameter is used
12033         #         for result publication in the study. Otherwise, if automatic
12034         #         publication is switched on, default value is used for result name.
12035         #
12036         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12037         #
12038         #  @ref tui_creation_pipetshape "Example"
12039         def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
12040                                   theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12041                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12042                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12043                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12044                                   theName=None):
12045             """
12046             Create a T-shape object with fillet and with specified caracteristics for the main
12047             and the incident pipes (radius, width, half-length). The fillet is
12048             created on the junction of the pipes.
12049             The extremities of the main pipe are located on junctions points P1 and P2.
12050             The extremity of the incident pipe is located on junction point P3.
12051
12052             Parameters:
12053                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12054                 the main plane of the T-shape is XOY.
12055                 theR1 Internal radius of main pipe
12056                 theW1 Width of main pipe
12057                 heL1 Half-length of main pipe
12058                 theR2 Internal radius of incident pipe (R2 < R1)
12059                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12060                 theL2 Half-length of incident pipe
12061                 theRF Radius of curvature of fillet.
12062                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12063                 theP1 1st junction point of main pipe
12064                 theP2 2nd junction point of main pipe
12065                 theP3 Junction point of incident pipe
12066
12067                 theRL Internal radius of left thickness reduction
12068                 theWL Width of left thickness reduction
12069                 theLtransL Length of left transition part
12070                 theLthinL Length of left thin part
12071
12072                 theRR Internal radius of right thickness reduction
12073                 theWR Width of right thickness reduction
12074                 theLtransR Length of right transition part
12075                 theLthinR Length of right thin part
12076
12077                 theRI Internal radius of incident thickness reduction
12078                 theWI Width of incident thickness reduction
12079                 theLtransI Length of incident transition part
12080                 theLthinI Length of incident thin part
12081
12082                 theName Object name; when specified, this parameter is used
12083                         for result publication in the study. Otherwise, if automatic
12084                         publication is switched on, default value is used for result name.
12085                 
12086             Returns:
12087                 List of GEOM_Object, containing the created shape and propagation groups.
12088                 
12089             Example of usage:
12090                 # create PipeTShape with fillet object
12091                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
12092                 # create PipeTShape with fillet object with position
12093                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
12094                 # create PipeTShape with fillet object with left thickness reduction
12095                 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)
12096             """
12097             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)
12098             if (theP1 and theP2 and theP3):
12099               anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12100                                                                     theRL, theWL, theLtransL, theLthinL,
12101                                                                     theRR, theWR, theLtransR, theLthinR,
12102                                                                     theRI, theWI, theLtransI, theLthinI,
12103                                                                     theRF, theHexMesh, theP1, theP2, theP3)
12104             else:
12105               anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
12106                                                         theRL, theWL, theLtransL, theLthinL,
12107                                                         theRR, theWR, theLtransR, theLthinR,
12108                                                         theRI, theWI, theLtransI, theLthinI,
12109                                                         theRF, theHexMesh)
12110             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
12111             if Parameters: anObj[0].SetParameters(Parameters)
12112             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12113             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12114             return anObj
12115
12116         ## This function allows creating a disk already divided into blocks. It
12117         #  can be used to create divided pipes for later meshing in hexaedra.
12118         #  @param theR Radius of the disk
12119         #  @param theOrientation Orientation of the plane on which the disk will be built
12120         #         1 = XOY, 2 = OYZ, 3 = OZX
12121         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12122         #  @param theName Object name; when specified, this parameter is used
12123         #         for result publication in the study. Otherwise, if automatic
12124         #         publication is switched on, default value is used for result name.
12125         #
12126         #  @return New GEOM_Object, containing the created shape.
12127         #
12128         #  @ref tui_creation_divideddisk "Example"
12129         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
12130             """
12131             Creates a disk, divided into blocks. It can be used to create divided pipes
12132             for later meshing in hexaedra.
12133
12134             Parameters:
12135                 theR Radius of the disk
12136                 theOrientation Orientation of the plane on which the disk will be built:
12137                                1 = XOY, 2 = OYZ, 3 = OZX
12138                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12139                 theName Object name; when specified, this parameter is used
12140                         for result publication in the study. Otherwise, if automatic
12141                         publication is switched on, default value is used for result name.
12142
12143             Returns:
12144                 New GEOM_Object, containing the created shape.
12145             """
12146             theR, Parameters = ParseParameters(theR)
12147             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
12148             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
12149             if Parameters: anObj.SetParameters(Parameters)
12150             self._autoPublish(anObj, theName, "dividedDisk")
12151             return anObj
12152             
12153         ## This function allows creating a disk already divided into blocks. It
12154         #  can be used to create divided pipes for later meshing in hexaedra.
12155         #  @param theCenter Center of the disk
12156         #  @param theVector Normal vector to the plane of the created disk
12157         #  @param theRadius Radius of the disk
12158         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12159         #  @param theName Object name; when specified, this parameter is used
12160         #         for result publication in the study. Otherwise, if automatic
12161         #         publication is switched on, default value is used for result name.
12162         #
12163         #  @return New GEOM_Object, containing the created shape.
12164         #
12165         #  @ref tui_creation_divideddisk "Example"
12166         def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
12167             """
12168             Creates a disk already divided into blocks. It can be used to create divided pipes
12169             for later meshing in hexaedra.
12170
12171             Parameters:
12172                 theCenter Center of the disk
12173                 theVector Normal vector to the plane of the created disk
12174                 theRadius Radius of the disk
12175                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12176                 theName Object name; when specified, this parameter is used
12177                         for result publication in the study. Otherwise, if automatic
12178                         publication is switched on, default value is used for result name.
12179
12180             Returns:
12181                 New GEOM_Object, containing the created shape.
12182             """
12183             theRadius, Parameters = ParseParameters(theRadius)
12184             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
12185             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
12186             if Parameters: anObj.SetParameters(Parameters)
12187             self._autoPublish(anObj, theName, "dividedDisk")
12188             return anObj
12189
12190         ## Builds a cylinder prepared for hexa meshes
12191         #  @param theR Radius of the cylinder
12192         #  @param theH Height of the cylinder
12193         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12194         #  @param theName Object name; when specified, this parameter is used
12195         #         for result publication in the study. Otherwise, if automatic
12196         #         publication is switched on, default value is used for result name.
12197         #
12198         #  @return New GEOM_Object, containing the created shape.
12199         #
12200         #  @ref tui_creation_dividedcylinder "Example"
12201         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
12202             """
12203             Builds a cylinder prepared for hexa meshes
12204
12205             Parameters:
12206                 theR Radius of the cylinder
12207                 theH Height of the cylinder
12208                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12209                 theName Object name; when specified, this parameter is used
12210                         for result publication in the study. Otherwise, if automatic
12211                         publication is switched on, default value is used for result name.
12212
12213             Returns:
12214                 New GEOM_Object, containing the created shape.
12215             """
12216             theR, theH, Parameters = ParseParameters(theR, theH)
12217             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
12218             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
12219             if Parameters: anObj.SetParameters(Parameters)
12220             self._autoPublish(anObj, theName, "dividedCylinder")
12221             return anObj
12222
12223         ## 
12224         #  @param thelPoints list of  points
12225         #  @return New GEOM_Object, containing the created shape.
12226         #
12227         #  @ref tui_creation_smoothingsurface "Example"
12228         def MakeSmoothingSurface(self, thelPoints):
12229             thelPoints, Parameters = ParseParameters(thelPoints)
12230             anObj = self.AdvOp.MakeSmoothingSurface(thelPoints)
12231             RaiseIfFailed("MakeSmoothingSurface", self.AdvOp)
12232             if Parameters: anObj.SetParameters(Parameters)
12233             return anObj
12234
12235         #@@ insert new functions before this line @@ do not remove this line @@#
12236
12237         # end of l4_advanced
12238         ## @}
12239
12240         ## Create a copy of the given object
12241         #
12242         #  @param theOriginal geometry object for copy
12243         #  @param theName Object name; when specified, this parameter is used
12244         #         for result publication in the study. Otherwise, if automatic
12245         #         publication is switched on, default value is used for result name.
12246         #
12247         #  @return New GEOM_Object, containing the copied shape.
12248         #
12249         #  @ingroup l1_geomBuilder_auxiliary
12250         #  @ref swig_MakeCopy "Example"
12251         def MakeCopy(self, theOriginal, theName=None):
12252             """
12253             Create a copy of the given object
12254
12255             Parameters:
12256                 theOriginal geometry object for copy
12257                 theName Object name; when specified, this parameter is used
12258                         for result publication in the study. Otherwise, if automatic
12259                         publication is switched on, default value is used for result name.
12260
12261             Returns:
12262                 New GEOM_Object, containing the copied shape.
12263
12264             Example of usage: Copy = geompy.MakeCopy(Box)
12265             """
12266             # Example: see GEOM_TestAll.py
12267             anObj = self.InsertOp.MakeCopy(theOriginal)
12268             RaiseIfFailed("MakeCopy", self.InsertOp)
12269             self._autoPublish(anObj, theName, "copy")
12270             return anObj
12271
12272         ## Add Path to load python scripts from
12273         #  @param Path a path to load python scripts from
12274         #  @ingroup l1_geomBuilder_auxiliary
12275         def addPath(self,Path):
12276             """
12277             Add Path to load python scripts from
12278
12279             Parameters:
12280                 Path a path to load python scripts from
12281             """
12282             if (sys.path.count(Path) < 1):
12283                 sys.path.append(Path)
12284                 pass
12285             pass
12286
12287         ## Load marker texture from the file
12288         #  @param Path a path to the texture file
12289         #  @return unique texture identifier
12290         #  @ingroup l1_geomBuilder_auxiliary
12291         def LoadTexture(self, Path):
12292             """
12293             Load marker texture from the file
12294             
12295             Parameters:
12296                 Path a path to the texture file
12297                 
12298             Returns:
12299                 unique texture identifier
12300             """
12301             # Example: see GEOM_TestAll.py
12302             ID = self.InsertOp.LoadTexture(Path)
12303             RaiseIfFailed("LoadTexture", self.InsertOp)
12304             return ID
12305
12306         ## Get internal name of the object based on its study entry
12307         #  @note This method does not provide an unique identifier of the geometry object.
12308         #  @note This is internal function of GEOM component, though it can be used outside it for 
12309         #  appropriate reason (e.g. for identification of geometry object).
12310         #  @param obj geometry object
12311         #  @return unique object identifier
12312         #  @ingroup l1_geomBuilder_auxiliary
12313         def getObjectID(self, obj):
12314             """
12315             Get internal name of the object based on its study entry.
12316             Note: this method does not provide an unique identifier of the geometry object.
12317             It is an internal function of GEOM component, though it can be used outside GEOM for 
12318             appropriate reason (e.g. for identification of geometry object).
12319
12320             Parameters:
12321                 obj geometry object
12322
12323             Returns:
12324                 unique object identifier
12325             """
12326             ID = ""
12327             entry = salome.ObjectToID(obj)
12328             if entry is not None:
12329                 lst = entry.split(":")
12330                 if len(lst) > 0:
12331                     ID = lst[-1] # -1 means last item in the list            
12332                     return "GEOM_" + ID
12333             return ID
12334                 
12335             
12336
12337         ## Add marker texture. @a Width and @a Height parameters
12338         #  specify width and height of the texture in pixels.
12339         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12340         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12341         #  parameter should be unpacked string, in which '1' symbols represent opaque
12342         #  pixels and '0' represent transparent pixels of the texture bitmap.
12343         #
12344         #  @param Width texture width in pixels
12345         #  @param Height texture height in pixels
12346         #  @param Texture texture data
12347         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12348         #  @return unique texture identifier
12349         #  @ingroup l1_geomBuilder_auxiliary
12350         def AddTexture(self, Width, Height, Texture, RowData=False):
12351             """
12352             Add marker texture. Width and Height parameters
12353             specify width and height of the texture in pixels.
12354             If RowData is True, Texture parameter should represent texture data
12355             packed into the byte array. If RowData is False (default), Texture
12356             parameter should be unpacked string, in which '1' symbols represent opaque
12357             pixels and '0' represent transparent pixels of the texture bitmap.
12358
12359             Parameters:
12360                 Width texture width in pixels
12361                 Height texture height in pixels
12362                 Texture texture data
12363                 RowData if True, Texture data are packed in the byte stream
12364
12365             Returns:
12366                 return unique texture identifier
12367             """
12368             if not RowData: Texture = PackData(Texture)
12369             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12370             RaiseIfFailed("AddTexture", self.InsertOp)
12371             return ID
12372
12373 import omniORB
12374 # Register the new proxy for GEOM_Gen
12375 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
12376
12377 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
12378 #  interface to GEOM operations.
12379 #
12380 #  Typical use is:
12381 #  \code
12382 #    import salome
12383 #    salome.salome_init()
12384 #    from salome.geom import geomBuilder
12385 #    geompy = geomBuilder.New(salome.myStudy)
12386 #  \endcode
12387 #  @param  study     SALOME study, generally obtained by salome.myStudy.
12388 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12389 #  @return geomBuilder instance
12390 def New( study, instance=None):
12391     """
12392     Create a new geomBuilder instance.The geomBuilder class provides the Python
12393     interface to GEOM operations.
12394
12395     Typical use is:
12396         import salome
12397         salome.salome_init()
12398         from salome.geom import geomBuilder
12399         geompy = geomBuilder.New(salome.myStudy)
12400
12401     Parameters:
12402         study     SALOME study, generally obtained by salome.myStudy.
12403         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12404     Returns:
12405         geomBuilder instance
12406     """
12407     #print "New geomBuilder ", study, instance
12408     global engine
12409     global geom
12410     global doLcc
12411     engine = instance
12412     if engine is None:
12413       doLcc = True
12414     geom = geomBuilder()
12415     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
12416     geom.init_geom(study)
12417     return geom