]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOM_SWIG/geomBuilder.py
Salome HOME
d26f3c6652bf9eaa12b59a88f24cc58b5eb5ac42
[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 ##   \a theName parameter (and, thus, do not support automatic publication).
143 ##   For example, some transformation operations like
144 ##   \ref geomBuilder.geomBuilder.TranslateDXDYDZ() "TranslateDXDYDZ()".
145 ##   Refer to the documentation to check if some function has such possibility.
146 ##
147 ## @}
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 ##   @defgroup l2_field         Field on Geometry
196
197 ## @}
198
199 # initialize SALOME session in try/except block
200 # to avoid problems in some cases, e.g. when generating documentation
201 try:
202     import salome
203     salome.salome_init()
204     from salome import *
205 except:
206     pass
207
208 from salome_notebook import *
209
210 import GEOM
211 import math
212 import os
213
214 from salome.geom.gsketcher import Sketcher3D, Sketcher2D
215
216 # service function
217 def _toListOfNames(_names, _size=-1):
218     l = []
219     import types
220     if type(_names) in [types.ListType, types.TupleType]:
221         for i in _names: l.append(i)
222     elif _names:
223         l.append(_names)
224     if l and len(l) < _size:
225         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
226     return l
227
228 ## Raise an Error, containing the Method_name, if Operation is Failed
229 ## @ingroup l1_geomBuilder_auxiliary
230 def RaiseIfFailed (Method_name, Operation):
231     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
232         Operation.AbortOperation()
233         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
234     else:
235         Operation.FinishOperation()
236         pass
237
238 ## Return list of variables value from salome notebook
239 ## @ingroup l1_geomBuilder_auxiliary
240 def ParseParameters(*parameters):
241     Result = []
242     StringResult = []
243     for parameter in parameters:
244         if isinstance(parameter, list):
245             lResults = ParseParameters(*parameter)
246             if len(lResults) > 0:
247                 Result.append(lResults[:-1])
248                 StringResult += lResults[-1].split(":")
249                 pass
250             pass
251         else:
252             if isinstance(parameter,str):
253                 if notebook.isVariable(parameter):
254                     Result.append(notebook.get(parameter))
255                 else:
256                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
257                 pass
258             else:
259                 Result.append(parameter)
260                 pass
261             StringResult.append(str(parameter))
262             pass
263         pass
264     if Result:
265         Result.append(":".join(StringResult))
266     else:
267         Result = ":".join(StringResult)
268     return Result
269
270 ## Return list of variables value from salome notebook
271 ## @ingroup l1_geomBuilder_auxiliary
272 def ParseList(list):
273     Result = []
274     StringResult = ""
275     for parameter in list:
276         if isinstance(parameter,str) and notebook.isVariable(parameter):
277             Result.append(str(notebook.get(parameter)))
278             pass
279         else:
280             Result.append(str(parameter))
281             pass
282
283         StringResult = StringResult + str(parameter)
284         StringResult = StringResult + ":"
285         pass
286     StringResult = StringResult[:len(StringResult)-1]
287     return Result, StringResult
288
289 ## Return list of variables value from salome notebook
290 ## @ingroup l1_geomBuilder_auxiliary
291 def ParseSketcherCommand(command):
292     Result = ""
293     StringResult = ""
294     sections = command.split(":")
295     for section in sections:
296         parameters = section.split(" ")
297         paramIndex = 1
298         for parameter in parameters:
299             if paramIndex > 1 and parameter.find("'") != -1:
300                 parameter = parameter.replace("'","")
301                 if notebook.isVariable(parameter):
302                     Result = Result + str(notebook.get(parameter)) + " "
303                     pass
304                 else:
305                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
306                     pass
307                 pass
308             else:
309                 Result = Result + str(parameter) + " "
310                 pass
311             if paramIndex > 1:
312                 StringResult = StringResult + parameter
313                 StringResult = StringResult + ":"
314                 pass
315             paramIndex = paramIndex + 1
316             pass
317         Result = Result[:len(Result)-1] + ":"
318         pass
319     Result = Result[:len(Result)-1]
320     return Result, StringResult
321
322 ## Helper function which can be used to pack the passed string to the byte data.
323 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
324 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
325 ## For example,
326 ## \code
327 ## val = PackData("10001110") # val = 0xAE
328 ## val = PackData("1")        # val = 0x80
329 ## \endcode
330 ## @param data unpacked data - a string containing '1' and '0' symbols
331 ## @return data packed to the byte stream
332 ## @ingroup l1_geomBuilder_auxiliary
333 def PackData(data):
334     """
335     Helper function which can be used to pack the passed string to the byte data.
336     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
337     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
338
339     Parameters:
340         data unpacked data - a string containing '1' and '0' symbols
341
342     Returns:
343         data packed to the byte stream
344         
345     Example of usage:
346         val = PackData("10001110") # val = 0xAE
347         val = PackData("1")        # val = 0x80
348     """
349     bytes = len(data)/8
350     if len(data)%8: bytes += 1
351     res = ""
352     for b in range(bytes):
353         d = data[b*8:(b+1)*8]
354         val = 0
355         for i in range(8):
356             val *= 2
357             if i < len(d):
358                 if d[i] == "1": val += 1
359                 elif d[i] != "0":
360                     raise "Invalid symbol %s" % d[i]
361                 pass
362             pass
363         res += chr(val)
364         pass
365     return res
366
367 ## Read bitmap texture from the text file.
368 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
369 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
370 ## The function returns width and height of the pixmap in pixels and byte stream representing
371 ## texture bitmap itself.
372 ##
373 ## This function can be used to read the texture to the byte stream in order to pass it to
374 ## the AddTexture() function of geomBuilder class.
375 ## For example,
376 ## \code
377 ## from salome.geom import geomBuilder
378 ## geompy = geomBuilder.New(salome.myStudy)
379 ## texture = geompy.readtexture('mytexture.dat')
380 ## texture = geompy.AddTexture(*texture)
381 ## obj.SetMarkerTexture(texture)
382 ## \endcode
383 ## @param fname texture file name
384 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
385 ## @ingroup l1_geomBuilder_auxiliary
386 def ReadTexture(fname):
387     """
388     Read bitmap texture from the text file.
389     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
390     A zero symbol ('0') represents transparent pixel of the texture bitmap.
391     The function returns width and height of the pixmap in pixels and byte stream representing
392     texture bitmap itself.
393     This function can be used to read the texture to the byte stream in order to pass it to
394     the AddTexture() function of geomBuilder class.
395     
396     Parameters:
397         fname texture file name
398
399     Returns:
400         sequence of tree values: texture's width, height in pixels and its byte stream
401     
402     Example of usage:
403         from salome.geom import geomBuilder
404         geompy = geomBuilder.New(salome.myStudy)
405         texture = geompy.readtexture('mytexture.dat')
406         texture = geompy.AddTexture(*texture)
407         obj.SetMarkerTexture(texture)
408     """
409     try:
410         f = open(fname)
411         lines = [ l.strip() for l in f.readlines()]
412         f.close()
413         maxlen = 0
414         if lines: maxlen = max([len(x) for x in lines])
415         lenbytes = maxlen/8
416         if maxlen%8: lenbytes += 1
417         bytedata=""
418         for line in lines:
419             if len(line)%8:
420                 lenline = (len(line)/8+1)*8
421                 pass
422             else:
423                 lenline = (len(line)/8)*8
424                 pass
425             for i in range(lenline/8):
426                 byte=""
427                 for j in range(8):
428                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
429                     else: byte += "0"
430                     pass
431                 bytedata += PackData(byte)
432                 pass
433             for i in range(lenline/8, lenbytes):
434                 bytedata += PackData("0")
435             pass
436         return lenbytes*8, len(lines), bytedata
437     except:
438         pass
439     return 0, 0, ""
440
441 ## Returns a long value from enumeration type
442 #  Can be used for CORBA enumerator types like GEOM.shape_type
443 #  @param theItem enumeration type
444 #  @ingroup l1_geomBuilder_auxiliary
445 def EnumToLong(theItem):
446     """
447     Returns a long value from enumeration type
448     Can be used for CORBA enumerator types like geomBuilder.ShapeType
449
450     Parameters:
451         theItem enumeration type
452     """
453     ret = theItem
454     if hasattr(theItem, "_v"): ret = theItem._v
455     return ret
456
457 ## Information about closed/unclosed state of shell or wire
458 #  @ingroup l1_geomBuilder_auxiliary
459 class info:
460     """
461     Information about closed/unclosed state of shell or wire
462     """
463     UNKNOWN  = 0
464     CLOSED   = 1
465     UNCLOSED = 2
466
467 ##! Private class used to bind calls of plugin operations to geomBuilder
468 class PluginOperation:
469   def __init__(self, operation, function):
470     self.operation = operation
471     self.function = function
472     pass
473
474   def __call__(self, *args):
475     res = self.function(self.operation, *args)
476     RaiseIfFailed(self.function.__name__, self.operation)
477     return res
478
479 # Warning: geom is a singleton
480 geom = None
481 engine = None
482 doLcc = False
483 created = False
484
485 class geomBuilder(object, GEOM._objref_GEOM_Gen):
486
487         ## Enumeration ShapeType as a dictionary. \n
488         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
489         #  @ingroup l1_geomBuilder_auxiliary
490         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
491
492         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
493         #  and a list of parameters, describing the shape.
494         #  List of parameters, describing the shape:
495         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
496         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
497         #
498         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
499         #
500         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
501         #
502         #  - SPHERE:       [xc yc zc            R]
503         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
504         #  - BOX:          [xc yc zc                      ax ay az]
505         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
506         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
507         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
508         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
509         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
510         #
511         #  - SPHERE2D:     [xc yc zc            R]
512         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
513         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
514         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
515         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
516         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
517         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
518         #  - PLANE:        [xo yo zo  dx dy dz]
519         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
520         #  - FACE:                                       [nb_edges  nb_vertices]
521         #
522         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
523         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
524         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
525         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
526         #  - LINE:         [xo yo zo  dx dy dz]
527         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
528         #  - EDGE:                                                 [nb_vertices]
529         #
530         #  - VERTEX:       [x  y  z]
531         #  @ingroup l1_geomBuilder_auxiliary
532         kind = GEOM.GEOM_IKindOfShape
533
534         def __new__(cls):
535             global engine
536             global geom
537             global doLcc
538             global created
539             #print "==== __new__ ", engine, geom, doLcc, created
540             if geom is None:
541                 # geom engine is either retrieved from engine, or created
542                 geom = engine
543                 # Following test avoids a recursive loop
544                 if doLcc:
545                     if geom is not None:
546                         # geom engine not created: existing engine found
547                         doLcc = False
548                     if doLcc and not created:
549                         doLcc = False
550                         # FindOrLoadComponent called:
551                         # 1. CORBA resolution of server
552                         # 2. the __new__ method is called again
553                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
554                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
555                         #print "====1 ",geom
556                 else:
557                     # FindOrLoadComponent not called
558                     if geom is None:
559                         # geomBuilder instance is created from lcc.FindOrLoadComponent
560                         #print "==== super ", engine, geom, doLcc, created
561                         geom = super(geomBuilder,cls).__new__(cls)
562                         #print "====2 ",geom
563                     else:
564                         # geom engine not created: existing engine found
565                         #print "==== existing ", engine, geom, doLcc, created
566                         pass
567                 #print "return geom 1 ", geom
568                 return geom
569
570             #print "return geom 2 ", geom
571             return geom
572
573         def __init__(self):
574             global created
575             #print "-------- geomBuilder __init__ --- ", created, self
576             if not created:
577               created = True
578               GEOM._objref_GEOM_Gen.__init__(self)
579               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
580               self.myBuilder = None
581               self.myStudyId = 0
582               self.father    = None
583
584               self.BasicOp  = None
585               self.CurvesOp = None
586               self.PrimOp   = None
587               self.ShapesOp = None
588               self.HealOp   = None
589               self.InsertOp = None
590               self.BoolOp   = None
591               self.TrsfOp   = None
592               self.LocalOp  = None
593               self.MeasuOp  = None
594               self.BlocksOp = None
595               self.GroupOp  = None
596               self.AdvOp    = None
597               self.FieldOp  = None
598             pass
599
600         ## Process object publication in the study, as follows:
601         #  - if @a theName is specified (not None), the object is published in the study
602         #    with this name, not taking into account "auto-publishing" option;
603         #  - if @a theName is NOT specified, the object is published in the study
604         #    (using default name, which can be customized using @a theDefaultName parameter)
605         #    only if auto-publishing is switched on.
606         #
607         #  @param theObj  object, a subject for publishing
608         #  @param theName object name for study
609         #  @param theDefaultName default name for the auto-publishing
610         #
611         #  @sa addToStudyAuto()
612         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
613             # ---
614             def _item_name(_names, _defname, _idx=-1):
615                 if not _names: _names = _defname
616                 if type(_names) in [types.ListType, types.TupleType]:
617                     if _idx >= 0:
618                         if _idx >= len(_names) or not _names[_idx]:
619                             if type(_defname) not in [types.ListType, types.TupleType]:
620                                 _name = "%s_%d"%(_defname, _idx+1)
621                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
622                                 _name = _defname[_idx]
623                             else:
624                                 _name = "%noname_%d"%(dn, _idx+1)
625                             pass
626                         else:
627                             _name = _names[_idx]
628                         pass
629                     else:
630                         # must be wrong  usage
631                         _name = _names[0]
632                     pass
633                 else:
634                     if _idx >= 0:
635                         _name = "%s_%d"%(_names, _idx+1)
636                     else:
637                         _name = _names
638                     pass
639                 return _name
640             # ---
641             def _publish( _name, _obj ):
642                 fatherObj = None
643                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
644                     fatherObj = _obj.GetShape()
645                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
646                     fatherObj = _obj.GetField()
647                 elif not _obj.IsMainShape():
648                     fatherObj = _obj.GetMainShape()
649                     pass
650                 if fatherObj and fatherObj.GetStudyEntry():
651                     self.addToStudyInFather(fatherObj, _obj, _name)
652                 else:
653                     self.addToStudy(_obj, _name)
654                     pass
655                 return
656             # ---
657             if not theObj:
658                 return # null object
659             if not theName and not self.myMaxNbSubShapesAllowed:
660                 return # nothing to do: auto-publishing is disabled
661             if not theName and not theDefaultName:
662                 return # neither theName nor theDefaultName is given
663             import types
664             if type(theObj) in [types.ListType, types.TupleType]:
665                 # list of objects is being published
666                 idx = 0
667                 for obj in theObj:
668                     if not obj: continue # bad object
669                     name = _item_name(theName, theDefaultName, idx)
670                     _publish( name, obj )
671                     idx = idx+1
672                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
673                     pass
674                 pass
675             else:
676                 # single object is published
677                 name = _item_name(theName, theDefaultName)
678                 _publish( name, theObj )
679             pass
680
681         ## @addtogroup l1_geomBuilder_auxiliary
682         ## @{
683         def init_geom(self,theStudy):
684             self.myStudy = theStudy
685             self.myStudyId = self.myStudy._get_StudyId()
686             self.myBuilder = self.myStudy.NewBuilder()
687             self.father = self.myStudy.FindComponent("GEOM")
688             if self.father is None:
689                 self.father = self.myBuilder.NewComponent("GEOM")
690                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
691                 FName = A1._narrow(SALOMEDS.AttributeName)
692                 FName.SetValue("Geometry")
693                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
694                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
695                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
696                 self.myBuilder.DefineComponentInstance(self.father,self)
697                 pass
698             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
699             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
700             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
701             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
702             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
703             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
704             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
705             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
706             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
707             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
708             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
709             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
710             self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
711
712             # The below line is a right way to map all plugin functions to geomBuilder,
713             # but AdvancedOperations are already mapped, that is why this line is commented
714             # and presents here only as an axample
715             #self.AdvOp    = self.GetPluginOperations (self.myStudyId, "AdvancedEngine")
716
717             # self.AdvOp is used by functions MakePipeTShape*, MakeDividedDisk, etc.
718             self.AdvOp = GEOM._objref_GEOM_Gen.GetPluginOperations (self, self.myStudyId, "AdvancedEngine")
719
720             # set GEOM as root in the use case tree
721             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
722             self.myUseCaseBuilder.SetRootCurrent()
723             self.myUseCaseBuilder.Append(self.father)
724             pass
725
726         def GetPluginOperations(self, studyID, libraryName):
727             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
728             if op:
729                 # bind methods of operations to self
730                 methods = op.__class__.__dict__['__methods__']
731                 avoid_methods = self.BasicOp.__class__.__dict__['__methods__']
732                 for meth_name in methods:
733                     if not meth_name in avoid_methods: # avoid basic methods
734                         function = getattr(op.__class__, meth_name)
735                         if callable(function):
736                             #self.__dict__[meth_name] = self.__PluginOperation(op, function)
737                             self.__dict__[meth_name] = PluginOperation(op, function)
738             return op
739
740         ## Enable / disable results auto-publishing
741         # 
742         #  The automatic publishing is managed in the following way:
743         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
744         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
745         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
746         #  value passed as parameter has the same effect.
747         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
748         #  maximum number of sub-shapes allowed for publishing is set to specified value.
749         #
750         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
751         #  @ingroup l1_publish_data
752         def addToStudyAuto(self, maxNbSubShapes=-1):
753             """
754             Enable / disable results auto-publishing
755
756             The automatic publishing is managed in the following way:
757             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
758             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
759             maximum number of sub-shapes allowed for publishing is unlimited; any negative
760             value passed as parameter has the same effect.
761             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
762             maximum number of sub-shapes allowed for publishing is set to this value.
763
764             Parameters:
765                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
766
767             Example of usage:
768                 geompy.addToStudyAuto()   # enable auto-publishing
769                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
770                 geompy.addToStudyAuto(0)  # disable auto-publishing
771             """
772             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
773             pass
774
775         ## Dump component to the Python script
776         #  This method overrides IDL function to allow default values for the parameters.
777         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
778             """
779             Dump component to the Python script
780             This method overrides IDL function to allow default values for the parameters.
781             """
782             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
783
784         ## Get name for sub-shape aSubObj of shape aMainObj
785         #
786         # @ref swig_SubShapeName "Example"
787         def SubShapeName(self,aSubObj, aMainObj):
788             """
789             Get name for sub-shape aSubObj of shape aMainObj
790             """
791             # Example: see GEOM_TestAll.py
792
793             #aSubId  = orb.object_to_string(aSubObj)
794             #aMainId = orb.object_to_string(aMainObj)
795             #index = gg.getIndexTopology(aSubId, aMainId)
796             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
797             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
798             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
799             return name
800
801         ## Publish in study aShape with name aName
802         #
803         #  \param aShape the shape to be published
804         #  \param aName  the name for the shape
805         #  \param doRestoreSubShapes if True, finds and publishes also
806         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
807         #         and published sub-shapes of arguments
808         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
809         #                                                  these arguments description
810         #  \return study entry of the published shape in form of string
811         #
812         #  @ingroup l1_publish_data
813         #  @ref swig_all_addtostudy "Example"
814         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
815                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
816             """
817             Publish in study aShape with name aName
818
819             Parameters:
820                 aShape the shape to be published
821                 aName  the name for the shape
822                 doRestoreSubShapes if True, finds and publishes also
823                                    sub-shapes of aShape, corresponding to its arguments
824                                    and published sub-shapes of arguments
825                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
826                                                          these arguments description
827
828             Returns:
829                 study entry of the published shape in form of string
830
831             Example of usage:
832                 id_block1 = geompy.addToStudy(Block1, "Block 1")
833             """
834             # Example: see GEOM_TestAll.py
835             try:
836                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
837                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
838                 if doRestoreSubShapes:
839                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
840                                             theFindMethod, theInheritFirstArg, True )
841             except:
842                 print "addToStudy() failed"
843                 return ""
844             return aShape.GetStudyEntry()
845
846         ## Publish in study aShape with name aName as sub-object of previously published aFather
847         #  \param aFather previously published object
848         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
849         #  \param aName  the name for the shape
850         #
851         #  \return study entry of the published shape in form of string
852         #
853         #  @ingroup l1_publish_data
854         #  @ref swig_all_addtostudyInFather "Example"
855         def addToStudyInFather(self, aFather, aShape, aName):
856             """
857             Publish in study aShape with name aName as sub-object of previously published aFather
858
859             Parameters:
860                 aFather previously published object
861                 aShape the shape to be published as sub-object of aFather
862                 aName  the name for the shape
863
864             Returns:
865                 study entry of the published shape in form of string
866             """
867             # Example: see GEOM_TestAll.py
868             try:
869                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
870                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
871             except:
872                 print "addToStudyInFather() failed"
873                 return ""
874             return aShape.GetStudyEntry()
875
876         ## Unpublish object in study
877         #
878         #  \param obj the object to be unpublished
879         def hideInStudy(self, obj):
880             """
881             Unpublish object in study
882
883             Parameters:
884                 obj the object to be unpublished
885             """
886             ior = salome.orb.object_to_string(obj)
887             aSObject = self.myStudy.FindObjectIOR(ior)
888             if aSObject is not None:
889                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
890                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
891                 drwAttribute.SetDrawable(False)
892                 pass
893
894         # end of l1_geomBuilder_auxiliary
895         ## @}
896
897         ## @addtogroup l3_restore_ss
898         ## @{
899
900         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
901         #  To be used from python scripts out of addToStudy() (non-default usage)
902         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
903         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
904         #                   If this list is empty, all operation arguments will be published
905         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
906         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
907         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
908         #                            Do not publish sub-shapes in place of arguments, but only
909         #                            in place of sub-shapes of the first argument,
910         #                            because the whole shape corresponds to the first argument.
911         #                            Mainly to be used after transformations, but it also can be
912         #                            usefull after partition with one object shape, and some other
913         #                            operations, where only the first argument has to be considered.
914         #                            If theObject has only one argument shape, this flag is automatically
915         #                            considered as True, not regarding really passed value.
916         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
917         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
918         #  \return list of published sub-shapes
919         #
920         #  @ref tui_restore_prs_params "Example"
921         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
922                               theInheritFirstArg=False, theAddPrefix=True):
923             """
924             Publish sub-shapes, standing for arguments and sub-shapes of arguments
925             To be used from python scripts out of geompy.addToStudy (non-default usage)
926
927             Parameters:
928                 theObject published GEOM.GEOM_Object, arguments of which will be published
929                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
930                           If this list is empty, all operation arguments will be published
931                 theFindMethod method to search sub-shapes, corresponding to arguments and
932                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
933                 theInheritFirstArg set properties of the first argument for theObject.
934                                    Do not publish sub-shapes in place of arguments, but only
935                                    in place of sub-shapes of the first argument,
936                                    because the whole shape corresponds to the first argument.
937                                    Mainly to be used after transformations, but it also can be
938                                    usefull after partition with one object shape, and some other
939                                    operations, where only the first argument has to be considered.
940                                    If theObject has only one argument shape, this flag is automatically
941                                    considered as True, not regarding really passed value.
942                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
943                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
944             Returns:
945                 list of published sub-shapes
946             """
947             # Example: see GEOM_TestAll.py
948             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
949                                           theFindMethod, theInheritFirstArg, theAddPrefix)
950
951         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
952         #  To be used from python scripts out of addToStudy() (non-default usage)
953         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
954         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
955         #                   If this list is empty, all operation arguments will be published
956         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
957         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
958         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
959         #                            Do not publish sub-shapes in place of arguments, but only
960         #                            in place of sub-shapes of the first argument,
961         #                            because the whole shape corresponds to the first argument.
962         #                            Mainly to be used after transformations, but it also can be
963         #                            usefull after partition with one object shape, and some other
964         #                            operations, where only the first argument has to be considered.
965         #                            If theObject has only one argument shape, this flag is automatically
966         #                            considered as True, not regarding really passed value.
967         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
968         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
969         #  \return list of published sub-shapes
970         #
971         #  @ref tui_restore_prs_params "Example"
972         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
973                                    theInheritFirstArg=False, theAddPrefix=True):
974             """
975             Publish sub-shapes, standing for arguments and sub-shapes of arguments
976             To be used from python scripts out of geompy.addToStudy() (non-default usage)
977
978             Parameters:
979                 theObject published GEOM.GEOM_Object, arguments of which will be published
980                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
981                           If this list is empty, all operation arguments will be published
982                 theFindMethod method to search sub-shapes, corresponding to arguments and
983                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
984                 theInheritFirstArg set properties of the first argument for theObject.
985                                    Do not publish sub-shapes in place of arguments, but only
986                                    in place of sub-shapes of the first argument,
987                                    because the whole shape corresponds to the first argument.
988                                    Mainly to be used after transformations, but it also can be
989                                    usefull after partition with one object shape, and some other
990                                    operations, where only the first argument has to be considered.
991                                    If theObject has only one argument shape, this flag is automatically
992                                    considered as True, not regarding really passed value.
993                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
994                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
995
996             Returns: 
997                 list of published sub-shapes
998             """
999             # Example: see GEOM_TestAll.py
1000             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
1001                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1002
1003         # end of l3_restore_ss
1004         ## @}
1005
1006         ## @addtogroup l3_basic_go
1007         ## @{
1008
1009         ## Create point by three coordinates.
1010         #  @param theX The X coordinate of the point.
1011         #  @param theY The Y coordinate of the point.
1012         #  @param theZ The Z coordinate of the point.
1013         #  @param theName Object name; when specified, this parameter is used
1014         #         for result publication in the study. Otherwise, if automatic
1015         #         publication is switched on, default value is used for result name.
1016         #
1017         #  @return New GEOM.GEOM_Object, containing the created point.
1018         #
1019         #  @ref tui_creation_point "Example"
1020         def MakeVertex(self, theX, theY, theZ, theName=None):
1021             """
1022             Create point by three coordinates.
1023
1024             Parameters:
1025                 theX The X coordinate of the point.
1026                 theY The Y coordinate of the point.
1027                 theZ The Z coordinate of the point.
1028                 theName Object name; when specified, this parameter is used
1029                         for result publication in the study. Otherwise, if automatic
1030                         publication is switched on, default value is used for result name.
1031                 
1032             Returns: 
1033                 New GEOM.GEOM_Object, containing the created point.
1034             """
1035             # Example: see GEOM_TestAll.py
1036             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1037             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1038             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1039             anObj.SetParameters(Parameters)
1040             self._autoPublish(anObj, theName, "vertex")
1041             return anObj
1042
1043         ## Create a point, distant from the referenced point
1044         #  on the given distances along the coordinate axes.
1045         #  @param theReference The referenced point.
1046         #  @param theX Displacement from the referenced point along OX axis.
1047         #  @param theY Displacement from the referenced point along OY axis.
1048         #  @param theZ Displacement from the referenced point along OZ axis.
1049         #  @param theName Object name; when specified, this parameter is used
1050         #         for result publication in the study. Otherwise, if automatic
1051         #         publication is switched on, default value is used for result name.
1052         #
1053         #  @return New GEOM.GEOM_Object, containing the created point.
1054         #
1055         #  @ref tui_creation_point "Example"
1056         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1057             """
1058             Create a point, distant from the referenced point
1059             on the given distances along the coordinate axes.
1060
1061             Parameters:
1062                 theReference The referenced point.
1063                 theX Displacement from the referenced point along OX axis.
1064                 theY Displacement from the referenced point along OY axis.
1065                 theZ Displacement from the referenced point along OZ axis.
1066                 theName Object name; when specified, this parameter is used
1067                         for result publication in the study. Otherwise, if automatic
1068                         publication is switched on, default value is used for result name.
1069
1070             Returns:
1071                 New GEOM.GEOM_Object, containing the created point.
1072             """
1073             # Example: see GEOM_TestAll.py
1074             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1075             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1076             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1077             anObj.SetParameters(Parameters)
1078             self._autoPublish(anObj, theName, "vertex")
1079             return anObj
1080
1081         ## Create a point, corresponding to the given parameter on the given curve.
1082         #  @param theRefCurve The referenced curve.
1083         #  @param theParameter Value of parameter on the referenced curve.
1084         #  @param theName Object name; when specified, this parameter is used
1085         #         for result publication in the study. Otherwise, if automatic
1086         #         publication is switched on, default value is used for result name.
1087         #
1088         #  @return New GEOM.GEOM_Object, containing the created point.
1089         #
1090         #  @ref tui_creation_point "Example"
1091         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1092             """
1093             Create a point, corresponding to the given parameter on the given curve.
1094
1095             Parameters:
1096                 theRefCurve The referenced curve.
1097                 theParameter Value of parameter on the referenced curve.
1098                 theName Object name; when specified, this parameter is used
1099                         for result publication in the study. Otherwise, if automatic
1100                         publication is switched on, default value is used for result name.
1101
1102             Returns:
1103                 New GEOM.GEOM_Object, containing the created point.
1104
1105             Example of usage:
1106                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1107             """
1108             # Example: see GEOM_TestAll.py
1109             theParameter, Parameters = ParseParameters(theParameter)
1110             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1111             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1112             anObj.SetParameters(Parameters)
1113             self._autoPublish(anObj, theName, "vertex")
1114             return anObj
1115
1116         ## Create a point by projection give coordinates on the given curve
1117         #  @param theRefCurve The referenced curve.
1118         #  @param theX X-coordinate in 3D space
1119         #  @param theY Y-coordinate in 3D space
1120         #  @param theZ Z-coordinate in 3D space
1121         #  @param theName Object name; when specified, this parameter is used
1122         #         for result publication in the study. Otherwise, if automatic
1123         #         publication is switched on, default value is used for result name.
1124         #
1125         #  @return New GEOM.GEOM_Object, containing the created point.
1126         #
1127         #  @ref tui_creation_point "Example"
1128         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1129             """
1130             Create a point by projection give coordinates on the given curve
1131             
1132             Parameters:
1133                 theRefCurve The referenced curve.
1134                 theX X-coordinate in 3D space
1135                 theY Y-coordinate in 3D space
1136                 theZ Z-coordinate in 3D space
1137                 theName Object name; when specified, this parameter is used
1138                         for result publication in the study. Otherwise, if automatic
1139                         publication is switched on, default value is used for result name.
1140
1141             Returns:
1142                 New GEOM.GEOM_Object, containing the created point.
1143
1144             Example of usage:
1145                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1146             """
1147             # Example: see GEOM_TestAll.py
1148             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1149             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1150             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1151             anObj.SetParameters(Parameters)
1152             self._autoPublish(anObj, theName, "vertex")
1153             return anObj
1154
1155         ## Create a point, corresponding to the given length on the given curve.
1156         #  @param theRefCurve The referenced curve.
1157         #  @param theLength Length on the referenced curve. It can be negative.
1158         #  @param theStartPoint Point allowing to choose the direction for the calculation
1159         #                       of the length. If None, start from the first point of theRefCurve.
1160         #  @param theName Object name; when specified, this parameter is used
1161         #         for result publication in the study. Otherwise, if automatic
1162         #         publication is switched on, default value is used for result name.
1163         #
1164         #  @return New GEOM.GEOM_Object, containing the created point.
1165         #
1166         #  @ref tui_creation_point "Example"
1167         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1168             """
1169             Create a point, corresponding to the given length on the given curve.
1170
1171             Parameters:
1172                 theRefCurve The referenced curve.
1173                 theLength Length on the referenced curve. It can be negative.
1174                 theStartPoint Point allowing to choose the direction for the calculation
1175                               of the length. If None, start from the first point of theRefCurve.
1176                 theName Object name; when specified, this parameter is used
1177                         for result publication in the study. Otherwise, if automatic
1178                         publication is switched on, default value is used for result name.
1179
1180             Returns:
1181                 New GEOM.GEOM_Object, containing the created point.
1182             """
1183             # Example: see GEOM_TestAll.py
1184             theLength, Parameters = ParseParameters(theLength)
1185             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1186             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1187             anObj.SetParameters(Parameters)
1188             self._autoPublish(anObj, theName, "vertex")
1189             return anObj
1190
1191         ## Create a point, corresponding to the given parameters on the
1192         #    given surface.
1193         #  @param theRefSurf The referenced surface.
1194         #  @param theUParameter Value of U-parameter on the referenced surface.
1195         #  @param theVParameter Value of V-parameter on the referenced surface.
1196         #  @param theName Object name; when specified, this parameter is used
1197         #         for result publication in the study. Otherwise, if automatic
1198         #         publication is switched on, default value is used for result name.
1199         #
1200         #  @return New GEOM.GEOM_Object, containing the created point.
1201         #
1202         #  @ref swig_MakeVertexOnSurface "Example"
1203         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1204             """
1205             Create a point, corresponding to the given parameters on the
1206             given surface.
1207
1208             Parameters:
1209                 theRefSurf The referenced surface.
1210                 theUParameter Value of U-parameter on the referenced surface.
1211                 theVParameter Value of V-parameter on the referenced surface.
1212                 theName Object name; when specified, this parameter is used
1213                         for result publication in the study. Otherwise, if automatic
1214                         publication is switched on, default value is used for result name.
1215
1216             Returns:
1217                 New GEOM.GEOM_Object, containing the created point.
1218
1219             Example of usage:
1220                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1221             """
1222             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1223             # Example: see GEOM_TestAll.py
1224             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1225             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1226             anObj.SetParameters(Parameters);
1227             self._autoPublish(anObj, theName, "vertex")
1228             return anObj
1229
1230         ## Create a point by projection give coordinates on the given surface
1231         #  @param theRefSurf The referenced surface.
1232         #  @param theX X-coordinate in 3D space
1233         #  @param theY Y-coordinate in 3D space
1234         #  @param theZ Z-coordinate in 3D space
1235         #  @param theName Object name; when specified, this parameter is used
1236         #         for result publication in the study. Otherwise, if automatic
1237         #         publication is switched on, default value is used for result name.
1238         #
1239         #  @return New GEOM.GEOM_Object, containing the created point.
1240         #
1241         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1242         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1243             """
1244             Create a point by projection give coordinates on the given surface
1245
1246             Parameters:
1247                 theRefSurf The referenced surface.
1248                 theX X-coordinate in 3D space
1249                 theY Y-coordinate in 3D space
1250                 theZ Z-coordinate in 3D space
1251                 theName Object name; when specified, this parameter is used
1252                         for result publication in the study. Otherwise, if automatic
1253                         publication is switched on, default value is used for result name.
1254
1255             Returns:
1256                 New GEOM.GEOM_Object, containing the created point.
1257
1258             Example of usage:
1259                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1260             """
1261             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1262             # Example: see GEOM_TestAll.py
1263             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1264             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1265             anObj.SetParameters(Parameters);
1266             self._autoPublish(anObj, theName, "vertex")
1267             return anObj
1268
1269         ## Create a point, which lays on the given face.
1270         #  The point will lay in arbitrary place of the face.
1271         #  The only condition on it is a non-zero distance to the face boundary.
1272         #  Such point can be used to uniquely identify the face inside any
1273         #  shape in case, when the shape does not contain overlapped faces.
1274         #  @param theFace The referenced face.
1275         #  @param theName Object name; when specified, this parameter is used
1276         #         for result publication in the study. Otherwise, if automatic
1277         #         publication is switched on, default value is used for result name.
1278         #
1279         #  @return New GEOM.GEOM_Object, containing the created point.
1280         #
1281         #  @ref swig_MakeVertexInsideFace "Example"
1282         def MakeVertexInsideFace (self, theFace, theName=None):
1283             """
1284             Create a point, which lays on the given face.
1285             The point will lay in arbitrary place of the face.
1286             The only condition on it is a non-zero distance to the face boundary.
1287             Such point can be used to uniquely identify the face inside any
1288             shape in case, when the shape does not contain overlapped faces.
1289
1290             Parameters:
1291                 theFace The referenced face.
1292                 theName Object name; when specified, this parameter is used
1293                         for result publication in the study. Otherwise, if automatic
1294                         publication is switched on, default value is used for result name.
1295
1296             Returns:
1297                 New GEOM.GEOM_Object, containing the created point.
1298
1299             Example of usage:
1300                 p_on_face = geompy.MakeVertexInsideFace(Face)
1301             """
1302             # Example: see GEOM_TestAll.py
1303             anObj = self.BasicOp.MakePointOnFace(theFace)
1304             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1305             self._autoPublish(anObj, theName, "vertex")
1306             return anObj
1307
1308         ## Create a point on intersection of two lines.
1309         #  @param theRefLine1, theRefLine2 The referenced lines.
1310         #  @param theName Object name; when specified, this parameter is used
1311         #         for result publication in the study. Otherwise, if automatic
1312         #         publication is switched on, default value is used for result name.
1313         #
1314         #  @return New GEOM.GEOM_Object, containing the created point.
1315         #
1316         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1317         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1318             """
1319             Create a point on intersection of two lines.
1320
1321             Parameters:
1322                 theRefLine1, theRefLine2 The referenced lines.
1323                 theName Object name; when specified, this parameter is used
1324                         for result publication in the study. Otherwise, if automatic
1325                         publication is switched on, default value is used for result name.
1326
1327             Returns:
1328                 New GEOM.GEOM_Object, containing the created point.
1329             """
1330             # Example: see GEOM_TestAll.py
1331             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1332             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1333             self._autoPublish(anObj, theName, "vertex")
1334             return anObj
1335
1336         ## Create a tangent, corresponding to the given parameter on the given curve.
1337         #  @param theRefCurve The referenced curve.
1338         #  @param theParameter Value of parameter on the referenced curve.
1339         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created tangent.
1344         #
1345         #  @ref swig_MakeTangentOnCurve "Example"
1346         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1347             """
1348             Create a tangent, corresponding to the given parameter on the given curve.
1349
1350             Parameters:
1351                 theRefCurve The referenced curve.
1352                 theParameter Value of parameter on the referenced curve.
1353                 theName Object name; when specified, this parameter is used
1354                         for result publication in the study. Otherwise, if automatic
1355                         publication is switched on, default value is used for result name.
1356
1357             Returns:
1358                 New GEOM.GEOM_Object, containing the created tangent.
1359
1360             Example of usage:
1361                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1362             """
1363             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1364             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1365             self._autoPublish(anObj, theName, "tangent")
1366             return anObj
1367
1368         ## Create a tangent plane, corresponding to the given parameter on the given face.
1369         #  @param theFace The face for which tangent plane should be built.
1370         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1371         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1372         #  @param theTrimSize the size of plane.
1373         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created tangent.
1378         #
1379         #  @ref swig_MakeTangentPlaneOnFace "Example"
1380         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1381             """
1382             Create a tangent plane, corresponding to the given parameter on the given face.
1383
1384             Parameters:
1385                 theFace The face for which tangent plane should be built.
1386                 theParameterV vertical value of the center point (0.0 - 1.0).
1387                 theParameterU horisontal value of the center point (0.0 - 1.0).
1388                 theTrimSize the size of plane.
1389                 theName Object name; when specified, this parameter is used
1390                         for result publication in the study. Otherwise, if automatic
1391                         publication is switched on, default value is used for result name.
1392
1393            Returns: 
1394                 New GEOM.GEOM_Object, containing the created tangent.
1395
1396            Example of usage:
1397                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1398             """
1399             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1400             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1401             self._autoPublish(anObj, theName, "tangent")
1402             return anObj
1403
1404         ## Create a vector with the given components.
1405         #  @param theDX X component of the vector.
1406         #  @param theDY Y component of the vector.
1407         #  @param theDZ Z component of the vector.
1408         #  @param theName Object name; when specified, this parameter is used
1409         #         for result publication in the study. Otherwise, if automatic
1410         #         publication is switched on, default value is used for result name.
1411         #
1412         #  @return New GEOM.GEOM_Object, containing the created vector.
1413         #
1414         #  @ref tui_creation_vector "Example"
1415         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1416             """
1417             Create a vector with the given components.
1418
1419             Parameters:
1420                 theDX X component of the vector.
1421                 theDY Y component of the vector.
1422                 theDZ Z component of the vector.
1423                 theName Object name; when specified, this parameter is used
1424                         for result publication in the study. Otherwise, if automatic
1425                         publication is switched on, default value is used for result name.
1426
1427             Returns:     
1428                 New GEOM.GEOM_Object, containing the created vector.
1429             """
1430             # Example: see GEOM_TestAll.py
1431             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1432             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1433             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1434             anObj.SetParameters(Parameters)
1435             self._autoPublish(anObj, theName, "vector")
1436             return anObj
1437
1438         ## Create a vector between two points.
1439         #  @param thePnt1 Start point for the vector.
1440         #  @param thePnt2 End point for the vector.
1441         #  @param theName Object name; when specified, this parameter is used
1442         #         for result publication in the study. Otherwise, if automatic
1443         #         publication is switched on, default value is used for result name.
1444         #
1445         #  @return New GEOM.GEOM_Object, containing the created vector.
1446         #
1447         #  @ref tui_creation_vector "Example"
1448         def MakeVector(self, thePnt1, thePnt2, theName=None):
1449             """
1450             Create a vector between two points.
1451
1452             Parameters:
1453                 thePnt1 Start point for the vector.
1454                 thePnt2 End point for the vector.
1455                 theName Object name; when specified, this parameter is used
1456                         for result publication in the study. Otherwise, if automatic
1457                         publication is switched on, default value is used for result name.
1458
1459             Returns:        
1460                 New GEOM.GEOM_Object, containing the created vector.
1461             """
1462             # Example: see GEOM_TestAll.py
1463             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1464             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1465             self._autoPublish(anObj, theName, "vector")
1466             return anObj
1467
1468         ## Create a line, passing through the given point
1469         #  and parrallel to the given direction
1470         #  @param thePnt Point. The resulting line will pass through it.
1471         #  @param theDir Direction. The resulting line will be parallel to it.
1472         #  @param theName Object name; when specified, this parameter is used
1473         #         for result publication in the study. Otherwise, if automatic
1474         #         publication is switched on, default value is used for result name.
1475         #
1476         #  @return New GEOM.GEOM_Object, containing the created line.
1477         #
1478         #  @ref tui_creation_line "Example"
1479         def MakeLine(self, thePnt, theDir, theName=None):
1480             """
1481             Create a line, passing through the given point
1482             and parrallel to the given direction
1483
1484             Parameters:
1485                 thePnt Point. The resulting line will pass through it.
1486                 theDir Direction. The resulting line will be parallel to it.
1487                 theName Object name; when specified, this parameter is used
1488                         for result publication in the study. Otherwise, if automatic
1489                         publication is switched on, default value is used for result name.
1490
1491             Returns:
1492                 New GEOM.GEOM_Object, containing the created line.
1493             """
1494             # Example: see GEOM_TestAll.py
1495             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1496             RaiseIfFailed("MakeLine", self.BasicOp)
1497             self._autoPublish(anObj, theName, "line")
1498             return anObj
1499
1500         ## Create a line, passing through the given points
1501         #  @param thePnt1 First of two points, defining the line.
1502         #  @param thePnt2 Second of two points, defining the line.
1503         #  @param theName Object name; when specified, this parameter is used
1504         #         for result publication in the study. Otherwise, if automatic
1505         #         publication is switched on, default value is used for result name.
1506         #
1507         #  @return New GEOM.GEOM_Object, containing the created line.
1508         #
1509         #  @ref tui_creation_line "Example"
1510         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1511             """
1512             Create a line, passing through the given points
1513
1514             Parameters:
1515                 thePnt1 First of two points, defining the line.
1516                 thePnt2 Second of two points, defining the line.
1517                 theName Object name; when specified, this parameter is used
1518                         for result publication in the study. Otherwise, if automatic
1519                         publication is switched on, default value is used for result name.
1520
1521             Returns:
1522                 New GEOM.GEOM_Object, containing the created line.
1523             """
1524             # Example: see GEOM_TestAll.py
1525             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1526             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1527             self._autoPublish(anObj, theName, "line")
1528             return anObj
1529
1530         ## Create a line on two faces intersection.
1531         #  @param theFace1 First of two faces, defining the line.
1532         #  @param theFace2 Second of two faces, defining the line.
1533         #  @param theName Object name; when specified, this parameter is used
1534         #         for result publication in the study. Otherwise, if automatic
1535         #         publication is switched on, default value is used for result name.
1536         #
1537         #  @return New GEOM.GEOM_Object, containing the created line.
1538         #
1539         #  @ref swig_MakeLineTwoFaces "Example"
1540         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1541             """
1542             Create a line on two faces intersection.
1543
1544             Parameters:
1545                 theFace1 First of two faces, defining the line.
1546                 theFace2 Second of two faces, defining the line.
1547                 theName Object name; when specified, this parameter is used
1548                         for result publication in the study. Otherwise, if automatic
1549                         publication is switched on, default value is used for result name.
1550
1551             Returns:
1552                 New GEOM.GEOM_Object, containing the created line.
1553             """
1554             # Example: see GEOM_TestAll.py
1555             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1556             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1557             self._autoPublish(anObj, theName, "line")
1558             return anObj
1559
1560         ## Create a plane, passing through the given point
1561         #  and normal to the given vector.
1562         #  @param thePnt Point, the plane has to pass through.
1563         #  @param theVec Vector, defining the plane normal direction.
1564         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1565         #  @param theName Object name; when specified, this parameter is used
1566         #         for result publication in the study. Otherwise, if automatic
1567         #         publication is switched on, default value is used for result name.
1568         #
1569         #  @return New GEOM.GEOM_Object, containing the created plane.
1570         #
1571         #  @ref tui_creation_plane "Example"
1572         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1573             """
1574             Create a plane, passing through the given point
1575             and normal to the given vector.
1576
1577             Parameters:
1578                 thePnt Point, the plane has to pass through.
1579                 theVec Vector, defining the plane normal direction.
1580                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1581                 theName Object name; when specified, this parameter is used
1582                         for result publication in the study. Otherwise, if automatic
1583                         publication is switched on, default value is used for result name.
1584
1585             Returns:    
1586                 New GEOM.GEOM_Object, containing the created plane.
1587             """
1588             # Example: see GEOM_TestAll.py
1589             theTrimSize, Parameters = ParseParameters(theTrimSize);
1590             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1591             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1592             anObj.SetParameters(Parameters)
1593             self._autoPublish(anObj, theName, "plane")
1594             return anObj
1595
1596         ## Create a plane, passing through the three given points
1597         #  @param thePnt1 First of three points, defining the plane.
1598         #  @param thePnt2 Second of three points, defining the plane.
1599         #  @param thePnt3 Fird of three points, defining the plane.
1600         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1601         #  @param theName Object name; when specified, this parameter is used
1602         #         for result publication in the study. Otherwise, if automatic
1603         #         publication is switched on, default value is used for result name.
1604         #
1605         #  @return New GEOM.GEOM_Object, containing the created plane.
1606         #
1607         #  @ref tui_creation_plane "Example"
1608         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1609             """
1610             Create a plane, passing through the three given points
1611
1612             Parameters:
1613                 thePnt1 First of three points, defining the plane.
1614                 thePnt2 Second of three points, defining the plane.
1615                 thePnt3 Fird of three points, defining the plane.
1616                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1617                 theName Object name; when specified, this parameter is used
1618                         for result publication in the study. Otherwise, if automatic
1619                         publication is switched on, default value is used for result name.
1620
1621             Returns:
1622                 New GEOM.GEOM_Object, containing the created plane.
1623             """
1624             # Example: see GEOM_TestAll.py
1625             theTrimSize, Parameters = ParseParameters(theTrimSize);
1626             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1627             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1628             anObj.SetParameters(Parameters)
1629             self._autoPublish(anObj, theName, "plane")
1630             return anObj
1631
1632         ## Create a plane, similar to the existing one, but with another size of representing face.
1633         #  @param theFace Referenced plane or LCS(Marker).
1634         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1635         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created plane.
1640         #
1641         #  @ref tui_creation_plane "Example"
1642         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1643             """
1644             Create a plane, similar to the existing one, but with another size of representing face.
1645
1646             Parameters:
1647                 theFace Referenced plane or LCS(Marker).
1648                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1649                 theName Object name; when specified, this parameter is used
1650                         for result publication in the study. Otherwise, if automatic
1651                         publication is switched on, default value is used for result name.
1652
1653             Returns:
1654                 New GEOM.GEOM_Object, containing the created plane.
1655             """
1656             # Example: see GEOM_TestAll.py
1657             theTrimSize, Parameters = ParseParameters(theTrimSize);
1658             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1659             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1660             anObj.SetParameters(Parameters)
1661             self._autoPublish(anObj, theName, "plane")
1662             return anObj
1663
1664         ## Create a plane, passing through the 2 vectors
1665         #  with center in a start point of the first vector.
1666         #  @param theVec1 Vector, defining center point and plane direction.
1667         #  @param theVec2 Vector, defining the plane normal direction.
1668         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1669         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created plane.
1674         #
1675         #  @ref tui_creation_plane "Example"
1676         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1677             """
1678             Create a plane, passing through the 2 vectors
1679             with center in a start point of the first vector.
1680
1681             Parameters:
1682                 theVec1 Vector, defining center point and plane direction.
1683                 theVec2 Vector, defining the plane normal direction.
1684                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1685                 theName Object name; when specified, this parameter is used
1686                         for result publication in the study. Otherwise, if automatic
1687                         publication is switched on, default value is used for result name.
1688
1689             Returns: 
1690                 New GEOM.GEOM_Object, containing the created plane.
1691             """
1692             # Example: see GEOM_TestAll.py
1693             theTrimSize, Parameters = ParseParameters(theTrimSize);
1694             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1695             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1696             anObj.SetParameters(Parameters)
1697             self._autoPublish(anObj, theName, "plane")
1698             return anObj
1699
1700         ## Create a plane, based on a Local coordinate system.
1701         #  @param theLCS  coordinate system, defining plane.
1702         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1703         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1704         #  @param theName Object name; when specified, this parameter is used
1705         #         for result publication in the study. Otherwise, if automatic
1706         #         publication is switched on, default value is used for result name.
1707         #
1708         #  @return New GEOM.GEOM_Object, containing the created plane.
1709         #
1710         #  @ref tui_creation_plane "Example"
1711         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1712             """
1713             Create a plane, based on a Local coordinate system.
1714
1715            Parameters: 
1716                 theLCS  coordinate system, defining plane.
1717                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1718                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1719                 theName Object name; when specified, this parameter is used
1720                         for result publication in the study. Otherwise, if automatic
1721                         publication is switched on, default value is used for result name.
1722
1723             Returns: 
1724                 New GEOM.GEOM_Object, containing the created plane.
1725             """
1726             # Example: see GEOM_TestAll.py
1727             theTrimSize, Parameters = ParseParameters(theTrimSize);
1728             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1729             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1730             anObj.SetParameters(Parameters)
1731             self._autoPublish(anObj, theName, "plane")
1732             return anObj
1733
1734         ## Create a local coordinate system.
1735         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1736         #  @param XDX,XDY,XDZ Three components of OX direction
1737         #  @param YDX,YDY,YDZ Three components of OY direction
1738         #  @param theName Object name; when specified, this parameter is used
1739         #         for result publication in the study. Otherwise, if automatic
1740         #         publication is switched on, default value is used for result name.
1741         #
1742         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1743         #
1744         #  @ref swig_MakeMarker "Example"
1745         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1746             """
1747             Create a local coordinate system.
1748
1749             Parameters: 
1750                 OX,OY,OZ Three coordinates of coordinate system origin.
1751                 XDX,XDY,XDZ Three components of OX direction
1752                 YDX,YDY,YDZ Three components of OY direction
1753                 theName Object name; when specified, this parameter is used
1754                         for result publication in the study. Otherwise, if automatic
1755                         publication is switched on, default value is used for result name.
1756
1757             Returns: 
1758                 New GEOM.GEOM_Object, containing the created coordinate system.
1759             """
1760             # Example: see GEOM_TestAll.py
1761             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1762             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1763             RaiseIfFailed("MakeMarker", self.BasicOp)
1764             anObj.SetParameters(Parameters)
1765             self._autoPublish(anObj, theName, "lcs")
1766             return anObj
1767
1768         ## Create a local coordinate system from shape.
1769         #  @param theShape The initial shape to detect the coordinate system.
1770         #  @param theName Object name; when specified, this parameter is used
1771         #         for result publication in the study. Otherwise, if automatic
1772         #         publication is switched on, default value is used for result name.
1773         #
1774         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1775         #
1776         #  @ref tui_creation_lcs "Example"
1777         def MakeMarkerFromShape(self, theShape, theName=None):
1778             """
1779             Create a local coordinate system from shape.
1780
1781             Parameters:
1782                 theShape The initial shape to detect the coordinate system.
1783                 theName Object name; when specified, this parameter is used
1784                         for result publication in the study. Otherwise, if automatic
1785                         publication is switched on, default value is used for result name.
1786                 
1787             Returns: 
1788                 New GEOM.GEOM_Object, containing the created coordinate system.
1789             """
1790             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1791             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1792             self._autoPublish(anObj, theName, "lcs")
1793             return anObj
1794
1795         ## Create a local coordinate system from point and two vectors.
1796         #  @param theOrigin Point of coordinate system origin.
1797         #  @param theXVec Vector of X direction
1798         #  @param theYVec Vector of Y direction
1799         #  @param theName Object name; when specified, this parameter is used
1800         #         for result publication in the study. Otherwise, if automatic
1801         #         publication is switched on, default value is used for result name.
1802         #
1803         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1804         #
1805         #  @ref tui_creation_lcs "Example"
1806         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1807             """
1808             Create a local coordinate system from point and two vectors.
1809
1810             Parameters:
1811                 theOrigin Point of coordinate system origin.
1812                 theXVec Vector of X direction
1813                 theYVec Vector of Y direction
1814                 theName Object name; when specified, this parameter is used
1815                         for result publication in the study. Otherwise, if automatic
1816                         publication is switched on, default value is used for result name.
1817
1818             Returns: 
1819                 New GEOM.GEOM_Object, containing the created coordinate system.
1820
1821             """
1822             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1823             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1824             self._autoPublish(anObj, theName, "lcs")
1825             return anObj
1826
1827         # end of l3_basic_go
1828         ## @}
1829
1830         ## @addtogroup l4_curves
1831         ## @{
1832
1833         ##  Create an arc of circle, passing through three given points.
1834         #  @param thePnt1 Start point of the arc.
1835         #  @param thePnt2 Middle point of the arc.
1836         #  @param thePnt3 End point of the arc.
1837         #  @param theName Object name; when specified, this parameter is used
1838         #         for result publication in the study. Otherwise, if automatic
1839         #         publication is switched on, default value is used for result name.
1840         #
1841         #  @return New GEOM.GEOM_Object, containing the created arc.
1842         #
1843         #  @ref swig_MakeArc "Example"
1844         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1845             """
1846             Create an arc of circle, passing through three given points.
1847
1848             Parameters:
1849                 thePnt1 Start point of the arc.
1850                 thePnt2 Middle point of the arc.
1851                 thePnt3 End point of the arc.
1852                 theName Object name; when specified, this parameter is used
1853                         for result publication in the study. Otherwise, if automatic
1854                         publication is switched on, default value is used for result name.
1855
1856             Returns: 
1857                 New GEOM.GEOM_Object, containing the created arc.
1858             """
1859             # Example: see GEOM_TestAll.py
1860             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1861             RaiseIfFailed("MakeArc", self.CurvesOp)
1862             self._autoPublish(anObj, theName, "arc")
1863             return anObj
1864
1865         ##  Create an arc of circle from a center and 2 points.
1866         #  @param thePnt1 Center of the arc
1867         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1868         #  @param thePnt3 End point of the arc (Gives also a direction)
1869         #  @param theSense Orientation of the arc
1870         #  @param theName Object name; when specified, this parameter is used
1871         #         for result publication in the study. Otherwise, if automatic
1872         #         publication is switched on, default value is used for result name.
1873         #
1874         #  @return New GEOM.GEOM_Object, containing the created arc.
1875         #
1876         #  @ref swig_MakeArc "Example"
1877         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1878             """
1879             Create an arc of circle from a center and 2 points.
1880
1881             Parameters:
1882                 thePnt1 Center of the arc
1883                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1884                 thePnt3 End point of the arc (Gives also a direction)
1885                 theSense Orientation of the arc
1886                 theName Object name; when specified, this parameter is used
1887                         for result publication in the study. Otherwise, if automatic
1888                         publication is switched on, default value is used for result name.
1889
1890             Returns:
1891                 New GEOM.GEOM_Object, containing the created arc.
1892             """
1893             # Example: see GEOM_TestAll.py
1894             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1895             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1896             self._autoPublish(anObj, theName, "arc")
1897             return anObj
1898
1899         ##  Create an arc of ellipse, of center and two points.
1900         #  @param theCenter Center of the arc.
1901         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1902         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1903         #  @param theName Object name; when specified, this parameter is used
1904         #         for result publication in the study. Otherwise, if automatic
1905         #         publication is switched on, default value is used for result name.
1906         #
1907         #  @return New GEOM.GEOM_Object, containing the created arc.
1908         #
1909         #  @ref swig_MakeArc "Example"
1910         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
1911             """
1912             Create an arc of ellipse, of center and two points.
1913
1914             Parameters:
1915                 theCenter Center of the arc.
1916                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1917                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1918                 theName Object name; when specified, this parameter is used
1919                         for result publication in the study. Otherwise, if automatic
1920                         publication is switched on, default value is used for result name.
1921
1922             Returns:
1923                 New GEOM.GEOM_Object, containing the created arc.
1924             """
1925             # Example: see GEOM_TestAll.py
1926             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
1927             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
1928             self._autoPublish(anObj, theName, "arc")
1929             return anObj
1930
1931         ## Create a circle with given center, normal vector and radius.
1932         #  @param thePnt Circle center.
1933         #  @param theVec Vector, normal to the plane of the circle.
1934         #  @param theR Circle radius.
1935         #  @param theName Object name; when specified, this parameter is used
1936         #         for result publication in the study. Otherwise, if automatic
1937         #         publication is switched on, default value is used for result name.
1938         #
1939         #  @return New GEOM.GEOM_Object, containing the created circle.
1940         #
1941         #  @ref tui_creation_circle "Example"
1942         def MakeCircle(self, thePnt, theVec, theR, theName=None):
1943             """
1944             Create a circle with given center, normal vector and radius.
1945
1946             Parameters:
1947                 thePnt Circle center.
1948                 theVec Vector, normal to the plane of the circle.
1949                 theR Circle radius.
1950                 theName Object name; when specified, this parameter is used
1951                         for result publication in the study. Otherwise, if automatic
1952                         publication is switched on, default value is used for result name.
1953
1954             Returns:
1955                 New GEOM.GEOM_Object, containing the created circle.
1956             """
1957             # Example: see GEOM_TestAll.py
1958             theR, Parameters = ParseParameters(theR)
1959             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
1960             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1961             anObj.SetParameters(Parameters)
1962             self._autoPublish(anObj, theName, "circle")
1963             return anObj
1964
1965         ## Create a circle with given radius.
1966         #  Center of the circle will be in the origin of global
1967         #  coordinate system and normal vector will be codirected with Z axis
1968         #  @param theR Circle radius.
1969         #  @param theName Object name; when specified, this parameter is used
1970         #         for result publication in the study. Otherwise, if automatic
1971         #         publication is switched on, default value is used for result name.
1972         #
1973         #  @return New GEOM.GEOM_Object, containing the created circle.
1974         def MakeCircleR(self, theR, theName=None):
1975             """
1976             Create a circle with given radius.
1977             Center of the circle will be in the origin of global
1978             coordinate system and normal vector will be codirected with Z axis
1979
1980             Parameters:
1981                 theR Circle radius.
1982                 theName Object name; when specified, this parameter is used
1983                         for result publication in the study. Otherwise, if automatic
1984                         publication is switched on, default value is used for result name.
1985
1986             Returns:
1987                 New GEOM.GEOM_Object, containing the created circle.
1988             """
1989             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
1990             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1991             self._autoPublish(anObj, theName, "circle")
1992             return anObj
1993
1994         ## Create a circle, passing through three given points
1995         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1996         #  @param theName Object name; when specified, this parameter is used
1997         #         for result publication in the study. Otherwise, if automatic
1998         #         publication is switched on, default value is used for result name.
1999         #
2000         #  @return New GEOM.GEOM_Object, containing the created circle.
2001         #
2002         #  @ref tui_creation_circle "Example"
2003         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2004             """
2005             Create a circle, passing through three given points
2006
2007             Parameters:
2008                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2009                 theName Object name; when specified, this parameter is used
2010                         for result publication in the study. Otherwise, if automatic
2011                         publication is switched on, default value is used for result name.
2012
2013             Returns:
2014                 New GEOM.GEOM_Object, containing the created circle.
2015             """
2016             # Example: see GEOM_TestAll.py
2017             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2018             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2019             self._autoPublish(anObj, theName, "circle")
2020             return anObj
2021
2022         ## Create a circle, with given point1 as center,
2023         #  passing through the point2 as radius and laying in the plane,
2024         #  defined by all three given points.
2025         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2026         #  @param theName Object name; when specified, this parameter is used
2027         #         for result publication in the study. Otherwise, if automatic
2028         #         publication is switched on, default value is used for result name.
2029         #
2030         #  @return New GEOM.GEOM_Object, containing the created circle.
2031         #
2032         #  @ref swig_MakeCircle "Example"
2033         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2034             """
2035             Create a circle, with given point1 as center,
2036             passing through the point2 as radius and laying in the plane,
2037             defined by all three given points.
2038
2039             Parameters:
2040                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2041                 theName Object name; when specified, this parameter is used
2042                         for result publication in the study. Otherwise, if automatic
2043                         publication is switched on, default value is used for result name.
2044
2045             Returns:
2046                 New GEOM.GEOM_Object, containing the created circle.
2047             """
2048             # Example: see GEOM_example6.py
2049             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2050             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2051             self._autoPublish(anObj, theName, "circle")
2052             return anObj
2053
2054         ## Create an ellipse with given center, normal vector and radiuses.
2055         #  @param thePnt Ellipse center.
2056         #  @param theVec Vector, normal to the plane of the ellipse.
2057         #  @param theRMajor Major ellipse radius.
2058         #  @param theRMinor Minor ellipse radius.
2059         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2060         #  @param theName Object name; when specified, this parameter is used
2061         #         for result publication in the study. Otherwise, if automatic
2062         #         publication is switched on, default value is used for result name.
2063         #
2064         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2065         #
2066         #  @ref tui_creation_ellipse "Example"
2067         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2068             """
2069             Create an ellipse with given center, normal vector and radiuses.
2070
2071             Parameters:
2072                 thePnt Ellipse center.
2073                 theVec Vector, normal to the plane of the ellipse.
2074                 theRMajor Major ellipse radius.
2075                 theRMinor Minor ellipse radius.
2076                 theVecMaj Vector, direction of the ellipse's main axis.
2077                 theName Object name; when specified, this parameter is used
2078                         for result publication in the study. Otherwise, if automatic
2079                         publication is switched on, default value is used for result name.
2080
2081             Returns:    
2082                 New GEOM.GEOM_Object, containing the created ellipse.
2083             """
2084             # Example: see GEOM_TestAll.py
2085             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2086             if theVecMaj is not None:
2087                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2088             else:
2089                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2090                 pass
2091             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2092             anObj.SetParameters(Parameters)
2093             self._autoPublish(anObj, theName, "ellipse")
2094             return anObj
2095
2096         ## Create an ellipse with given radiuses.
2097         #  Center of the ellipse will be in the origin of global
2098         #  coordinate system and normal vector will be codirected with Z axis
2099         #  @param theRMajor Major ellipse radius.
2100         #  @param theRMinor Minor ellipse radius.
2101         #  @param theName Object name; when specified, this parameter is used
2102         #         for result publication in the study. Otherwise, if automatic
2103         #         publication is switched on, default value is used for result name.
2104         #
2105         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2106         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2107             """
2108             Create an ellipse with given radiuses.
2109             Center of the ellipse will be in the origin of global
2110             coordinate system and normal vector will be codirected with Z axis
2111
2112             Parameters:
2113                 theRMajor Major ellipse radius.
2114                 theRMinor Minor ellipse radius.
2115                 theName Object name; when specified, this parameter is used
2116                         for result publication in the study. Otherwise, if automatic
2117                         publication is switched on, default value is used for result name.
2118
2119             Returns:
2120             New GEOM.GEOM_Object, containing the created ellipse.
2121             """
2122             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2123             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2124             self._autoPublish(anObj, theName, "ellipse")
2125             return anObj
2126
2127         ## Create a polyline on the set of points.
2128         #  @param thePoints Sequence of points for the polyline.
2129         #  @param theIsClosed If True, build a closed wire.
2130         #  @param theName Object name; when specified, this parameter is used
2131         #         for result publication in the study. Otherwise, if automatic
2132         #         publication is switched on, default value is used for result name.
2133         #
2134         #  @return New GEOM.GEOM_Object, containing the created polyline.
2135         #
2136         #  @ref tui_creation_curve "Example"
2137         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2138             """
2139             Create a polyline on the set of points.
2140
2141             Parameters:
2142                 thePoints Sequence of points for the polyline.
2143                 theIsClosed If True, build a closed wire.
2144                 theName Object name; when specified, this parameter is used
2145                         for result publication in the study. Otherwise, if automatic
2146                         publication is switched on, default value is used for result name.
2147
2148             Returns:
2149                 New GEOM.GEOM_Object, containing the created polyline.
2150             """
2151             # Example: see GEOM_TestAll.py
2152             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2153             RaiseIfFailed("MakePolyline", self.CurvesOp)
2154             self._autoPublish(anObj, theName, "polyline")
2155             return anObj
2156
2157         ## Create bezier curve on the set of points.
2158         #  @param thePoints Sequence of points for the bezier curve.
2159         #  @param theIsClosed If True, build a closed curve.
2160         #  @param theName Object name; when specified, this parameter is used
2161         #         for result publication in the study. Otherwise, if automatic
2162         #         publication is switched on, default value is used for result name.
2163         #
2164         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2165         #
2166         #  @ref tui_creation_curve "Example"
2167         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2168             """
2169             Create bezier curve on the set of points.
2170
2171             Parameters:
2172                 thePoints Sequence of points for the bezier curve.
2173                 theIsClosed If True, build a closed curve.
2174                 theName Object name; when specified, this parameter is used
2175                         for result publication in the study. Otherwise, if automatic
2176                         publication is switched on, default value is used for result name.
2177
2178             Returns:
2179                 New GEOM.GEOM_Object, containing the created bezier curve.
2180             """
2181             # Example: see GEOM_TestAll.py
2182             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2183             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2184             self._autoPublish(anObj, theName, "bezier")
2185             return anObj
2186
2187         ## Create B-Spline curve on the set of points.
2188         #  @param thePoints Sequence of points for the B-Spline curve.
2189         #  @param theIsClosed If True, build a closed curve.
2190         #  @param theDoReordering If TRUE, the algo does not follow the order of
2191         #                         \a thePoints but searches for the closest vertex.
2192         #  @param theName Object name; when specified, this parameter is used
2193         #         for result publication in the study. Otherwise, if automatic
2194         #         publication is switched on, default value is used for result name.
2195         #
2196         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2197         #
2198         #  @ref tui_creation_curve "Example"
2199         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2200             """
2201             Create B-Spline curve on the set of points.
2202
2203             Parameters:
2204                 thePoints Sequence of points for the B-Spline curve.
2205                 theIsClosed If True, build a closed curve.
2206                 theDoReordering If True, the algo does not follow the order of
2207                                 thePoints but searches for the closest vertex.
2208                 theName Object name; when specified, this parameter is used
2209                         for result publication in the study. Otherwise, if automatic
2210                         publication is switched on, default value is used for result name.
2211
2212             Returns:                     
2213                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2214             """
2215             # Example: see GEOM_TestAll.py
2216             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2217             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2218             self._autoPublish(anObj, theName, "bspline")
2219             return anObj
2220
2221         ## Create B-Spline curve on the set of points.
2222         #  @param thePoints Sequence of points for the B-Spline curve.
2223         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2224         #  @param theLastVec Vector object, defining the curve direction at its last point.
2225         #  @param theName Object name; when specified, this parameter is used
2226         #         for result publication in the study. Otherwise, if automatic
2227         #         publication is switched on, default value is used for result name.
2228         #
2229         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2230         #
2231         #  @ref tui_creation_curve "Example"
2232         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2233             """
2234             Create B-Spline curve on the set of points.
2235
2236             Parameters:
2237                 thePoints Sequence of points for the B-Spline curve.
2238                 theFirstVec Vector object, defining the curve direction at its first point.
2239                 theLastVec Vector object, defining the curve direction at its last point.
2240                 theName Object name; when specified, this parameter is used
2241                         for result publication in the study. Otherwise, if automatic
2242                         publication is switched on, default value is used for result name.
2243
2244             Returns:                     
2245                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2246             """
2247             # Example: see GEOM_TestAll.py
2248             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2249             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2250             self._autoPublish(anObj, theName, "bspline")
2251             return anObj
2252
2253         ## Creates a curve using the parametric definition of the basic points.
2254         #  @param thexExpr parametric equation of the coordinates X.
2255         #  @param theyExpr parametric equation of the coordinates Y.
2256         #  @param thezExpr parametric equation of the coordinates Z.
2257         #  @param theParamMin the minimal value of the parameter.
2258         #  @param theParamMax the maximum value of the parameter.
2259         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2260         #  @param theCurveType the type of the curve,
2261         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2262         #  @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.
2263         #  @param theName Object name; when specified, this parameter is used
2264         #         for result publication in the study. Otherwise, if automatic
2265         #         publication is switched on, default value is used for result name.
2266         #
2267         #  @return New GEOM.GEOM_Object, containing the created curve.
2268         #
2269         #  @ref tui_creation_curve "Example"
2270         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2271                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2272             """
2273             Creates a curve using the parametric definition of the basic points.
2274
2275             Parameters:
2276                 thexExpr parametric equation of the coordinates X.
2277                 theyExpr parametric equation of the coordinates Y.
2278                 thezExpr parametric equation of the coordinates Z.
2279                 theParamMin the minimal value of the parameter.
2280                 theParamMax the maximum value of the parameter.
2281                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2282                 theCurveType the type of the curve,
2283                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2284                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2285                              method is used which can lead to a bug.
2286                 theName Object name; when specified, this parameter is used
2287                         for result publication in the study. Otherwise, if automatic
2288                         publication is switched on, default value is used for result name.
2289
2290             Returns:
2291                 New GEOM.GEOM_Object, containing the created curve.
2292             """
2293             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2294             if theNewMethod:
2295               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2296             else:
2297               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
2298             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2299             anObj.SetParameters(Parameters)
2300             self._autoPublish(anObj, theName, "curve")
2301             return anObj
2302
2303         # end of l4_curves
2304         ## @}
2305
2306         ## @addtogroup l3_sketcher
2307         ## @{
2308
2309         ## Create a sketcher (wire or face), following the textual description,
2310         #  passed through <VAR>theCommand</VAR> argument. \n
2311         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2312         #  Format of the description string have to be the following:
2313         #
2314         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2315         #
2316         #  Where:
2317         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2318         #  - CMD is one of
2319         #     - "R angle" : Set the direction by angle
2320         #     - "D dx dy" : Set the direction by DX & DY
2321         #     .
2322         #       \n
2323         #     - "TT x y" : Create segment by point at X & Y
2324         #     - "T dx dy" : Create segment by point with DX & DY
2325         #     - "L length" : Create segment by direction & Length
2326         #     - "IX x" : Create segment by direction & Intersect. X
2327         #     - "IY y" : Create segment by direction & Intersect. Y
2328         #     .
2329         #       \n
2330         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2331         #     - "AA x y": Create arc by point at X & Y
2332         #     - "A dx dy" : Create arc by point with DX & DY
2333         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2334         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2335         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2336         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2337         #     .
2338         #       \n
2339         #     - "WW" : Close Wire (to finish)
2340         #     - "WF" : Close Wire and build face (to finish)
2341         #     .
2342         #        \n
2343         #  - Flag1 (= reverse) is 0 or 2 ...
2344         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2345         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2346         #     .
2347         #        \n
2348         #  - Flag2 (= control tolerance) is 0 or 1 ...
2349         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2350         #     - if 1 the wire is built only if the end point is on the arc
2351         #       with a tolerance of 10^-7 on the distance else the creation fails
2352         #
2353         #  @param theCommand String, defining the sketcher in local
2354         #                    coordinates of the working plane.
2355         #  @param theWorkingPlane Nine double values, defining origin,
2356         #                         OZ and OX directions of the working plane.
2357         #  @param theName Object name; when specified, this parameter is used
2358         #         for result publication in the study. Otherwise, if automatic
2359         #         publication is switched on, default value is used for result name.
2360         #
2361         #  @return New GEOM.GEOM_Object, containing the created wire.
2362         #
2363         #  @ref tui_sketcher_page "Example"
2364         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2365             """
2366             Create a sketcher (wire or face), following the textual description, passed
2367             through theCommand argument.
2368             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2369             Format of the description string have to be the following:
2370                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2371             Where:
2372             - x1, y1 are coordinates of the first sketcher point (zero by default),
2373             - CMD is one of
2374                - "R angle" : Set the direction by angle
2375                - "D dx dy" : Set the direction by DX & DY
2376                
2377                - "TT x y" : Create segment by point at X & Y
2378                - "T dx dy" : Create segment by point with DX & DY
2379                - "L length" : Create segment by direction & Length
2380                - "IX x" : Create segment by direction & Intersect. X
2381                - "IY y" : Create segment by direction & Intersect. Y
2382
2383                - "C radius length" : Create arc by direction, radius and length(in degree)
2384                - "AA x y": Create arc by point at X & Y
2385                - "A dx dy" : Create arc by point with DX & DY
2386                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2387                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2388                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2389                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2390
2391                - "WW" : Close Wire (to finish)
2392                - "WF" : Close Wire and build face (to finish)
2393             
2394             - Flag1 (= reverse) is 0 or 2 ...
2395                - if 0 the drawn arc is the one of lower angle (< Pi)
2396                - if 2 the drawn arc ius the one of greater angle (> Pi)
2397         
2398             - Flag2 (= control tolerance) is 0 or 1 ...
2399                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2400                - if 1 the wire is built only if the end point is on the arc
2401                  with a tolerance of 10^-7 on the distance else the creation fails
2402
2403             Parameters:
2404                 theCommand String, defining the sketcher in local
2405                            coordinates of the working plane.
2406                 theWorkingPlane Nine double values, defining origin,
2407                                 OZ and OX directions of the working plane.
2408                 theName Object name; when specified, this parameter is used
2409                         for result publication in the study. Otherwise, if automatic
2410                         publication is switched on, default value is used for result name.
2411
2412             Returns:
2413                 New GEOM.GEOM_Object, containing the created wire.
2414             """
2415             # Example: see GEOM_TestAll.py
2416             theCommand,Parameters = ParseSketcherCommand(theCommand)
2417             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2418             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2419             anObj.SetParameters(Parameters)
2420             self._autoPublish(anObj, theName, "wire")
2421             return anObj
2422
2423         ## Create a sketcher (wire or face), following the textual description,
2424         #  passed through <VAR>theCommand</VAR> argument. \n
2425         #  For format of the description string see MakeSketcher() method.\n
2426         #  @param theCommand String, defining the sketcher in local
2427         #                    coordinates of the working plane.
2428         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2429         #  @param theName Object name; when specified, this parameter is used
2430         #         for result publication in the study. Otherwise, if automatic
2431         #         publication is switched on, default value is used for result name.
2432         #
2433         #  @return New GEOM.GEOM_Object, containing the created wire.
2434         #
2435         #  @ref tui_sketcher_page "Example"
2436         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2437             """
2438             Create a sketcher (wire or face), following the textual description,
2439             passed through theCommand argument.
2440             For format of the description string see geompy.MakeSketcher() method.
2441
2442             Parameters:
2443                 theCommand String, defining the sketcher in local
2444                            coordinates of the working plane.
2445                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2446                 theName Object name; when specified, this parameter is used
2447                         for result publication in the study. Otherwise, if automatic
2448                         publication is switched on, default value is used for result name.
2449
2450             Returns:
2451                 New GEOM.GEOM_Object, containing the created wire.
2452             """
2453             theCommand,Parameters = ParseSketcherCommand(theCommand)
2454             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2455             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2456             anObj.SetParameters(Parameters)
2457             self._autoPublish(anObj, theName, "wire")
2458             return anObj
2459
2460         ## Obtain a 2D sketcher interface
2461         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface      
2462         def Sketcher2D (self):
2463             """
2464             Obtain a 2D sketcher interface.
2465
2466             Example of usage:
2467                sk = geompy.Sketcher2D()
2468                sk.addPoint(20, 20)
2469                sk.addSegmentRelative(15, 70)
2470                sk.addSegmentPerpY(50)
2471                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2472                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2473                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2474                sk.close()
2475                Sketch_1 = sk.wire(geomObj_1)
2476             """
2477             sk = Sketcher2D (self)
2478             return sk
2479         
2480         ## Create a sketcher wire, following the numerical description,
2481         #  passed through <VAR>theCoordinates</VAR> argument. \n
2482         #  @param theCoordinates double values, defining points to create a wire,
2483         #                                                      passing from it.
2484         #  @param theName Object name; when specified, this parameter is used
2485         #         for result publication in the study. Otherwise, if automatic
2486         #         publication is switched on, default value is used for result name.
2487         #
2488         #  @return New GEOM.GEOM_Object, containing the created wire.
2489         #
2490         #  @ref tui_3dsketcher_page "Example"
2491         def Make3DSketcher(self, theCoordinates, theName=None):
2492             """
2493             Create a sketcher wire, following the numerical description,
2494             passed through theCoordinates argument.
2495
2496             Parameters:
2497                 theCoordinates double values, defining points to create a wire,
2498                                passing from it.
2499                 theName Object name; when specified, this parameter is used
2500                         for result publication in the study. Otherwise, if automatic
2501                         publication is switched on, default value is used for result name.
2502
2503             Returns:
2504                 New GEOM_Object, containing the created wire.
2505             """
2506             theCoordinates,Parameters = ParseParameters(theCoordinates)
2507             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2508             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2509             anObj.SetParameters(Parameters)
2510             self._autoPublish(anObj, theName, "wire")
2511             return anObj
2512
2513         ## Obtain a 3D sketcher interface
2514         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2515         #
2516         #  @ref tui_3dsketcher_page "Example"
2517         def Sketcher3D (self):
2518             """
2519             Obtain a 3D sketcher interface.
2520
2521             Example of usage:
2522                 sk = geompy.Sketcher3D()
2523                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2524                 sk.addPointsRelative(0, 0, 130)
2525                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2526                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2527                 sk.close()
2528                 a3D_Sketcher_1 = sk.wire()
2529             """
2530             sk = Sketcher3D (self)
2531             return sk
2532
2533         # end of l3_sketcher
2534         ## @}
2535
2536         ## @addtogroup l3_3d_primitives
2537         ## @{
2538
2539         ## Create a box by coordinates of two opposite vertices.
2540         #
2541         #  @param x1,y1,z1 double values, defining first point it.
2542         #  @param x2,y2,z2 double values, defining first point it.
2543         #  @param theName Object name; when specified, this parameter is used
2544         #         for result publication in the study. Otherwise, if automatic
2545         #         publication is switched on, default value is used for result name.
2546         #
2547         #  @return New GEOM.GEOM_Object, containing the created box.
2548         #
2549         #  @ref tui_creation_box "Example"
2550         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2551             """
2552             Create a box by coordinates of two opposite vertices.
2553             
2554             Parameters:
2555                 x1,y1,z1 double values, defining first point.
2556                 x2,y2,z2 double values, defining second point.
2557                 theName Object name; when specified, this parameter is used
2558                         for result publication in the study. Otherwise, if automatic
2559                         publication is switched on, default value is used for result name.
2560                 
2561             Returns:
2562                 New GEOM.GEOM_Object, containing the created box.
2563             """
2564             # Example: see GEOM_TestAll.py
2565             pnt1 = self.MakeVertex(x1,y1,z1)
2566             pnt2 = self.MakeVertex(x2,y2,z2)
2567             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2568             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2569
2570         ## Create a box with specified dimensions along the coordinate axes
2571         #  and with edges, parallel to the coordinate axes.
2572         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2573         #  @param theDX Length of Box edges, parallel to OX axis.
2574         #  @param theDY Length of Box edges, parallel to OY axis.
2575         #  @param theDZ Length of Box edges, parallel to OZ axis.
2576         #  @param theName Object name; when specified, this parameter is used
2577         #         for result publication in the study. Otherwise, if automatic
2578         #         publication is switched on, default value is used for result name.
2579         #
2580         #  @return New GEOM.GEOM_Object, containing the created box.
2581         #
2582         #  @ref tui_creation_box "Example"
2583         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2584             """
2585             Create a box with specified dimensions along the coordinate axes
2586             and with edges, parallel to the coordinate axes.
2587             Center of the box will be at point (DX/2, DY/2, DZ/2).
2588
2589             Parameters:
2590                 theDX Length of Box edges, parallel to OX axis.
2591                 theDY Length of Box edges, parallel to OY axis.
2592                 theDZ Length of Box edges, parallel to OZ axis.
2593                 theName Object name; when specified, this parameter is used
2594                         for result publication in the study. Otherwise, if automatic
2595                         publication is switched on, default value is used for result name.
2596
2597             Returns:   
2598                 New GEOM.GEOM_Object, containing the created box.
2599             """
2600             # Example: see GEOM_TestAll.py
2601             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2602             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2603             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2604             anObj.SetParameters(Parameters)
2605             self._autoPublish(anObj, theName, "box")
2606             return anObj
2607
2608         ## Create a box with two specified opposite vertices,
2609         #  and with edges, parallel to the coordinate axes
2610         #  @param thePnt1 First of two opposite vertices.
2611         #  @param thePnt2 Second of two opposite vertices.
2612         #  @param theName Object name; when specified, this parameter is used
2613         #         for result publication in the study. Otherwise, if automatic
2614         #         publication is switched on, default value is used for result name.
2615         #
2616         #  @return New GEOM.GEOM_Object, containing the created box.
2617         #
2618         #  @ref tui_creation_box "Example"
2619         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2620             """
2621             Create a box with two specified opposite vertices,
2622             and with edges, parallel to the coordinate axes
2623
2624             Parameters:
2625                 thePnt1 First of two opposite vertices.
2626                 thePnt2 Second of two opposite vertices.
2627                 theName Object name; when specified, this parameter is used
2628                         for result publication in the study. Otherwise, if automatic
2629                         publication is switched on, default value is used for result name.
2630
2631             Returns:
2632                 New GEOM.GEOM_Object, containing the created box.
2633             """
2634             # Example: see GEOM_TestAll.py
2635             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2636             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2637             self._autoPublish(anObj, theName, "box")
2638             return anObj
2639
2640         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2641         #  @param theH height of Face.
2642         #  @param theW width of Face.
2643         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2644         #  @param theName Object name; when specified, this parameter is used
2645         #         for result publication in the study. Otherwise, if automatic
2646         #         publication is switched on, default value is used for result name.
2647         #
2648         #  @return New GEOM.GEOM_Object, containing the created face.
2649         #
2650         #  @ref tui_creation_face "Example"
2651         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2652             """
2653             Create a face with specified dimensions with edges parallel to coordinate axes.
2654
2655             Parameters:
2656                 theH height of Face.
2657                 theW width of Face.
2658                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2659                 theName Object name; when specified, this parameter is used
2660                         for result publication in the study. Otherwise, if automatic
2661                         publication is switched on, default value is used for result name.
2662
2663             Returns:
2664                 New GEOM.GEOM_Object, containing the created face.
2665             """
2666             # Example: see GEOM_TestAll.py
2667             theH,theW,Parameters = ParseParameters(theH, theW)
2668             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2669             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2670             anObj.SetParameters(Parameters)
2671             self._autoPublish(anObj, theName, "rectangle")
2672             return anObj
2673
2674         ## Create a face from another plane and two sizes,
2675         #  vertical size and horisontal size.
2676         #  @param theObj   Normale vector to the creating face or
2677         #  the face object.
2678         #  @param theH     Height (vertical size).
2679         #  @param theW     Width (horisontal size).
2680         #  @param theName Object name; when specified, this parameter is used
2681         #         for result publication in the study. Otherwise, if automatic
2682         #         publication is switched on, default value is used for result name.
2683         #
2684         #  @return New GEOM.GEOM_Object, containing the created face.
2685         #
2686         #  @ref tui_creation_face "Example"
2687         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2688             """
2689             Create a face from another plane and two sizes,
2690             vertical size and horisontal size.
2691
2692             Parameters:
2693                 theObj   Normale vector to the creating face or
2694                          the face object.
2695                 theH     Height (vertical size).
2696                 theW     Width (horisontal size).
2697                 theName Object name; when specified, this parameter is used
2698                         for result publication in the study. Otherwise, if automatic
2699                         publication is switched on, default value is used for result name.
2700
2701             Returns:
2702                 New GEOM_Object, containing the created face.
2703             """
2704             # Example: see GEOM_TestAll.py
2705             theH,theW,Parameters = ParseParameters(theH, theW)
2706             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2707             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2708             anObj.SetParameters(Parameters)
2709             self._autoPublish(anObj, theName, "rectangle")
2710             return anObj
2711
2712         ## Create a disk with given center, normal vector and radius.
2713         #  @param thePnt Disk center.
2714         #  @param theVec Vector, normal to the plane of the disk.
2715         #  @param theR Disk radius.
2716         #  @param theName Object name; when specified, this parameter is used
2717         #         for result publication in the study. Otherwise, if automatic
2718         #         publication is switched on, default value is used for result name.
2719         #
2720         #  @return New GEOM.GEOM_Object, containing the created disk.
2721         #
2722         #  @ref tui_creation_disk "Example"
2723         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2724             """
2725             Create a disk with given center, normal vector and radius.
2726
2727             Parameters:
2728                 thePnt Disk center.
2729                 theVec Vector, normal to the plane of the disk.
2730                 theR Disk radius.
2731                 theName Object name; when specified, this parameter is used
2732                         for result publication in the study. Otherwise, if automatic
2733                         publication is switched on, default value is used for result name.
2734
2735             Returns:    
2736                 New GEOM.GEOM_Object, containing the created disk.
2737             """
2738             # Example: see GEOM_TestAll.py
2739             theR,Parameters = ParseParameters(theR)
2740             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2741             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2742             anObj.SetParameters(Parameters)
2743             self._autoPublish(anObj, theName, "disk")
2744             return anObj
2745
2746         ## Create a disk, passing through three given points
2747         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2748         #  @param theName Object name; when specified, this parameter is used
2749         #         for result publication in the study. Otherwise, if automatic
2750         #         publication is switched on, default value is used for result name.
2751         #
2752         #  @return New GEOM.GEOM_Object, containing the created disk.
2753         #
2754         #  @ref tui_creation_disk "Example"
2755         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2756             """
2757             Create a disk, passing through three given points
2758
2759             Parameters:
2760                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2761                 theName Object name; when specified, this parameter is used
2762                         for result publication in the study. Otherwise, if automatic
2763                         publication is switched on, default value is used for result name.
2764
2765             Returns:    
2766                 New GEOM.GEOM_Object, containing the created disk.
2767             """
2768             # Example: see GEOM_TestAll.py
2769             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2770             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2771             self._autoPublish(anObj, theName, "disk")
2772             return anObj
2773
2774         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2775         #  @param theR Radius of Face.
2776         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2777         #  @param theName Object name; when specified, this parameter is used
2778         #         for result publication in the study. Otherwise, if automatic
2779         #         publication is switched on, default value is used for result name.
2780         #
2781         #  @return New GEOM.GEOM_Object, containing the created disk.
2782         #
2783         #  @ref tui_creation_face "Example"
2784         def MakeDiskR(self, theR, theOrientation, theName=None):
2785             """
2786             Create a disk with specified dimensions along OX-OY coordinate axes.
2787
2788             Parameters:
2789                 theR Radius of Face.
2790                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2791                 theName Object name; when specified, this parameter is used
2792                         for result publication in the study. Otherwise, if automatic
2793                         publication is switched on, default value is used for result name.
2794
2795             Returns: 
2796                 New GEOM.GEOM_Object, containing the created disk.
2797
2798             Example of usage:
2799                 Disk3 = geompy.MakeDiskR(100., 1)
2800             """
2801             # Example: see GEOM_TestAll.py
2802             theR,Parameters = ParseParameters(theR)
2803             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2804             RaiseIfFailed("MakeDiskR", self.PrimOp)
2805             anObj.SetParameters(Parameters)
2806             self._autoPublish(anObj, theName, "disk")
2807             return anObj
2808
2809         ## Create a cylinder with given base point, axis, radius and height.
2810         #  @param thePnt Central point of cylinder base.
2811         #  @param theAxis Cylinder axis.
2812         #  @param theR Cylinder radius.
2813         #  @param theH Cylinder height.
2814         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2819         #
2820         #  @ref tui_creation_cylinder "Example"
2821         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2822             """
2823             Create a cylinder with given base point, axis, radius and height.
2824
2825             Parameters:
2826                 thePnt Central point of cylinder base.
2827                 theAxis Cylinder axis.
2828                 theR Cylinder radius.
2829                 theH Cylinder height.
2830                 theName Object name; when specified, this parameter is used
2831                         for result publication in the study. Otherwise, if automatic
2832                         publication is switched on, default value is used for result name.
2833
2834             Returns: 
2835                 New GEOM.GEOM_Object, containing the created cylinder.
2836             """
2837             # Example: see GEOM_TestAll.py
2838             theR,theH,Parameters = ParseParameters(theR, theH)
2839             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
2840             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
2841             anObj.SetParameters(Parameters)
2842             self._autoPublish(anObj, theName, "cylinder")
2843             return anObj
2844
2845         ## Create a cylinder with given radius and height at
2846         #  the origin of coordinate system. Axis of the cylinder
2847         #  will be collinear to the OZ axis of the coordinate system.
2848         #  @param theR Cylinder radius.
2849         #  @param theH Cylinder height.
2850         #  @param theName Object name; when specified, this parameter is used
2851         #         for result publication in the study. Otherwise, if automatic
2852         #         publication is switched on, default value is used for result name.
2853         #
2854         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2855         #
2856         #  @ref tui_creation_cylinder "Example"
2857         def MakeCylinderRH(self, theR, theH, theName=None):
2858             """
2859             Create a cylinder with given radius and height at
2860             the origin of coordinate system. Axis of the cylinder
2861             will be collinear to the OZ axis of the coordinate system.
2862
2863             Parameters:
2864                 theR Cylinder radius.
2865                 theH Cylinder height.
2866                 theName Object name; when specified, this parameter is used
2867                         for result publication in the study. Otherwise, if automatic
2868                         publication is switched on, default value is used for result name.
2869
2870             Returns:    
2871                 New GEOM.GEOM_Object, containing the created cylinder.
2872             """
2873             # Example: see GEOM_TestAll.py
2874             theR,theH,Parameters = ParseParameters(theR, theH)
2875             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
2876             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
2877             anObj.SetParameters(Parameters)
2878             self._autoPublish(anObj, theName, "cylinder")
2879             return anObj
2880
2881         ## Create a sphere with given center and radius.
2882         #  @param thePnt Sphere center.
2883         #  @param theR Sphere radius.
2884         #  @param theName Object name; when specified, this parameter is used
2885         #         for result publication in the study. Otherwise, if automatic
2886         #         publication is switched on, default value is used for result name.
2887         #
2888         #  @return New GEOM.GEOM_Object, containing the created sphere.
2889         #
2890         #  @ref tui_creation_sphere "Example"
2891         def MakeSpherePntR(self, thePnt, theR, theName=None):
2892             """
2893             Create a sphere with given center and radius.
2894
2895             Parameters:
2896                 thePnt Sphere center.
2897                 theR Sphere radius.
2898                 theName Object name; when specified, this parameter is used
2899                         for result publication in the study. Otherwise, if automatic
2900                         publication is switched on, default value is used for result name.
2901
2902             Returns:    
2903                 New GEOM.GEOM_Object, containing the created sphere.            
2904             """
2905             # Example: see GEOM_TestAll.py
2906             theR,Parameters = ParseParameters(theR)
2907             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
2908             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
2909             anObj.SetParameters(Parameters)
2910             self._autoPublish(anObj, theName, "sphere")
2911             return anObj
2912
2913         ## Create a sphere with given center and radius.
2914         #  @param x,y,z Coordinates of sphere center.
2915         #  @param theR Sphere radius.
2916         #  @param theName Object name; when specified, this parameter is used
2917         #         for result publication in the study. Otherwise, if automatic
2918         #         publication is switched on, default value is used for result name.
2919         #
2920         #  @return New GEOM.GEOM_Object, containing the created sphere.
2921         #
2922         #  @ref tui_creation_sphere "Example"
2923         def MakeSphere(self, x, y, z, theR, theName=None):
2924             """
2925             Create a sphere with given center and radius.
2926
2927             Parameters: 
2928                 x,y,z Coordinates of sphere center.
2929                 theR Sphere radius.
2930                 theName Object name; when specified, this parameter is used
2931                         for result publication in the study. Otherwise, if automatic
2932                         publication is switched on, default value is used for result name.
2933
2934             Returns:
2935                 New GEOM.GEOM_Object, containing the created sphere.
2936             """
2937             # Example: see GEOM_TestAll.py
2938             point = self.MakeVertex(x, y, z)
2939             # note: auto-publishing is done in self.MakeSpherePntR()
2940             anObj = self.MakeSpherePntR(point, theR, theName)
2941             return anObj
2942
2943         ## Create a sphere with given radius at the origin of coordinate system.
2944         #  @param theR Sphere radius.
2945         #  @param theName Object name; when specified, this parameter is used
2946         #         for result publication in the study. Otherwise, if automatic
2947         #         publication is switched on, default value is used for result name.
2948         #
2949         #  @return New GEOM.GEOM_Object, containing the created sphere.
2950         #
2951         #  @ref tui_creation_sphere "Example"
2952         def MakeSphereR(self, theR, theName=None):
2953             """
2954             Create a sphere with given radius at the origin of coordinate system.
2955
2956             Parameters: 
2957                 theR Sphere radius.
2958                 theName Object name; when specified, this parameter is used
2959                         for result publication in the study. Otherwise, if automatic
2960                         publication is switched on, default value is used for result name.
2961
2962             Returns:
2963                 New GEOM.GEOM_Object, containing the created sphere.            
2964             """
2965             # Example: see GEOM_TestAll.py
2966             theR,Parameters = ParseParameters(theR)
2967             anObj = self.PrimOp.MakeSphereR(theR)
2968             RaiseIfFailed("MakeSphereR", self.PrimOp)
2969             anObj.SetParameters(Parameters)
2970             self._autoPublish(anObj, theName, "sphere")
2971             return anObj
2972
2973         ## Create a cone with given base point, axis, height and radiuses.
2974         #  @param thePnt Central point of the first cone base.
2975         #  @param theAxis Cone axis.
2976         #  @param theR1 Radius of the first cone base.
2977         #  @param theR2 Radius of the second cone base.
2978         #    \note If both radiuses are non-zero, the cone will be truncated.
2979         #    \note If the radiuses are equal, a cylinder will be created instead.
2980         #  @param theH Cone height.
2981         #  @param theName Object name; when specified, this parameter is used
2982         #         for result publication in the study. Otherwise, if automatic
2983         #         publication is switched on, default value is used for result name.
2984         #
2985         #  @return New GEOM.GEOM_Object, containing the created cone.
2986         #
2987         #  @ref tui_creation_cone "Example"
2988         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
2989             """
2990             Create a cone with given base point, axis, height and radiuses.
2991
2992             Parameters: 
2993                 thePnt Central point of the first cone base.
2994                 theAxis Cone axis.
2995                 theR1 Radius of the first cone base.
2996                 theR2 Radius of the second cone base.
2997                 theH Cone height.
2998                 theName Object name; when specified, this parameter is used
2999                         for result publication in the study. Otherwise, if automatic
3000                         publication is switched on, default value is used for result name.
3001
3002             Note:
3003                 If both radiuses are non-zero, the cone will be truncated.
3004                 If the radiuses are equal, a cylinder will be created instead.
3005
3006             Returns:
3007                 New GEOM.GEOM_Object, containing the created cone.
3008             """
3009             # Example: see GEOM_TestAll.py
3010             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3011             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3012             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3013             anObj.SetParameters(Parameters)
3014             self._autoPublish(anObj, theName, "cone")
3015             return anObj
3016
3017         ## Create a cone with given height and radiuses at
3018         #  the origin of coordinate system. Axis of the cone will
3019         #  be collinear to the OZ axis of the coordinate system.
3020         #  @param theR1 Radius of the first cone base.
3021         #  @param theR2 Radius of the second cone base.
3022         #    \note If both radiuses are non-zero, the cone will be truncated.
3023         #    \note If the radiuses are equal, a cylinder will be created instead.
3024         #  @param theH Cone height.
3025         #  @param theName Object name; when specified, this parameter is used
3026         #         for result publication in the study. Otherwise, if automatic
3027         #         publication is switched on, default value is used for result name.
3028         #
3029         #  @return New GEOM.GEOM_Object, containing the created cone.
3030         #
3031         #  @ref tui_creation_cone "Example"
3032         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3033             """
3034             Create a cone with given height and radiuses at
3035             the origin of coordinate system. Axis of the cone will
3036             be collinear to the OZ axis of the coordinate system.
3037
3038             Parameters: 
3039                 theR1 Radius of the first cone base.
3040                 theR2 Radius of the second cone base.
3041                 theH Cone height.
3042                 theName Object name; when specified, this parameter is used
3043                         for result publication in the study. Otherwise, if automatic
3044                         publication is switched on, default value is used for result name.
3045
3046             Note:
3047                 If both radiuses are non-zero, the cone will be truncated.
3048                 If the radiuses are equal, a cylinder will be created instead.
3049
3050             Returns:
3051                 New GEOM.GEOM_Object, containing the created cone.
3052             """
3053             # Example: see GEOM_TestAll.py
3054             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3055             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3056             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3057             anObj.SetParameters(Parameters)
3058             self._autoPublish(anObj, theName, "cone")
3059             return anObj
3060
3061         ## Create a torus with given center, normal vector and radiuses.
3062         #  @param thePnt Torus central point.
3063         #  @param theVec Torus axis of symmetry.
3064         #  @param theRMajor Torus major radius.
3065         #  @param theRMinor Torus minor radius.
3066         #  @param theName Object name; when specified, this parameter is used
3067         #         for result publication in the study. Otherwise, if automatic
3068         #         publication is switched on, default value is used for result name.
3069         #
3070         #  @return New GEOM.GEOM_Object, containing the created torus.
3071         #
3072         #  @ref tui_creation_torus "Example"
3073         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3074             """
3075             Create a torus with given center, normal vector and radiuses.
3076
3077             Parameters: 
3078                 thePnt Torus central point.
3079                 theVec Torus axis of symmetry.
3080                 theRMajor Torus major radius.
3081                 theRMinor Torus minor radius.
3082                 theName Object name; when specified, this parameter is used
3083                         for result publication in the study. Otherwise, if automatic
3084                         publication is switched on, default value is used for result name.
3085
3086            Returns:
3087                 New GEOM.GEOM_Object, containing the created torus.
3088             """
3089             # Example: see GEOM_TestAll.py
3090             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3091             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3092             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3093             anObj.SetParameters(Parameters)
3094             self._autoPublish(anObj, theName, "torus")
3095             return anObj
3096
3097         ## Create a torus with given radiuses at the origin of coordinate system.
3098         #  @param theRMajor Torus major radius.
3099         #  @param theRMinor Torus minor radius.
3100         #  @param theName Object name; when specified, this parameter is used
3101         #         for result publication in the study. Otherwise, if automatic
3102         #         publication is switched on, default value is used for result name.
3103         #
3104         #  @return New GEOM.GEOM_Object, containing the created torus.
3105         #
3106         #  @ref tui_creation_torus "Example"
3107         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3108             """
3109            Create a torus with given radiuses at the origin of coordinate system.
3110
3111            Parameters: 
3112                 theRMajor Torus major radius.
3113                 theRMinor Torus minor radius.
3114                 theName Object name; when specified, this parameter is used
3115                         for result publication in the study. Otherwise, if automatic
3116                         publication is switched on, default value is used for result name.
3117
3118            Returns:
3119                 New GEOM.GEOM_Object, containing the created torus.            
3120             """
3121             # Example: see GEOM_TestAll.py
3122             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3123             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3124             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3125             anObj.SetParameters(Parameters)
3126             self._autoPublish(anObj, theName, "torus")
3127             return anObj
3128
3129         # end of l3_3d_primitives
3130         ## @}
3131
3132         ## @addtogroup l3_complex
3133         ## @{
3134
3135         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3136         #  @param theBase Base shape to be extruded.
3137         #  @param thePoint1 First end of extrusion vector.
3138         #  @param thePoint2 Second end of extrusion vector.
3139         #  @param theScaleFactor Use it to make prism with scaled second base.
3140         #                        Nagative value means not scaled second base.
3141         #  @param theName Object name; when specified, this parameter is used
3142         #         for result publication in the study. Otherwise, if automatic
3143         #         publication is switched on, default value is used for result name.
3144         #
3145         #  @return New GEOM.GEOM_Object, containing the created prism.
3146         #
3147         #  @ref tui_creation_prism "Example"
3148         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3149             """
3150             Create a shape by extrusion of the base shape along a vector, defined by two points.
3151
3152             Parameters: 
3153                 theBase Base shape to be extruded.
3154                 thePoint1 First end of extrusion vector.
3155                 thePoint2 Second end of extrusion vector.
3156                 theScaleFactor Use it to make prism with scaled second base.
3157                                Nagative value means not scaled second base.
3158                 theName Object name; when specified, this parameter is used
3159                         for result publication in the study. Otherwise, if automatic
3160                         publication is switched on, default value is used for result name.
3161
3162             Returns:
3163                 New GEOM.GEOM_Object, containing the created prism.
3164             """
3165             # Example: see GEOM_TestAll.py
3166             anObj = None
3167             Parameters = ""
3168             if theScaleFactor > 0:
3169                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3170                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3171             else:
3172                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3173             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3174             anObj.SetParameters(Parameters)
3175             self._autoPublish(anObj, theName, "prism")
3176             return anObj
3177
3178         ## Create a shape by extrusion of the base shape along a
3179         #  vector, defined by two points, in 2 Ways (forward/backward).
3180         #  @param theBase Base shape to be extruded.
3181         #  @param thePoint1 First end of extrusion vector.
3182         #  @param thePoint2 Second end of extrusion vector.
3183         #  @param theName Object name; when specified, this parameter is used
3184         #         for result publication in the study. Otherwise, if automatic
3185         #         publication is switched on, default value is used for result name.
3186         #
3187         #  @return New GEOM.GEOM_Object, containing the created prism.
3188         #
3189         #  @ref tui_creation_prism "Example"
3190         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3191             """
3192             Create a shape by extrusion of the base shape along a
3193             vector, defined by two points, in 2 Ways (forward/backward).
3194
3195             Parameters: 
3196                 theBase Base shape to be extruded.
3197                 thePoint1 First end of extrusion vector.
3198                 thePoint2 Second end of extrusion vector.
3199                 theName Object name; when specified, this parameter is used
3200                         for result publication in the study. Otherwise, if automatic
3201                         publication is switched on, default value is used for result name.
3202
3203             Returns:
3204                 New GEOM.GEOM_Object, containing the created prism.
3205             """
3206             # Example: see GEOM_TestAll.py
3207             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3208             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3209             self._autoPublish(anObj, theName, "prism")
3210             return anObj
3211
3212         ## Create a shape by extrusion of the base shape along the vector,
3213         #  i.e. all the space, transfixed by the base shape during its translation
3214         #  along the vector on the given distance.
3215         #  @param theBase Base shape to be extruded.
3216         #  @param theVec Direction of extrusion.
3217         #  @param theH Prism dimension along theVec.
3218         #  @param theScaleFactor Use it to make prism with scaled second base.
3219         #                        Negative value means not scaled second base.
3220         #  @param theName Object name; when specified, this parameter is used
3221         #         for result publication in the study. Otherwise, if automatic
3222         #         publication is switched on, default value is used for result name.
3223         #
3224         #  @return New GEOM.GEOM_Object, containing the created prism.
3225         #
3226         #  @ref tui_creation_prism "Example"
3227         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3228             """
3229             Create a shape by extrusion of the base shape along the vector,
3230             i.e. all the space, transfixed by the base shape during its translation
3231             along the vector on the given distance.
3232
3233             Parameters: 
3234                 theBase Base shape to be extruded.
3235                 theVec Direction of extrusion.
3236                 theH Prism dimension along theVec.
3237                 theScaleFactor Use it to make prism with scaled second base.
3238                                Negative value means not scaled second base.
3239                 theName Object name; when specified, this parameter is used
3240                         for result publication in the study. Otherwise, if automatic
3241                         publication is switched on, default value is used for result name.
3242
3243             Returns:
3244                 New GEOM.GEOM_Object, containing the created prism.
3245             """
3246             # Example: see GEOM_TestAll.py
3247             anObj = None
3248             Parameters = ""
3249             if theScaleFactor > 0:
3250                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3251                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3252             else:
3253                 theH,Parameters = ParseParameters(theH)
3254                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3255             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3256             anObj.SetParameters(Parameters)
3257             self._autoPublish(anObj, theName, "prism")
3258             return anObj
3259
3260         ## Create a shape by extrusion of the base shape along the vector,
3261         #  i.e. all the space, transfixed by the base shape during its translation
3262         #  along the vector on the given distance in 2 Ways (forward/backward).
3263         #  @param theBase Base shape to be extruded.
3264         #  @param theVec Direction of extrusion.
3265         #  @param theH Prism dimension along theVec in forward direction.
3266         #  @param theName Object name; when specified, this parameter is used
3267         #         for result publication in the study. Otherwise, if automatic
3268         #         publication is switched on, default value is used for result name.
3269         #
3270         #  @return New GEOM.GEOM_Object, containing the created prism.
3271         #
3272         #  @ref tui_creation_prism "Example"
3273         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3274             """
3275             Create a shape by extrusion of the base shape along the vector,
3276             i.e. all the space, transfixed by the base shape during its translation
3277             along the vector on the given distance in 2 Ways (forward/backward).
3278
3279             Parameters:
3280                 theBase Base shape to be extruded.
3281                 theVec Direction of extrusion.
3282                 theH Prism dimension along theVec in forward direction.
3283                 theName Object name; when specified, this parameter is used
3284                         for result publication in the study. Otherwise, if automatic
3285                         publication is switched on, default value is used for result name.
3286
3287             Returns:
3288                 New GEOM.GEOM_Object, containing the created prism.
3289             """
3290             # Example: see GEOM_TestAll.py
3291             theH,Parameters = ParseParameters(theH)
3292             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3293             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3294             anObj.SetParameters(Parameters)
3295             self._autoPublish(anObj, theName, "prism")
3296             return anObj
3297
3298         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3299         #  @param theBase Base shape to be extruded.
3300         #  @param theDX, theDY, theDZ Directions of extrusion.
3301         #  @param theScaleFactor Use it to make prism with scaled second base.
3302         #                        Nagative value means not scaled second base.
3303         #  @param theName Object name; when specified, this parameter is used
3304         #         for result publication in the study. Otherwise, if automatic
3305         #         publication is switched on, default value is used for result name.
3306         #
3307         #  @return New GEOM.GEOM_Object, containing the created prism.
3308         #
3309         #  @ref tui_creation_prism "Example"
3310         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3311             """
3312             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3313
3314             Parameters:
3315                 theBase Base shape to be extruded.
3316                 theDX, theDY, theDZ Directions of extrusion.
3317                 theScaleFactor Use it to make prism with scaled second base.
3318                                Nagative value means not scaled second base.
3319                 theName Object name; when specified, this parameter is used
3320                         for result publication in the study. Otherwise, if automatic
3321                         publication is switched on, default value is used for result name.
3322
3323             Returns: 
3324                 New GEOM.GEOM_Object, containing the created prism.
3325             """
3326             # Example: see GEOM_TestAll.py
3327             anObj = None
3328             Parameters = ""
3329             if theScaleFactor > 0:
3330                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3331                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3332             else:
3333                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3334                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3335             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3336             anObj.SetParameters(Parameters)
3337             self._autoPublish(anObj, theName, "prism")
3338             return anObj
3339
3340         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3341         #  i.e. all the space, transfixed by the base shape during its translation
3342         #  along the vector on the given distance in 2 Ways (forward/backward).
3343         #  @param theBase Base shape to be extruded.
3344         #  @param theDX, theDY, theDZ Directions of extrusion.
3345         #  @param theName Object name; when specified, this parameter is used
3346         #         for result publication in the study. Otherwise, if automatic
3347         #         publication is switched on, default value is used for result name.
3348         #
3349         #  @return New GEOM.GEOM_Object, containing the created prism.
3350         #
3351         #  @ref tui_creation_prism "Example"
3352         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3353             """
3354             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3355             i.e. all the space, transfixed by the base shape during its translation
3356             along the vector on the given distance in 2 Ways (forward/backward).
3357
3358             Parameters:
3359                 theBase Base shape to be extruded.
3360                 theDX, theDY, theDZ Directions of extrusion.
3361                 theName Object name; when specified, this parameter is used
3362                         for result publication in the study. Otherwise, if automatic
3363                         publication is switched on, default value is used for result name.
3364
3365             Returns:
3366                 New GEOM.GEOM_Object, containing the created prism.
3367             """
3368             # Example: see GEOM_TestAll.py
3369             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3370             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3371             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3372             anObj.SetParameters(Parameters)
3373             self._autoPublish(anObj, theName, "prism")
3374             return anObj
3375
3376         ## Create a shape by revolution of the base shape around the axis
3377         #  on the given angle, i.e. all the space, transfixed by the base
3378         #  shape during its rotation around the axis on the given angle.
3379         #  @param theBase Base shape to be rotated.
3380         #  @param theAxis Rotation axis.
3381         #  @param theAngle Rotation angle in radians.
3382         #  @param theName Object name; when specified, this parameter is used
3383         #         for result publication in the study. Otherwise, if automatic
3384         #         publication is switched on, default value is used for result name.
3385         #
3386         #  @return New GEOM.GEOM_Object, containing the created revolution.
3387         #
3388         #  @ref tui_creation_revolution "Example"
3389         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3390             """
3391             Create a shape by revolution of the base shape around the axis
3392             on the given angle, i.e. all the space, transfixed by the base
3393             shape during its rotation around the axis on the given angle.
3394
3395             Parameters:
3396                 theBase Base shape to be rotated.
3397                 theAxis Rotation axis.
3398                 theAngle Rotation angle in radians.
3399                 theName Object name; when specified, this parameter is used
3400                         for result publication in the study. Otherwise, if automatic
3401                         publication is switched on, default value is used for result name.
3402
3403             Returns: 
3404                 New GEOM.GEOM_Object, containing the created revolution.
3405             """
3406             # Example: see GEOM_TestAll.py
3407             theAngle,Parameters = ParseParameters(theAngle)
3408             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3409             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3410             anObj.SetParameters(Parameters)
3411             self._autoPublish(anObj, theName, "revolution")
3412             return anObj
3413
3414         ## Create a shape by revolution of the base shape around the axis
3415         #  on the given angle, i.e. all the space, transfixed by the base
3416         #  shape during its rotation around the axis on the given angle in
3417         #  both directions (forward/backward)
3418         #  @param theBase Base shape to be rotated.
3419         #  @param theAxis Rotation axis.
3420         #  @param theAngle Rotation angle in radians.
3421         #  @param theName Object name; when specified, this parameter is used
3422         #         for result publication in the study. Otherwise, if automatic
3423         #         publication is switched on, default value is used for result name.
3424         #
3425         #  @return New GEOM.GEOM_Object, containing the created revolution.
3426         #
3427         #  @ref tui_creation_revolution "Example"
3428         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3429             """
3430             Create a shape by revolution of the base shape around the axis
3431             on the given angle, i.e. all the space, transfixed by the base
3432             shape during its rotation around the axis on the given angle in
3433             both directions (forward/backward).
3434
3435             Parameters:
3436                 theBase Base shape to be rotated.
3437                 theAxis Rotation axis.
3438                 theAngle Rotation angle in radians.
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 revolution.
3445             """
3446             theAngle,Parameters = ParseParameters(theAngle)
3447             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3448             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3449             anObj.SetParameters(Parameters)
3450             self._autoPublish(anObj, theName, "revolution")
3451             return anObj
3452
3453         ## Create a filling from the given compound of contours.
3454         #  @param theShape the compound of contours
3455         #  @param theMinDeg a minimal degree of BSpline surface to create
3456         #  @param theMaxDeg a maximal degree of BSpline surface to create
3457         #  @param theTol2D a 2d tolerance to be reached
3458         #  @param theTol3D a 3d tolerance to be reached
3459         #  @param theNbIter a number of iteration of approximation algorithm
3460         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3461         #  @param isApprox if True, BSpline curves are generated in the process
3462         #                  of surface construction. By default it is False, that means
3463         #                  the surface is created using given curves. The usage of
3464         #                  Approximation makes the algorithm work slower, but allows
3465         #                  building the surface for rather complex cases.
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 MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3474                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3475             """
3476             Create a filling from the given compound of contours.
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                 theTol2D a 2d tolerance to be reached
3483                 theTol3D a 3d tolerance to be reached
3484                 theNbIter a number of iteration of approximation algorithm
3485                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3486                 isApprox if True, BSpline curves are generated in the process
3487                          of surface construction. By default it is False, that means
3488                          the surface is created using given curves. The usage of
3489                          Approximation makes the algorithm work slower, but allows
3490                          building the surface for rather complex cases
3491                 theName Object name; when specified, this parameter is used
3492                         for result publication in the study. Otherwise, if automatic
3493                         publication is switched on, default value is used for result name.
3494
3495             Returns: 
3496                 New GEOM.GEOM_Object, containing the created filling surface.
3497
3498             Example of usage:
3499                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3500             """
3501             # Example: see GEOM_TestAll.py
3502             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3503             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3504                                             theTol2D, theTol3D, theNbIter,
3505                                             theMethod, isApprox)
3506             RaiseIfFailed("MakeFilling", self.PrimOp)
3507             anObj.SetParameters(Parameters)
3508             self._autoPublish(anObj, theName, "filling")
3509             return anObj
3510
3511
3512         ## Create a filling from the given compound of contours.
3513         #  This method corresponds to MakeFilling with isApprox=True
3514         #  @param theShape the compound of contours
3515         #  @param theMinDeg a minimal degree of BSpline surface to create
3516         #  @param theMaxDeg a maximal degree of BSpline surface to create
3517         #  @param theTol3D a 3d tolerance to be reached
3518         #  @param theName Object name; when specified, this parameter is used
3519         #         for result publication in the study. Otherwise, if automatic
3520         #         publication is switched on, default value is used for result name.
3521         #
3522         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3523         #
3524         #  @ref tui_creation_filling "Example"
3525         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3526             """
3527             Create a filling from the given compound of contours.
3528             This method corresponds to MakeFilling with isApprox=True
3529
3530             Parameters:
3531                 theShape the compound of contours
3532                 theMinDeg a minimal degree of BSpline surface to create
3533                 theMaxDeg a maximal degree of BSpline surface to create
3534                 theTol3D a 3d tolerance to be reached
3535                 theName Object name; when specified, this parameter is used
3536                         for result publication in the study. Otherwise, if automatic
3537                         publication is switched on, default value is used for result name.
3538
3539             Returns: 
3540                 New GEOM.GEOM_Object, containing the created filling surface.
3541
3542             Example of usage:
3543                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3544             """
3545             # Example: see GEOM_TestAll.py
3546             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3547             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3548                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3549             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3550             anObj.SetParameters(Parameters)
3551             self._autoPublish(anObj, theName, "filling")
3552             return anObj
3553
3554         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3555         #  @param theSeqSections - set of specified sections.
3556         #  @param theModeSolid - mode defining building solid or shell
3557         #  @param thePreci - precision 3D used for smoothing
3558         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3559         #  @param theName Object name; when specified, this parameter is used
3560         #         for result publication in the study. Otherwise, if automatic
3561         #         publication is switched on, default value is used for result name.
3562         #
3563         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3564         #
3565         #  @ref swig_todo "Example"
3566         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3567             """
3568             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3569
3570             Parameters:
3571                 theSeqSections - set of specified sections.
3572                 theModeSolid - mode defining building solid or shell
3573                 thePreci - precision 3D used for smoothing
3574                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3575                 theName Object name; when specified, this parameter is used
3576                         for result publication in the study. Otherwise, if automatic
3577                         publication is switched on, default value is used for result name.
3578
3579             Returns:
3580                 New GEOM.GEOM_Object, containing the created shell or solid.
3581             """
3582             # Example: see GEOM_TestAll.py
3583             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3584             RaiseIfFailed("MakeThruSections", self.PrimOp)
3585             self._autoPublish(anObj, theName, "filling")
3586             return anObj
3587
3588         ## Create a shape by extrusion of the base shape along
3589         #  the path shape. The path shape can be a wire or an edge.
3590         #  @param theBase Base shape to be extruded.
3591         #  @param thePath Path shape to extrude the base shape along it.
3592         #  @param theName Object name; when specified, this parameter is used
3593         #         for result publication in the study. Otherwise, if automatic
3594         #         publication is switched on, default value is used for result name.
3595         #
3596         #  @return New GEOM.GEOM_Object, containing the created pipe.
3597         #
3598         #  @ref tui_creation_pipe "Example"
3599         def MakePipe(self, theBase, thePath, theName=None):
3600             """
3601             Create a shape by extrusion of the base shape along
3602             the path shape. The path shape can be a wire or an edge.
3603
3604             Parameters:
3605                 theBase Base shape to be extruded.
3606                 thePath Path shape to extrude the base shape along it.
3607                 theName Object name; when specified, this parameter is used
3608                         for result publication in the study. Otherwise, if automatic
3609                         publication is switched on, default value is used for result name.
3610
3611             Returns:
3612                 New GEOM.GEOM_Object, containing the created pipe.
3613             """
3614             # Example: see GEOM_TestAll.py
3615             anObj = self.PrimOp.MakePipe(theBase, thePath)
3616             RaiseIfFailed("MakePipe", self.PrimOp)
3617             self._autoPublish(anObj, theName, "pipe")
3618             return anObj
3619
3620         ## Create a shape by extrusion of the profile shape along
3621         #  the path shape. The path shape can be a wire or an edge.
3622         #  the several profiles can be specified in the several locations of path.
3623         #  @param theSeqBases - list of  Bases shape to be extruded.
3624         #  @param theLocations - list of locations on the path corresponding
3625         #                        specified list of the Bases shapes. Number of locations
3626         #                        should be equal to number of bases or list of locations can be empty.
3627         #  @param thePath - Path shape to extrude the base shape along it.
3628         #  @param theWithContact - the mode defining that the section is translated to be in
3629         #                          contact with the spine.
3630         #  @param theWithCorrection - defining that the section is rotated to be
3631         #                             orthogonal to the spine tangent in the correspondent point
3632         #  @param theName Object name; when specified, this parameter is used
3633         #         for result publication in the study. Otherwise, if automatic
3634         #         publication is switched on, default value is used for result name.
3635         #
3636         #  @return New GEOM.GEOM_Object, containing the created pipe.
3637         #
3638         #  @ref tui_creation_pipe_with_diff_sec "Example"
3639         def MakePipeWithDifferentSections(self, theSeqBases,
3640                                           theLocations, thePath,
3641                                           theWithContact, theWithCorrection, theName=None):
3642             """
3643             Create a shape by extrusion of the profile shape along
3644             the path shape. The path shape can be a wire or an edge.
3645             the several profiles can be specified in the several locations of path.
3646
3647             Parameters:
3648                 theSeqBases - list of  Bases shape to be extruded.
3649                 theLocations - list of locations on the path corresponding
3650                                specified list of the Bases shapes. Number of locations
3651                                should be equal to number of bases or list of locations can be empty.
3652                 thePath - Path shape to extrude the base shape along it.
3653                 theWithContact - the mode defining that the section is translated to be in
3654                                  contact with the spine(0/1)
3655                 theWithCorrection - defining that the section is rotated to be
3656                                     orthogonal to the spine tangent in the correspondent point (0/1)
3657                 theName Object name; when specified, this parameter is used
3658                         for result publication in the study. Otherwise, if automatic
3659                         publication is switched on, default value is used for result name.
3660
3661             Returns:
3662                 New GEOM.GEOM_Object, containing the created pipe.
3663             """
3664             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3665                                                               theLocations, thePath,
3666                                                               theWithContact, theWithCorrection)
3667             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3668             self._autoPublish(anObj, theName, "pipe")
3669             return anObj
3670
3671         ## Create a shape by extrusion of the profile shape along
3672         #  the path shape. The path shape can be a wire or a edge.
3673         #  the several profiles can be specified in the several locations of path.
3674         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3675         #                       shell or face. If number of faces in neighbour sections
3676         #                       aren't coincided result solid between such sections will
3677         #                       be created using external boundaries of this shells.
3678         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3679         #                          This list is used for searching correspondences between
3680         #                          faces in the sections. Size of this list must be equal
3681         #                          to size of list of base shapes.
3682         #  @param theLocations - list of locations on the path corresponding
3683         #                        specified list of the Bases shapes. Number of locations
3684         #                        should be equal to number of bases. First and last
3685         #                        locations must be coincided with first and last vertexes
3686         #                        of path correspondingly.
3687         #  @param thePath - Path shape to extrude the base shape along it.
3688         #  @param theWithContact - the mode defining that the section is translated to be in
3689         #                          contact with the spine.
3690         #  @param theWithCorrection - defining that the section is rotated to be
3691         #                             orthogonal to the spine tangent in the correspondent point
3692         #  @param theName Object name; when specified, this parameter is used
3693         #         for result publication in the study. Otherwise, if automatic
3694         #         publication is switched on, default value is used for result name.
3695         #
3696         #  @return New GEOM.GEOM_Object, containing the created solids.
3697         #
3698         #  @ref tui_creation_pipe_with_shell_sec "Example"
3699         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3700                                       theLocations, thePath,
3701                                       theWithContact, theWithCorrection, theName=None):
3702             """
3703             Create a shape by extrusion of the profile shape along
3704             the path shape. The path shape can be a wire or a edge.
3705             the several profiles can be specified in the several locations of path.
3706
3707             Parameters:
3708                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3709                               shell or face. If number of faces in neighbour sections
3710                               aren't coincided result solid between such sections will
3711                               be created using external boundaries of this shells.
3712                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3713                                  This list is used for searching correspondences between
3714                                  faces in the sections. Size of this list must be equal
3715                                  to size of list of base shapes.
3716                 theLocations - list of locations on the path corresponding
3717                                specified list of the Bases shapes. Number of locations
3718                                should be equal to number of bases. First and last
3719                                locations must be coincided with first and last vertexes
3720                                of path correspondingly.
3721                 thePath - Path shape to extrude the base shape along it.
3722                 theWithContact - the mode defining that the section is translated to be in
3723                                  contact with the spine (0/1)
3724                 theWithCorrection - defining that the section is rotated to be
3725                                     orthogonal to the spine tangent in the correspondent point (0/1)
3726                 theName Object name; when specified, this parameter is used
3727                         for result publication in the study. Otherwise, if automatic
3728                         publication is switched on, default value is used for result name.
3729
3730             Returns:                           
3731                 New GEOM.GEOM_Object, containing the created solids.
3732             """
3733             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
3734                                                           theLocations, thePath,
3735                                                           theWithContact, theWithCorrection)
3736             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3737             self._autoPublish(anObj, theName, "pipe")
3738             return anObj
3739
3740         ## Create a shape by extrusion of the profile shape along
3741         #  the path shape. This function is used only for debug pipe
3742         #  functionality - it is a version of function MakePipeWithShellSections()
3743         #  which give a possibility to recieve information about
3744         #  creating pipe between each pair of sections step by step.
3745         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
3746                                              theLocations, thePath,
3747                                              theWithContact, theWithCorrection, theName=None):
3748             """
3749             Create a shape by extrusion of the profile shape along
3750             the path shape. This function is used only for debug pipe
3751             functionality - it is a version of previous function
3752             geompy.MakePipeWithShellSections() which give a possibility to
3753             recieve information about creating pipe between each pair of
3754             sections step by step.
3755             """
3756             res = []
3757             nbsect = len(theSeqBases)
3758             nbsubsect = len(theSeqSubBases)
3759             #print "nbsect = ",nbsect
3760             for i in range(1,nbsect):
3761                 #print "  i = ",i
3762                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
3763                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
3764                 tmpSeqSubBases = []
3765                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
3766                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
3767                                                               tmpLocations, thePath,
3768                                                               theWithContact, theWithCorrection)
3769                 if self.PrimOp.IsDone() == 0:
3770                     print "Problems with pipe creation between ",i," and ",i+1," sections"
3771                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3772                     break
3773                 else:
3774                     print "Pipe between ",i," and ",i+1," sections is OK"
3775                     res.append(anObj)
3776                     pass
3777                 pass
3778
3779             resc = self.MakeCompound(res)
3780             #resc = self.MakeSewing(res, 0.001)
3781             #print "resc: ",resc
3782             self._autoPublish(resc, theName, "pipe")
3783             return resc
3784
3785         ## Create solids between given sections
3786         #  @param theSeqBases - list of sections (shell or face).
3787         #  @param theLocations - list of corresponding vertexes
3788         #  @param theName Object name; when specified, this parameter is used
3789         #         for result publication in the study. Otherwise, if automatic
3790         #         publication is switched on, default value is used for result name.
3791         #
3792         #  @return New GEOM.GEOM_Object, containing the created solids.
3793         #
3794         #  @ref tui_creation_pipe_without_path "Example"
3795         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
3796             """
3797             Create solids between given sections
3798
3799             Parameters:
3800                 theSeqBases - list of sections (shell or face).
3801                 theLocations - list of corresponding vertexes
3802                 theName Object name; when specified, this parameter is used
3803                         for result publication in the study. Otherwise, if automatic
3804                         publication is switched on, default value is used for result name.
3805
3806             Returns:
3807                 New GEOM.GEOM_Object, containing the created solids.
3808             """
3809             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
3810             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
3811             self._autoPublish(anObj, theName, "pipe")
3812             return anObj
3813
3814         ## Create a shape by extrusion of the base shape along
3815         #  the path shape with constant bi-normal direction along the given vector.
3816         #  The path shape can be a wire or an edge.
3817         #  @param theBase Base shape to be extruded.
3818         #  @param thePath Path shape to extrude the base shape along it.
3819         #  @param theVec Vector defines a constant binormal direction to keep the
3820         #                same angle beetween the direction and the sections
3821         #                along the sweep surface.
3822         #  @param theName Object name; when specified, this parameter is used
3823         #         for result publication in the study. Otherwise, if automatic
3824         #         publication is switched on, default value is used for result name.
3825         #
3826         #  @return New GEOM.GEOM_Object, containing the created pipe.
3827         #
3828         #  @ref tui_creation_pipe "Example"
3829         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
3830             """
3831             Create a shape by extrusion of the base shape along
3832             the path shape with constant bi-normal direction along the given vector.
3833             The path shape can be a wire or an edge.
3834
3835             Parameters:
3836                 theBase Base shape to be extruded.
3837                 thePath Path shape to extrude the base shape along it.
3838                 theVec Vector defines a constant binormal direction to keep the
3839                        same angle beetween the direction and the sections
3840                        along the sweep surface.
3841                 theName Object name; when specified, this parameter is used
3842                         for result publication in the study. Otherwise, if automatic
3843                         publication is switched on, default value is used for result name.
3844
3845             Returns:              
3846                 New GEOM.GEOM_Object, containing the created pipe.
3847             """
3848             # Example: see GEOM_TestAll.py
3849             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
3850             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
3851             self._autoPublish(anObj, theName, "pipe")
3852             return anObj
3853               
3854         ## Makes a thick solid from a face or a shell
3855         #  @param theShape Face or Shell to be thicken
3856         #  @param theThickness Thickness of the resulting solid
3857         #  @param theName Object name; when specified, this parameter is used
3858         #         for result publication in the study. Otherwise, if automatic
3859         #         publication is switched on, default value is used for result name.
3860         #
3861         #  @return New GEOM.GEOM_Object, containing the created solid
3862         #
3863         def MakeThickSolid(self, theShape, theThickness, theName=None):
3864             """
3865             Make a thick solid from a face or a shell
3866
3867             Parameters:
3868                  theShape Face or Shell to be thicken
3869                  theThickness Thickness of the resulting solid
3870                  theName Object name; when specified, this parameter is used
3871                  for result publication in the study. Otherwise, if automatic
3872                  publication is switched on, default value is used for result name.
3873                  
3874             Returns:
3875                 New GEOM.GEOM_Object, containing the created solid
3876             """
3877             # Example: see GEOM_TestAll.py
3878             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
3879             RaiseIfFailed("MakeThickening", self.PrimOp)
3880             self._autoPublish(anObj, theName, "pipe")
3881             return anObj
3882             
3883
3884         ## Modifies a face or a shell to make it a thick solid
3885         #  @param theShape Face or Shell to be thicken
3886         #  @param theThickness Thickness of the resulting solid
3887         #
3888         #  @return The modified shape
3889         #
3890         def Thicken(self, theShape, theThickness):
3891             """
3892             Modifies a face or a shell to make it a thick solid
3893
3894             Parameters:
3895                 theBase Base shape to be extruded.
3896                 thePath Path shape to extrude the base shape along it.
3897                 theName Object name; when specified, this parameter is used
3898                         for result publication in the study. Otherwise, if automatic
3899                         publication is switched on, default value is used for result name.
3900
3901             Returns:
3902                 The modified shape
3903             """
3904             # Example: see GEOM_TestAll.py
3905             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
3906             RaiseIfFailed("MakeThickening", self.PrimOp)
3907             return anObj
3908
3909         ## Build a middle path of a pipe-like shape.
3910         #  The path shape can be a wire or an edge.
3911         #  @param theShape It can be closed or unclosed pipe-like shell
3912         #                  or a pipe-like solid.
3913         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
3914         #                            should be wires or faces of theShape.
3915         #  @param theName Object name; when specified, this parameter is used
3916         #         for result publication in the study. Otherwise, if automatic
3917         #         publication is switched on, default value is used for result name.
3918         #
3919         #  @note It is not assumed that exact or approximate copy of theShape
3920         #        can be obtained by applying existing Pipe operation on the
3921         #        resulting "Path" wire taking theBase1 as the base - it is not
3922         #        always possible; though in some particular cases it might work
3923         #        it is not guaranteed. Thus, RestorePath function should not be
3924         #        considered as an exact reverse operation of the Pipe.
3925         #
3926         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3927         #                                source pipe's "path".
3928         #
3929         #  @ref tui_creation_pipe_path "Example"
3930         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
3931             """
3932             Build a middle path of a pipe-like shape.
3933             The path shape can be a wire or an edge.
3934
3935             Parameters:
3936                 theShape It can be closed or unclosed pipe-like shell
3937                          or a pipe-like solid.
3938                 theBase1, theBase2 Two bases of the supposed pipe. This
3939                                    should be wires or faces of theShape.
3940                 theName Object name; when specified, this parameter is used
3941                         for result publication in the study. Otherwise, if automatic
3942                         publication is switched on, default value is used for result name.
3943
3944             Returns:
3945                 New GEOM_Object, containing an edge or wire that represent
3946                                  source pipe's path.
3947             """
3948             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
3949             RaiseIfFailed("RestorePath", self.PrimOp)
3950             self._autoPublish(anObj, theName, "path")
3951             return anObj
3952
3953         ## Build a middle path of a pipe-like shape.
3954         #  The path shape can be a wire or an edge.
3955         #  @param theShape It can be closed or unclosed pipe-like shell
3956         #                  or a pipe-like solid.
3957         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
3958         #                                should be lists of edges of theShape.
3959         #  @param theName Object name; when specified, this parameter is used
3960         #         for result publication in the study. Otherwise, if automatic
3961         #         publication is switched on, default value is used for result name.
3962         #
3963         #  @note It is not assumed that exact or approximate copy of theShape
3964         #        can be obtained by applying existing Pipe operation on the
3965         #        resulting "Path" wire taking theBase1 as the base - it is not
3966         #        always possible; though in some particular cases it might work
3967         #        it is not guaranteed. Thus, RestorePath function should not be
3968         #        considered as an exact reverse operation of the Pipe.
3969         #
3970         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3971         #                                source pipe's "path".
3972         #
3973         #  @ref tui_creation_pipe_path "Example"
3974         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
3975             """
3976             Build a middle path of a pipe-like shape.
3977             The path shape can be a wire or an edge.
3978
3979             Parameters:
3980                 theShape It can be closed or unclosed pipe-like shell
3981                          or a pipe-like solid.
3982                 listEdges1, listEdges2 Two bases of the supposed pipe. This
3983                                        should be lists of edges of theShape.
3984                 theName Object name; when specified, this parameter is used
3985                         for result publication in the study. Otherwise, if automatic
3986                         publication is switched on, default value is used for result name.
3987
3988             Returns:
3989                 New GEOM_Object, containing an edge or wire that represent
3990                                  source pipe's path.
3991             """
3992             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
3993             RaiseIfFailed("RestorePath", self.PrimOp)
3994             self._autoPublish(anObj, theName, "path")
3995             return anObj
3996
3997         # end of l3_complex
3998         ## @}
3999
4000         ## @addtogroup l3_advanced
4001         ## @{
4002
4003         ## Create a linear edge with specified ends.
4004         #  @param thePnt1 Point for the first end of edge.
4005         #  @param thePnt2 Point for the second end of edge.
4006         #  @param theName Object name; when specified, this parameter is used
4007         #         for result publication in the study. Otherwise, if automatic
4008         #         publication is switched on, default value is used for result name.
4009         #
4010         #  @return New GEOM.GEOM_Object, containing the created edge.
4011         #
4012         #  @ref tui_creation_edge "Example"
4013         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4014             """
4015             Create a linear edge with specified ends.
4016
4017             Parameters:
4018                 thePnt1 Point for the first end of edge.
4019                 thePnt2 Point for the second end of edge.
4020                 theName Object name; when specified, this parameter is used
4021                         for result publication in the study. Otherwise, if automatic
4022                         publication is switched on, default value is used for result name.
4023
4024             Returns:           
4025                 New GEOM.GEOM_Object, containing the created edge.
4026             """
4027             # Example: see GEOM_TestAll.py
4028             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4029             RaiseIfFailed("MakeEdge", self.ShapesOp)
4030             self._autoPublish(anObj, theName, "edge")
4031             return anObj
4032
4033         ## Create a new edge, corresponding to the given length on the given curve.
4034         #  @param theRefCurve The referenced curve (edge).
4035         #  @param theLength Length on the referenced curve. It can be negative.
4036         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4037         #                       at the end of \a theRefCurve, close to the selected point.
4038         #                       If None, start from the first point of \a theRefCurve.
4039         #  @param theName Object name; when specified, this parameter is used
4040         #         for result publication in the study. Otherwise, if automatic
4041         #         publication is switched on, default value is used for result name.
4042         #
4043         #  @return New GEOM.GEOM_Object, containing the created edge.
4044         #
4045         #  @ref tui_creation_edge "Example"
4046         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4047             """
4048             Create a new edge, corresponding to the given length on the given curve.
4049
4050             Parameters:
4051                 theRefCurve The referenced curve (edge).
4052                 theLength Length on the referenced curve. It can be negative.
4053                 theStartPoint Any point can be selected for it, the new edge will begin
4054                               at the end of theRefCurve, close to the selected point.
4055                               If None, start from the first point of theRefCurve.
4056                 theName Object name; when specified, this parameter is used
4057                         for result publication in the study. Otherwise, if automatic
4058                         publication is switched on, default value is used for result name.
4059
4060             Returns:              
4061                 New GEOM.GEOM_Object, containing the created edge.
4062             """
4063             # Example: see GEOM_TestAll.py
4064             theLength, Parameters = ParseParameters(theLength)
4065             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4066             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4067             anObj.SetParameters(Parameters)
4068             self._autoPublish(anObj, theName, "edge")
4069             return anObj
4070
4071         ## Create an edge from specified wire.
4072         #  @param theWire source Wire
4073         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4074         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4075         #  @param theName Object name; when specified, this parameter is used
4076         #         for result publication in the study. Otherwise, if automatic
4077         #         publication is switched on, default value is used for result name.
4078         #
4079         #  @return New GEOM.GEOM_Object, containing the created edge.
4080         #
4081         #  @ref tui_creation_edge "Example"
4082         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4083             """
4084             Create an edge from specified wire.
4085
4086             Parameters:
4087                 theWire source Wire
4088                 theLinearTolerance linear tolerance value (default = 1e-07)
4089                 theAngularTolerance angular tolerance value (default = 1e-12)
4090                 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             Returns:
4095                 New GEOM.GEOM_Object, containing the created edge.
4096             """
4097             # Example: see GEOM_TestAll.py
4098             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4099             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4100             self._autoPublish(anObj, theName, "edge")
4101             return anObj
4102
4103         ## Create a wire from the set of edges and wires.
4104         #  @param theEdgesAndWires List of edges and/or wires.
4105         #  @param theTolerance Maximum distance between vertices, that will be merged.
4106         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4107         #  @param theName Object name; when specified, this parameter is used
4108         #         for result publication in the study. Otherwise, if automatic
4109         #         publication is switched on, default value is used for result name.
4110         #
4111         #  @return New GEOM.GEOM_Object, containing the created wire.
4112         #
4113         #  @ref tui_creation_wire "Example"
4114         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4115             """
4116             Create a wire from the set of edges and wires.
4117
4118             Parameters:
4119                 theEdgesAndWires List of edges and/or wires.
4120                 theTolerance Maximum distance between vertices, that will be merged.
4121                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4122                 theName Object name; when specified, this parameter is used
4123                         for result publication in the study. Otherwise, if automatic
4124                         publication is switched on, default value is used for result name.
4125
4126             Returns:                    
4127                 New GEOM.GEOM_Object, containing the created wire.
4128             """
4129             # Example: see GEOM_TestAll.py
4130             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4131             RaiseIfFailed("MakeWire", self.ShapesOp)
4132             self._autoPublish(anObj, theName, "wire")
4133             return anObj
4134
4135         ## Create a face on the given wire.
4136         #  @param theWire closed Wire or Edge to build the face on.
4137         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4138         #                        If the tolerance of the obtained planar face is less
4139         #                        than 1e-06, this face will be returned, otherwise the
4140         #                        algorithm tries to build any suitable face on the given
4141         #                        wire and prints a warning message.
4142         #  @param theName Object name; when specified, this parameter is used
4143         #         for result publication in the study. Otherwise, if automatic
4144         #         publication is switched on, default value is used for result name.
4145         #
4146         #  @return New GEOM.GEOM_Object, containing the created face.
4147         #
4148         #  @ref tui_creation_face "Example"
4149         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4150             """
4151             Create a face on the given wire.
4152
4153             Parameters:
4154                 theWire closed Wire or Edge to build the face on.
4155                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4156                                If the tolerance of the obtained planar face is less
4157                                than 1e-06, this face will be returned, otherwise the
4158                                algorithm tries to build any suitable face on the given
4159                                wire and prints a warning message.
4160                 theName Object name; when specified, this parameter is used
4161                         for result publication in the study. Otherwise, if automatic
4162                         publication is switched on, default value is used for result name.
4163
4164             Returns:
4165                 New GEOM.GEOM_Object, containing the created face.
4166             """
4167             # Example: see GEOM_TestAll.py
4168             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4169             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4170                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4171             else:
4172                 RaiseIfFailed("MakeFace", self.ShapesOp)
4173             self._autoPublish(anObj, theName, "face")
4174             return anObj
4175
4176         ## Create a face on the given wires set.
4177         #  @param theWires List of closed wires or edges to build the face on.
4178         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4179         #                        If the tolerance of the obtained planar face is less
4180         #                        than 1e-06, this face will be returned, otherwise the
4181         #                        algorithm tries to build any suitable face on the given
4182         #                        wire and prints a warning message.
4183         #  @param theName Object name; when specified, this parameter is used
4184         #         for result publication in the study. Otherwise, if automatic
4185         #         publication is switched on, default value is used for result name.
4186         #
4187         #  @return New GEOM.GEOM_Object, containing the created face.
4188         #
4189         #  @ref tui_creation_face "Example"
4190         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4191             """
4192             Create a face on the given wires set.
4193
4194             Parameters:
4195                 theWires List of closed wires or edges to build the face on.
4196                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4197                                If the tolerance of the obtained planar face is less
4198                                than 1e-06, this face will be returned, otherwise the
4199                                algorithm tries to build any suitable face on the given
4200                                wire and prints a warning message.
4201                 theName Object name; when specified, this parameter is used
4202                         for result publication in the study. Otherwise, if automatic
4203                         publication is switched on, default value is used for result name.
4204
4205             Returns: 
4206                 New GEOM.GEOM_Object, containing the created face.
4207             """
4208             # Example: see GEOM_TestAll.py
4209             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4210             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4211                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4212             else:
4213                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4214             self._autoPublish(anObj, theName, "face")
4215             return anObj
4216
4217         ## See MakeFaceWires() method for details.
4218         #
4219         #  @ref tui_creation_face "Example 1"
4220         #  \n @ref swig_MakeFaces  "Example 2"
4221         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4222             """
4223             See geompy.MakeFaceWires() method for details.
4224             """
4225             # Example: see GEOM_TestOthers.py
4226             # note: auto-publishing is done in self.MakeFaceWires()
4227             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4228             return anObj
4229
4230         ## Create a shell from the set of faces and shells.
4231         #  @param theFacesAndShells List of faces and/or shells.
4232         #  @param theName Object name; when specified, this parameter is used
4233         #         for result publication in the study. Otherwise, if automatic
4234         #         publication is switched on, default value is used for result name.
4235         #
4236         #  @return New GEOM.GEOM_Object, containing the created shell.
4237         #
4238         #  @ref tui_creation_shell "Example"
4239         def MakeShell(self, theFacesAndShells, theName=None):
4240             """
4241             Create a shell from the set of faces and shells.
4242
4243             Parameters:
4244                 theFacesAndShells List of faces and/or shells.
4245                 theName Object name; when specified, this parameter is used
4246                         for result publication in the study. Otherwise, if automatic
4247                         publication is switched on, default value is used for result name.
4248
4249             Returns:
4250                 New GEOM.GEOM_Object, containing the created shell.
4251             """
4252             # Example: see GEOM_TestAll.py
4253             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4254             RaiseIfFailed("MakeShell", self.ShapesOp)
4255             self._autoPublish(anObj, theName, "shell")
4256             return anObj
4257
4258         ## Create a solid, bounded by the given shells.
4259         #  @param theShells Sequence of bounding shells.
4260         #  @param theName Object name; when specified, this parameter is used
4261         #         for result publication in the study. Otherwise, if automatic
4262         #         publication is switched on, default value is used for result name.
4263         #
4264         #  @return New GEOM.GEOM_Object, containing the created solid.
4265         #
4266         #  @ref tui_creation_solid "Example"
4267         def MakeSolid(self, theShells, theName=None):
4268             """
4269             Create a solid, bounded by the given shells.
4270
4271             Parameters:
4272                 theShells Sequence of bounding shells.
4273                 theName Object name; when specified, this parameter is used
4274                         for result publication in the study. Otherwise, if automatic
4275                         publication is switched on, default value is used for result name.
4276
4277             Returns:
4278                 New GEOM.GEOM_Object, containing the created solid.
4279             """
4280             # Example: see GEOM_TestAll.py
4281             if len(theShells) == 1:
4282                 descr = self.MeasuOp.IsGoodForSolid(theShells[0])
4283                 #if len(descr) > 0:
4284                 #    raise RuntimeError, "MakeSolidShells : " + descr
4285                 if descr == "WRN_SHAPE_UNCLOSED":
4286                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4287             anObj = self.ShapesOp.MakeSolidShells(theShells)
4288             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4289             self._autoPublish(anObj, theName, "solid")
4290             return anObj
4291
4292         ## Create a compound of the given shapes.
4293         #  @param theShapes List of shapes to put in compound.
4294         #  @param theName Object name; when specified, this parameter is used
4295         #         for result publication in the study. Otherwise, if automatic
4296         #         publication is switched on, default value is used for result name.
4297         #
4298         #  @return New GEOM.GEOM_Object, containing the created compound.
4299         #
4300         #  @ref tui_creation_compound "Example"
4301         def MakeCompound(self, theShapes, theName=None):
4302             """
4303             Create a compound of the given shapes.
4304
4305             Parameters:
4306                 theShapes List of shapes to put in compound.
4307                 theName Object name; when specified, this parameter is used
4308                         for result publication in the study. Otherwise, if automatic
4309                         publication is switched on, default value is used for result name.
4310
4311             Returns:
4312                 New GEOM.GEOM_Object, containing the created compound.
4313             """
4314             # Example: see GEOM_TestAll.py
4315             self.ShapesOp.StartOperation()
4316             anObj = self.ShapesOp.MakeCompound(theShapes)
4317             RaiseIfFailed("MakeCompound", self.ShapesOp)
4318             self._autoPublish(anObj, theName, "compound")
4319             return anObj
4320
4321         # end of l3_advanced
4322         ## @}
4323
4324         ## @addtogroup l2_measure
4325         ## @{
4326
4327         ## Gives quantity of faces in the given shape.
4328         #  @param theShape Shape to count faces of.
4329         #  @return Quantity of faces.
4330         #
4331         #  @ref swig_NumberOf "Example"
4332         def NumberOfFaces(self, theShape):
4333             """
4334             Gives quantity of faces in the given shape.
4335
4336             Parameters:
4337                 theShape Shape to count faces of.
4338
4339             Returns:    
4340                 Quantity of faces.
4341             """
4342             # Example: see GEOM_TestOthers.py
4343             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4344             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4345             return nb_faces
4346
4347         ## Gives quantity of edges in the given shape.
4348         #  @param theShape Shape to count edges of.
4349         #  @return Quantity of edges.
4350         #
4351         #  @ref swig_NumberOf "Example"
4352         def NumberOfEdges(self, theShape):
4353             """
4354             Gives quantity of edges in the given shape.
4355
4356             Parameters:
4357                 theShape Shape to count edges of.
4358
4359             Returns:    
4360                 Quantity of edges.
4361             """
4362             # Example: see GEOM_TestOthers.py
4363             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4364             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4365             return nb_edges
4366
4367         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4368         #  @param theShape Shape to count sub-shapes of.
4369         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4370         #  @return Quantity of sub-shapes of given type.
4371         #
4372         #  @ref swig_NumberOf "Example"
4373         def NumberOfSubShapes(self, theShape, theShapeType):
4374             """
4375             Gives quantity of sub-shapes of type theShapeType in the given shape.
4376
4377             Parameters:
4378                 theShape Shape to count sub-shapes of.
4379                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4380
4381             Returns:
4382                 Quantity of sub-shapes of given type.
4383             """
4384             # Example: see GEOM_TestOthers.py
4385             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4386             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4387             return nb_ss
4388
4389         ## Gives quantity of solids in the given shape.
4390         #  @param theShape Shape to count solids in.
4391         #  @return Quantity of solids.
4392         #
4393         #  @ref swig_NumberOf "Example"
4394         def NumberOfSolids(self, theShape):
4395             """
4396             Gives quantity of solids in the given shape.
4397
4398             Parameters:
4399                 theShape Shape to count solids in.
4400
4401             Returns:
4402                 Quantity of solids.
4403             """
4404             # Example: see GEOM_TestOthers.py
4405             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4406             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4407             return nb_solids
4408
4409         # end of l2_measure
4410         ## @}
4411
4412         ## @addtogroup l3_healing
4413         ## @{
4414
4415         ## Reverses an orientation the given shape.
4416         #  @param theShape Shape to be reversed.
4417         #  @param theName Object name; when specified, this parameter is used
4418         #         for result publication in the study. Otherwise, if automatic
4419         #         publication is switched on, default value is used for result name.
4420         #
4421         #  @return The reversed copy of theShape.
4422         #
4423         #  @ref swig_ChangeOrientation "Example"
4424         def ChangeOrientation(self, theShape, theName=None):
4425             """
4426             Reverses an orientation the given shape.
4427
4428             Parameters:
4429                 theShape Shape to be reversed.
4430                 theName Object name; when specified, this parameter is used
4431                         for result publication in the study. Otherwise, if automatic
4432                         publication is switched on, default value is used for result name.
4433
4434             Returns:   
4435                 The reversed copy of theShape.
4436             """
4437             # Example: see GEOM_TestAll.py
4438             anObj = self.ShapesOp.ChangeOrientation(theShape)
4439             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4440             self._autoPublish(anObj, theName, "reversed")
4441             return anObj
4442
4443         ## See ChangeOrientation() method for details.
4444         #
4445         #  @ref swig_OrientationChange "Example"
4446         def OrientationChange(self, theShape, theName=None):
4447             """
4448             See geompy.ChangeOrientation method for details.
4449             """
4450             # Example: see GEOM_TestOthers.py
4451             # note: auto-publishing is done in self.ChangeOrientation()
4452             anObj = self.ChangeOrientation(theShape, theName)
4453             return anObj
4454
4455         # end of l3_healing
4456         ## @}
4457
4458         ## @addtogroup l4_obtain
4459         ## @{
4460
4461         ## Retrieve all free faces from the given shape.
4462         #  Free face is a face, which is not shared between two shells of the shape.
4463         #  @param theShape Shape to find free faces in.
4464         #  @return List of IDs of all free faces, contained in theShape.
4465         #
4466         #  @ref tui_measurement_tools_page "Example"
4467         def GetFreeFacesIDs(self,theShape):
4468             """
4469             Retrieve all free faces from the given shape.
4470             Free face is a face, which is not shared between two shells of the shape.
4471
4472             Parameters:
4473                 theShape Shape to find free faces in.
4474
4475             Returns:
4476                 List of IDs of all free faces, contained in theShape.
4477             """
4478             # Example: see GEOM_TestOthers.py
4479             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4480             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4481             return anIDs
4482
4483         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4484         #  @param theShape1 Shape to find sub-shapes in.
4485         #  @param theShape2 Shape to find shared sub-shapes with.
4486         #  @param theShapeType Type of sub-shapes to be retrieved.
4487         #  @param theName Object name; when specified, this parameter is used
4488         #         for result publication in the study. Otherwise, if automatic
4489         #         publication is switched on, default value is used for result name.
4490         #
4491         #  @return List of sub-shapes of theShape1, shared with theShape2.
4492         #
4493         #  @ref swig_GetSharedShapes "Example"
4494         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4495             """
4496             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4497
4498             Parameters:
4499                 theShape1 Shape to find sub-shapes in.
4500                 theShape2 Shape to find shared sub-shapes with.
4501                 theShapeType Type of sub-shapes to be retrieved.
4502                 theName Object name; when specified, this parameter is used
4503                         for result publication in the study. Otherwise, if automatic
4504                         publication is switched on, default value is used for result name.
4505
4506             Returns:
4507                 List of sub-shapes of theShape1, shared with theShape2.
4508             """
4509             # Example: see GEOM_TestOthers.py
4510             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4511             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4512             self._autoPublish(aList, theName, "shared")
4513             return aList
4514
4515         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4516         #  @param theShapes Shapes to find common sub-shapes of.
4517         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4518         #  @param theName Object name; when specified, this parameter is used
4519         #         for result publication in the study. Otherwise, if automatic
4520         #         publication is switched on, default value is used for result name.
4521         #
4522         #  @return List of objects, that are sub-shapes of all given shapes.
4523         #
4524         #  @ref swig_GetSharedShapes "Example"
4525         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4526             """
4527             Get all sub-shapes, shared by all shapes in the list theShapes.
4528
4529             Parameters:
4530                 theShapes Shapes to find common sub-shapes of.
4531                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4532                 theName Object name; when specified, this parameter is used
4533                         for result publication in the study. Otherwise, if automatic
4534                         publication is switched on, default value is used for result name.
4535
4536             Returns:    
4537                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4538             """
4539             # Example: see GEOM_TestOthers.py
4540             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4541             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4542             self._autoPublish(aList, theName, "shared")
4543             return aList
4544
4545         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4546         #  situated relatively the specified plane by the certain way,
4547         #  defined through <VAR>theState</VAR> parameter.
4548         #  @param theShape Shape to find sub-shapes of.
4549         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4550         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4551         #                direction and location of the plane to find shapes on.
4552         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4553         #  @param theName Object name; when specified, this parameter is used
4554         #         for result publication in the study. Otherwise, if automatic
4555         #         publication is switched on, default value is used for result name.
4556         #
4557         #  @return List of all found sub-shapes.
4558         #
4559         #  @ref swig_GetShapesOnPlane "Example"
4560         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4561             """
4562             Find in theShape all sub-shapes of type theShapeType,
4563             situated relatively the specified plane by the certain way,
4564             defined through theState parameter.
4565
4566             Parameters:
4567                 theShape Shape to find sub-shapes of.
4568                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4569                 theAx1 Vector (or line, or linear edge), specifying normal
4570                        direction and location of the plane to find shapes on.
4571                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4572                 theName Object name; when specified, this parameter is used
4573                         for result publication in the study. Otherwise, if automatic
4574                         publication is switched on, default value is used for result name.
4575
4576             Returns:
4577                 List of all found sub-shapes.
4578             """
4579             # Example: see GEOM_TestOthers.py
4580             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4581             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4582             self._autoPublish(aList, theName, "shapeOnPlane")
4583             return aList
4584
4585         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4586         #  situated relatively the specified plane by the certain way,
4587         #  defined through <VAR>theState</VAR> parameter.
4588         #  @param theShape Shape to find sub-shapes of.
4589         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4590         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4591         #                direction and location of the plane to find shapes on.
4592         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4593         #
4594         #  @return List of all found sub-shapes indices.
4595         #
4596         #  @ref swig_GetShapesOnPlaneIDs "Example"
4597         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4598             """
4599             Find in theShape all sub-shapes of type theShapeType,
4600             situated relatively the specified plane by the certain way,
4601             defined through theState parameter.
4602
4603             Parameters:
4604                 theShape Shape to find sub-shapes of.
4605                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4606                 theAx1 Vector (or line, or linear edge), specifying normal
4607                        direction and location of the plane to find shapes on.
4608                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4609
4610             Returns:
4611                 List of all found sub-shapes indices.
4612             """
4613             # Example: see GEOM_TestOthers.py
4614             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4615             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4616             return aList
4617
4618         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4619         #  situated relatively the specified plane by the certain way,
4620         #  defined through <VAR>theState</VAR> parameter.
4621         #  @param theShape Shape to find sub-shapes of.
4622         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4623         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4624         #                direction of the plane to find shapes on.
4625         #  @param thePnt Point specifying location of the plane to find shapes on.
4626         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4627         #  @param theName Object name; when specified, this parameter is used
4628         #         for result publication in the study. Otherwise, if automatic
4629         #         publication is switched on, default value is used for result name.
4630         #
4631         #  @return List of all found sub-shapes.
4632         #
4633         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4634         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4635             """
4636             Find in theShape all sub-shapes of type theShapeType,
4637             situated relatively the specified plane by the certain way,
4638             defined through theState parameter.
4639
4640             Parameters:
4641                 theShape Shape to find sub-shapes of.
4642                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4643                 theAx1 Vector (or line, or linear edge), specifying normal
4644                        direction and location of the plane to find shapes on.
4645                 thePnt Point specifying location of the plane to find shapes on.
4646                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4647                 theName Object name; when specified, this parameter is used
4648                         for result publication in the study. Otherwise, if automatic
4649                         publication is switched on, default value is used for result name.
4650
4651             Returns:
4652                 List of all found sub-shapes.
4653             """
4654             # Example: see GEOM_TestOthers.py
4655             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4656                                                                theAx1, thePnt, theState)
4657             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4658             self._autoPublish(aList, theName, "shapeOnPlane")
4659             return aList
4660
4661         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4662         #  situated relatively the specified plane by the certain way,
4663         #  defined through <VAR>theState</VAR> parameter.
4664         #  @param theShape Shape to find sub-shapes of.
4665         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4666         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4667         #                direction of the plane to find shapes on.
4668         #  @param thePnt Point specifying location of the plane to find shapes on.
4669         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4670         #
4671         #  @return List of all found sub-shapes indices.
4672         #
4673         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4674         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4675             """
4676             Find in theShape all sub-shapes of type theShapeType,
4677             situated relatively the specified plane by the certain way,
4678             defined through theState parameter.
4679
4680             Parameters:
4681                 theShape Shape to find sub-shapes of.
4682                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4683                 theAx1 Vector (or line, or linear edge), specifying normal
4684                        direction and location of the plane to find shapes on.
4685                 thePnt Point specifying location of the plane to find shapes on.
4686                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4687
4688             Returns:
4689                 List of all found sub-shapes indices.
4690             """
4691             # Example: see GEOM_TestOthers.py
4692             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4693                                                                   theAx1, thePnt, theState)
4694             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4695             return aList
4696
4697         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4698         #  the specified cylinder by the certain way, defined through \a theState parameter.
4699         #  @param theShape Shape to find sub-shapes of.
4700         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4701         #  @param theAxis Vector (or line, or linear edge), specifying
4702         #                 axis of the cylinder to find shapes on.
4703         #  @param theRadius Radius of the cylinder to find shapes on.
4704         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4705         #  @param theName Object name; when specified, this parameter is used
4706         #         for result publication in the study. Otherwise, if automatic
4707         #         publication is switched on, default value is used for result name.
4708         #
4709         #  @return List of all found sub-shapes.
4710         #
4711         #  @ref swig_GetShapesOnCylinder "Example"
4712         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
4713             """
4714             Find in theShape all sub-shapes of type theShapeType, situated relatively
4715             the specified cylinder by the certain way, defined through theState parameter.
4716
4717             Parameters:
4718                 theShape Shape to find sub-shapes of.
4719                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4720                 theAxis Vector (or line, or linear edge), specifying
4721                         axis of the cylinder to find shapes on.
4722                 theRadius Radius of the cylinder to find shapes on.
4723                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4724                 theName Object name; when specified, this parameter is used
4725                         for result publication in the study. Otherwise, if automatic
4726                         publication is switched on, default value is used for result name.
4727
4728             Returns:
4729                 List of all found sub-shapes.
4730             """
4731             # Example: see GEOM_TestOthers.py
4732             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
4733             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
4734             self._autoPublish(aList, theName, "shapeOnCylinder")
4735             return aList
4736
4737         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4738         #  the specified cylinder by the certain way, defined through \a theState parameter.
4739         #  @param theShape Shape to find sub-shapes of.
4740         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4741         #  @param theAxis Vector (or line, or linear edge), specifying
4742         #                 axis of the cylinder to find shapes on.
4743         #  @param theRadius Radius of the cylinder to find shapes on.
4744         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4745         #
4746         #  @return List of all found sub-shapes indices.
4747         #
4748         #  @ref swig_GetShapesOnCylinderIDs "Example"
4749         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
4750             """
4751             Find in theShape all sub-shapes of type theShapeType, situated relatively
4752             the specified cylinder by the certain way, defined through theState parameter.
4753
4754             Parameters:
4755                 theShape Shape to find sub-shapes of.
4756                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4757                 theAxis Vector (or line, or linear edge), specifying
4758                         axis of the cylinder to find shapes on.
4759                 theRadius Radius of the cylinder to find shapes on.
4760                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4761
4762             Returns:
4763                 List of all found sub-shapes indices.
4764             """
4765             # Example: see GEOM_TestOthers.py
4766             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
4767             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
4768             return aList
4769
4770         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4771         #  the specified cylinder by the certain way, defined through \a theState parameter.
4772         #  @param theShape Shape to find sub-shapes of.
4773         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4774         #  @param theAxis Vector (or line, or linear edge), specifying
4775         #                 axis of the cylinder to find shapes on.
4776         #  @param thePnt Point specifying location of the bottom of the cylinder.
4777         #  @param theRadius Radius of the cylinder to find shapes on.
4778         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4779         #  @param theName Object name; when specified, this parameter is used
4780         #         for result publication in the study. Otherwise, if automatic
4781         #         publication is switched on, default value is used for result name.
4782         #
4783         #  @return List of all found sub-shapes.
4784         #
4785         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
4786         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
4787             """
4788             Find in theShape all sub-shapes of type theShapeType, situated relatively
4789             the specified cylinder by the certain way, defined through theState parameter.
4790
4791             Parameters:
4792                 theShape Shape to find sub-shapes of.
4793                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4794                 theAxis Vector (or line, or linear edge), specifying
4795                         axis of the cylinder to find shapes on.
4796                 theRadius Radius of the cylinder to find shapes on.
4797                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4798                 theName Object name; when specified, this parameter is used
4799                         for result publication in the study. Otherwise, if automatic
4800                         publication is switched on, default value is used for result name.
4801
4802             Returns:
4803                 List of all found sub-shapes.
4804             """
4805             # Example: see GEOM_TestOthers.py
4806             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4807             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
4808             self._autoPublish(aList, theName, "shapeOnCylinder")
4809             return aList
4810
4811         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4812         #  the specified cylinder by the certain way, defined through \a theState parameter.
4813         #  @param theShape Shape to find sub-shapes of.
4814         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4815         #  @param theAxis Vector (or line, or linear edge), specifying
4816         #                 axis of the cylinder to find shapes on.
4817         #  @param thePnt Point specifying location of the bottom of the cylinder.
4818         #  @param theRadius Radius of the cylinder to find shapes on.
4819         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4820         #
4821         #  @return List of all found sub-shapes indices
4822         #
4823         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
4824         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
4825             """
4826             Find in theShape all sub-shapes of type theShapeType, situated relatively
4827             the specified cylinder by the certain way, defined through theState parameter.
4828
4829             Parameters:
4830                 theShape Shape to find sub-shapes of.
4831                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4832                 theAxis Vector (or line, or linear edge), specifying
4833                         axis of the cylinder to find shapes on.
4834                 theRadius Radius of the cylinder to find shapes on.
4835                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4836
4837             Returns:
4838                 List of all found sub-shapes indices.            
4839             """
4840             # Example: see GEOM_TestOthers.py
4841             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4842             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
4843             return aList
4844
4845         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4846         #  the specified sphere by the certain way, defined through \a theState parameter.
4847         #  @param theShape Shape to find sub-shapes of.
4848         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4849         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4850         #  @param theRadius Radius of the sphere to find shapes on.
4851         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4852         #  @param theName Object name; when specified, this parameter is used
4853         #         for result publication in the study. Otherwise, if automatic
4854         #         publication is switched on, default value is used for result name.
4855         #
4856         #  @return List of all found sub-shapes.
4857         #
4858         #  @ref swig_GetShapesOnSphere "Example"
4859         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
4860             """
4861             Find in theShape all sub-shapes of type theShapeType, situated relatively
4862             the specified sphere by the certain way, defined through theState parameter.
4863
4864             Parameters:
4865                 theShape Shape to find sub-shapes of.
4866                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4867                 theCenter Point, specifying center of the sphere to find shapes on.
4868                 theRadius Radius of the sphere to find shapes on.
4869                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4870                 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             Returns:
4875                 List of all found sub-shapes.
4876             """
4877             # Example: see GEOM_TestOthers.py
4878             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
4879             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
4880             self._autoPublish(aList, theName, "shapeOnSphere")
4881             return aList
4882
4883         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4884         #  the specified sphere by the certain way, defined through \a theState parameter.
4885         #  @param theShape Shape to find sub-shapes of.
4886         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4887         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4888         #  @param theRadius Radius of the sphere to find shapes on.
4889         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4890         #
4891         #  @return List of all found sub-shapes indices.
4892         #
4893         #  @ref swig_GetShapesOnSphereIDs "Example"
4894         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
4895             """
4896             Find in theShape all sub-shapes of type theShapeType, situated relatively
4897             the specified sphere by the certain way, defined through theState parameter.
4898
4899             Parameters:
4900                 theShape Shape to find sub-shapes of.
4901                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4902                 theCenter Point, specifying center of the sphere to find shapes on.
4903                 theRadius Radius of the sphere to find shapes on.
4904                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4905
4906             Returns:
4907                 List of all found sub-shapes indices.
4908             """
4909             # Example: see GEOM_TestOthers.py
4910             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
4911             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
4912             return aList
4913
4914         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4915         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4916         #  @param theShape Shape to find sub-shapes of.
4917         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4918         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4919         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4920         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4921         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4922         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4923         #  @param theName Object name; when specified, this parameter is used
4924         #         for result publication in the study. Otherwise, if automatic
4925         #         publication is switched on, default value is used for result name.
4926         #
4927         #  @return List of all found sub-shapes.
4928         #
4929         #  @ref swig_GetShapesOnQuadrangle "Example"
4930         def GetShapesOnQuadrangle(self, theShape, theShapeType,
4931                                   theTopLeftPoint, theTopRigthPoint,
4932                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
4933             """
4934             Find in theShape all sub-shapes of type theShapeType, situated relatively
4935             the specified quadrangle by the certain way, defined through theState parameter.
4936
4937             Parameters:
4938                 theShape Shape to find sub-shapes of.
4939                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4940                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4941                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4942                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4943                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4944                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4945                 theName Object name; when specified, this parameter is used
4946                         for result publication in the study. Otherwise, if automatic
4947                         publication is switched on, default value is used for result name.
4948
4949             Returns:
4950                 List of all found sub-shapes.
4951             """
4952             # Example: see GEOM_TestOthers.py
4953             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
4954                                                         theTopLeftPoint, theTopRigthPoint,
4955                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
4956             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
4957             self._autoPublish(aList, theName, "shapeOnQuadrangle")
4958             return aList
4959
4960         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4961         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4962         #  @param theShape Shape to find sub-shapes of.
4963         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4964         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4965         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4966         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4967         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4968         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4969         #
4970         #  @return List of all found sub-shapes indices.
4971         #
4972         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
4973         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
4974                                      theTopLeftPoint, theTopRigthPoint,
4975                                      theBottomLeftPoint, theBottomRigthPoint, theState):
4976             """
4977             Find in theShape all sub-shapes of type theShapeType, situated relatively
4978             the specified quadrangle by the certain way, defined through theState parameter.
4979
4980             Parameters:
4981                 theShape Shape to find sub-shapes of.
4982                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4983                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4984                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4985                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4986                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4987                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4988
4989             Returns:
4990                 List of all found sub-shapes indices.
4991             """
4992
4993             # Example: see GEOM_TestOthers.py
4994             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
4995                                                            theTopLeftPoint, theTopRigthPoint,
4996                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
4997             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
4998             return aList
4999
5000         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5001         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5002         #  @param theBox Shape for relative comparing.
5003         #  @param theShape Shape to find sub-shapes of.
5004         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5005         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5006         #  @param theName Object name; when specified, this parameter is used
5007         #         for result publication in the study. Otherwise, if automatic
5008         #         publication is switched on, default value is used for result name.
5009         #
5010         #  @return List of all found sub-shapes.
5011         #
5012         #  @ref swig_GetShapesOnBox "Example"
5013         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5014             """
5015             Find in theShape all sub-shapes of type theShapeType, situated relatively
5016             the specified theBox by the certain way, defined through theState parameter.
5017
5018             Parameters:
5019                 theBox Shape for relative comparing.
5020                 theShape Shape to find sub-shapes of.
5021                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5022                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5023                 theName Object name; when specified, this parameter is used
5024                         for result publication in the study. Otherwise, if automatic
5025                         publication is switched on, default value is used for result name.
5026
5027             Returns:
5028                 List of all found sub-shapes.
5029             """
5030             # Example: see GEOM_TestOthers.py
5031             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5032             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5033             self._autoPublish(aList, theName, "shapeOnBox")
5034             return aList
5035
5036         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5037         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5038         #  @param theBox Shape for relative comparing.
5039         #  @param theShape Shape to find sub-shapes of.
5040         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5041         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5042         #
5043         #  @return List of all found sub-shapes indices.
5044         #
5045         #  @ref swig_GetShapesOnBoxIDs "Example"
5046         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5047             """
5048             Find in theShape all sub-shapes of type theShapeType, situated relatively
5049             the specified theBox by the certain way, defined through theState parameter.
5050
5051             Parameters:
5052                 theBox Shape for relative comparing.
5053                 theShape Shape to find sub-shapes of.
5054                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5055                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5056
5057             Returns:
5058                 List of all found sub-shapes indices.
5059             """
5060             # Example: see GEOM_TestOthers.py
5061             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5062             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5063             return aList
5064
5065         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5066         #  situated relatively the specified \a theCheckShape by the
5067         #  certain way, defined through \a theState parameter.
5068         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5069         #  @param theShape Shape to find sub-shapes of.
5070         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
5071         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5072         #  @param theName Object name; when specified, this parameter is used
5073         #         for result publication in the study. Otherwise, if automatic
5074         #         publication is switched on, default value is used for result name.
5075         #
5076         #  @return List of all found sub-shapes.
5077         #
5078         #  @ref swig_GetShapesOnShape "Example"
5079         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5080             """
5081             Find in theShape all sub-shapes of type theShapeType,
5082             situated relatively the specified theCheckShape by the
5083             certain way, defined through theState parameter.
5084
5085             Parameters:
5086                 theCheckShape Shape for relative comparing. It must be a solid.
5087                 theShape Shape to find sub-shapes of.
5088                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5089                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5090                 theName Object name; when specified, this parameter is used
5091                         for result publication in the study. Otherwise, if automatic
5092                         publication is switched on, default value is used for result name.
5093
5094             Returns:
5095                 List of all found sub-shapes.
5096             """
5097             # Example: see GEOM_TestOthers.py
5098             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5099                                                    theShapeType, theState)
5100             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5101             self._autoPublish(aList, theName, "shapeOnShape")
5102             return aList
5103
5104         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5105         #  situated relatively the specified \a theCheckShape by the
5106         #  certain way, defined through \a theState parameter.
5107         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5108         #  @param theShape Shape to find sub-shapes of.
5109         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5110         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5111         #  @param theName Object name; when specified, this parameter is used
5112         #         for result publication in the study. Otherwise, if automatic
5113         #         publication is switched on, default value is used for result name.
5114         #
5115         #  @return All found sub-shapes as compound.
5116         #
5117         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5118         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5119             """
5120             Find in theShape all sub-shapes of type theShapeType,
5121             situated relatively the specified theCheckShape by the
5122             certain way, defined through theState parameter.
5123
5124             Parameters:
5125                 theCheckShape Shape for relative comparing. It must be a solid.
5126                 theShape Shape to find sub-shapes of.
5127                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5128                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5129                 theName Object name; when specified, this parameter is used
5130                         for result publication in the study. Otherwise, if automatic
5131                         publication is switched on, default value is used for result name.
5132
5133             Returns:
5134                 All found sub-shapes as compound.
5135             """
5136             # Example: see GEOM_TestOthers.py
5137             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5138                                                              theShapeType, theState)
5139             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5140             self._autoPublish(anObj, theName, "shapeOnShape")
5141             return anObj
5142
5143         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5144         #  situated relatively the specified \a theCheckShape by the
5145         #  certain way, defined through \a theState parameter.
5146         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5147         #  @param theShape Shape to find sub-shapes of.
5148         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5149         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5150         #
5151         #  @return List of all found sub-shapes indices.
5152         #
5153         #  @ref swig_GetShapesOnShapeIDs "Example"
5154         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5155             """
5156             Find in theShape all sub-shapes of type theShapeType,
5157             situated relatively the specified theCheckShape by the
5158             certain way, defined through theState parameter.
5159
5160             Parameters:
5161                 theCheckShape Shape for relative comparing. It must be a solid.
5162                 theShape Shape to find sub-shapes of.
5163                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5164                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5165
5166             Returns:
5167                 List of all found sub-shapes indices.
5168             """
5169             # Example: see GEOM_TestOthers.py
5170             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5171                                                       theShapeType, theState)
5172             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5173             return aList
5174
5175         ## Get sub-shape(s) of theShapeWhere, which are
5176         #  coincident with \a theShapeWhat or could be a part of it.
5177         #  @param theShapeWhere Shape to find sub-shapes of.
5178         #  @param theShapeWhat Shape, specifying what to find.
5179         #  @param isNewImplementation implementation of GetInPlace functionality
5180         #             (default = False, old alghorithm based on shape properties)
5181         #  @param theName Object name; when specified, this parameter is used
5182         #         for result publication in the study. Otherwise, if automatic
5183         #         publication is switched on, default value is used for result name.
5184         #
5185         #  @return Group of all found sub-shapes or a single found sub-shape.
5186         #
5187         #  @note This function has a restriction on argument shapes.
5188         #        If \a theShapeWhere has curved parts with significantly
5189         #        outstanding centres (i.e. the mass centre of a part is closer to
5190         #        \a theShapeWhat than to the part), such parts will not be found.
5191         #        @image html get_in_place_lost_part.png
5192         #
5193         #  @ref swig_GetInPlace "Example"
5194         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5195             """
5196             Get sub-shape(s) of theShapeWhere, which are
5197             coincident with  theShapeWhat or could be a part of it.
5198
5199             Parameters:
5200                 theShapeWhere Shape to find sub-shapes of.
5201                 theShapeWhat Shape, specifying what to find.
5202                 isNewImplementation Implementation of GetInPlace functionality
5203                                     (default = False, old alghorithm based on shape properties)
5204                 theName Object name; when specified, this parameter is used
5205                         for result publication in the study. Otherwise, if automatic
5206                         publication is switched on, default value is used for result name.
5207
5208             Returns:
5209                 Group of all found sub-shapes or a single found sub-shape.
5210
5211                 
5212             Note:
5213                 This function has a restriction on argument shapes.
5214                 If theShapeWhere has curved parts with significantly
5215                 outstanding centres (i.e. the mass centre of a part is closer to
5216                 theShapeWhat than to the part), such parts will not be found.
5217             """
5218             # Example: see GEOM_TestOthers.py
5219             anObj = None
5220             if isNewImplementation:
5221                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5222             else:
5223                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5224                 pass
5225             RaiseIfFailed("GetInPlace", self.ShapesOp)
5226             self._autoPublish(anObj, theName, "inplace")
5227             return anObj
5228
5229         ## Get sub-shape(s) of \a theShapeWhere, which are
5230         #  coincident with \a theShapeWhat or could be a part of it.
5231         #
5232         #  Implementation of this method is based on a saved history of an operation,
5233         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5234         #  arguments (an argument shape or a sub-shape of an argument shape).
5235         #  The operation could be the Partition or one of boolean operations,
5236         #  performed on simple shapes (not on compounds).
5237         #
5238         #  @param theShapeWhere Shape to find sub-shapes of.
5239         #  @param theShapeWhat Shape, specifying what to find (must be in the
5240         #                      building history of the ShapeWhere).
5241         #  @param theName Object name; when specified, this parameter is used
5242         #         for result publication in the study. Otherwise, if automatic
5243         #         publication is switched on, default value is used for result name.
5244         #
5245         #  @return Group of all found sub-shapes or a single found sub-shape.
5246         #
5247         #  @ref swig_GetInPlace "Example"
5248         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5249             """
5250             Implementation of this method is based on a saved history of an operation,
5251             produced theShapeWhere. The theShapeWhat must be among this operation's
5252             arguments (an argument shape or a sub-shape of an argument shape).
5253             The operation could be the Partition or one of boolean operations,
5254             performed on simple shapes (not on compounds).
5255
5256             Parameters:
5257                 theShapeWhere Shape to find sub-shapes of.
5258                 theShapeWhat Shape, specifying what to find (must be in the
5259                                 building history of the ShapeWhere).
5260                 theName Object name; when specified, this parameter is used
5261                         for result publication in the study. Otherwise, if automatic
5262                         publication is switched on, default value is used for result name.
5263
5264             Returns:
5265                 Group of all found sub-shapes or a single found sub-shape.
5266             """
5267             # Example: see GEOM_TestOthers.py
5268             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5269             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5270             self._autoPublish(anObj, theName, "inplace")
5271             return anObj
5272
5273         ## Get sub-shape of theShapeWhere, which is
5274         #  equal to \a theShapeWhat.
5275         #  @param theShapeWhere Shape to find sub-shape of.
5276         #  @param theShapeWhat Shape, specifying what to find.
5277         #  @param theName Object name; when specified, this parameter is used
5278         #         for result publication in the study. Otherwise, if automatic
5279         #         publication is switched on, default value is used for result name.
5280         #
5281         #  @return New GEOM.GEOM_Object for found sub-shape.
5282         #
5283         #  @ref swig_GetSame "Example"
5284         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5285             """
5286             Get sub-shape of theShapeWhere, which is
5287             equal to theShapeWhat.
5288
5289             Parameters:
5290                 theShapeWhere Shape to find sub-shape of.
5291                 theShapeWhat Shape, specifying what to find.
5292                 theName Object name; when specified, this parameter is used
5293                         for result publication in the study. Otherwise, if automatic
5294                         publication is switched on, default value is used for result name.
5295
5296             Returns:
5297                 New GEOM.GEOM_Object for found sub-shape.
5298             """
5299             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5300             RaiseIfFailed("GetSame", self.ShapesOp)
5301             self._autoPublish(anObj, theName, "sameShape")
5302             return anObj
5303
5304
5305         ## Get sub-shape indices of theShapeWhere, which is
5306         #  equal to \a theShapeWhat.
5307         #  @param theShapeWhere Shape to find sub-shape of.
5308         #  @param theShapeWhat Shape, specifying what to find.
5309         #  @return List of all found sub-shapes indices. 
5310         #
5311         #  @ref swig_GetSame "Example"
5312         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5313             """
5314             Get sub-shape indices of theShapeWhere, which is
5315             equal to theShapeWhat.
5316
5317             Parameters:
5318                 theShapeWhere Shape to find sub-shape of.
5319                 theShapeWhat Shape, specifying what to find.
5320
5321             Returns:
5322                 List of all found sub-shapes indices.
5323             """
5324             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5325             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5326             return anObj
5327
5328
5329         # end of l4_obtain
5330         ## @}
5331
5332         ## @addtogroup l4_access
5333         ## @{
5334
5335         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5336         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5337         #  @param aShape Shape to get sub-shape of.
5338         #  @param ListOfID List of sub-shapes indices.
5339         #  @param theName Object name; when specified, this parameter is used
5340         #         for result publication in the study. Otherwise, if automatic
5341         #         publication is switched on, default value is used for result name.
5342         #
5343         #  @return Found sub-shape.
5344         #
5345         #  @ref swig_all_decompose "Example"
5346         def GetSubShape(self, aShape, ListOfID, theName=None):
5347             """
5348             Obtain a composite sub-shape of aShape, composed from sub-shapes
5349             of aShape, selected by their unique IDs inside aShape
5350
5351             Parameters:
5352                 aShape Shape to get sub-shape of.
5353                 ListOfID List of sub-shapes indices.
5354                 theName Object name; when specified, this parameter is used
5355                         for result publication in the study. Otherwise, if automatic
5356                         publication is switched on, default value is used for result name.
5357
5358             Returns:
5359                 Found sub-shape.
5360             """
5361             # Example: see GEOM_TestAll.py
5362             anObj = self.AddSubShape(aShape,ListOfID)
5363             self._autoPublish(anObj, theName, "subshape")
5364             return anObj
5365
5366         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5367         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5368         #  @param aShape Shape to get sub-shape of.
5369         #  @param aSubShape Sub-shapes of aShape.
5370         #  @return ID of found sub-shape.
5371         #
5372         #  @ref swig_all_decompose "Example"
5373         def GetSubShapeID(self, aShape, aSubShape):
5374             """
5375             Obtain unique ID of sub-shape aSubShape inside aShape
5376             of aShape, selected by their unique IDs inside aShape
5377
5378             Parameters:
5379                aShape Shape to get sub-shape of.
5380                aSubShape Sub-shapes of aShape.
5381
5382             Returns:
5383                ID of found sub-shape.
5384             """
5385             # Example: see GEOM_TestAll.py
5386             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5387             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5388             return anID
5389             
5390         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5391         #  This function is provided for performance purpose. The complexity is O(n) with n
5392         #  the number of subobjects of aShape
5393         #  @param aShape Shape to get sub-shape of.
5394         #  @param aSubShapes Sub-shapes of aShape.
5395         #  @return list of IDs of found sub-shapes.
5396         #
5397         #  @ref swig_all_decompose "Example"
5398         def GetSubShapesIDs(self, aShape, aSubShapes):
5399             """
5400             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5401             This function is provided for performance purpose. The complexity is O(n) with n
5402             the number of subobjects of aShape
5403
5404             Parameters:
5405                aShape Shape to get sub-shape of.
5406                aSubShapes Sub-shapes of aShape.
5407
5408             Returns:
5409                List of IDs of found sub-shape.
5410             """
5411             # Example: see GEOM_TestAll.py
5412             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5413             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5414             return anIDs
5415
5416         # end of l4_access
5417         ## @}
5418
5419         ## @addtogroup l4_decompose
5420         ## @{
5421
5422         ## Get all sub-shapes and groups of \a theShape,
5423         #  that were created already by any other methods.
5424         #  @param theShape Any shape.
5425         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5426         #                       returned, else all found sub-shapes and groups.
5427         #  @return List of existing sub-objects of \a theShape.
5428         #
5429         #  @ref swig_all_decompose "Example"
5430         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5431             """
5432             Get all sub-shapes and groups of theShape,
5433             that were created already by any other methods.
5434
5435             Parameters:
5436                 theShape Any shape.
5437                 theGroupsOnly If this parameter is TRUE, only groups will be
5438                                  returned, else all found sub-shapes and groups.
5439
5440             Returns:
5441                 List of existing sub-objects of theShape.
5442             """
5443             # Example: see GEOM_TestAll.py
5444             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5445             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5446             return ListObj
5447
5448         ## Get all groups of \a theShape,
5449         #  that were created already by any other methods.
5450         #  @param theShape Any shape.
5451         #  @return List of existing groups of \a theShape.
5452         #
5453         #  @ref swig_all_decompose "Example"
5454         def GetGroups(self, theShape):
5455             """
5456             Get all groups of theShape,
5457             that were created already by any other methods.
5458
5459             Parameters:
5460                 theShape Any shape.
5461
5462             Returns:
5463                 List of existing groups of theShape.
5464             """
5465             # Example: see GEOM_TestAll.py
5466             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5467             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5468             return ListObj
5469
5470         ## Explode a shape on sub-shapes of a given type.
5471         #  If the shape itself matches the type, it is also returned.
5472         #  @param aShape Shape to be exploded.
5473         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
5474         #  @param theName Object name; when specified, this parameter is used
5475         #         for result publication in the study. Otherwise, if automatic
5476         #         publication is switched on, default value is used for result name.
5477         #
5478         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5479         #
5480         #  @ref swig_all_decompose "Example"
5481         def SubShapeAll(self, aShape, aType, theName=None):
5482             """
5483             Explode a shape on sub-shapes of a given type.
5484             If the shape itself matches the type, it is also returned.
5485
5486             Parameters:
5487                 aShape Shape to be exploded.
5488                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
5489                 theName Object name; when specified, this parameter is used
5490                         for result publication in the study. Otherwise, if automatic
5491                         publication is switched on, default value is used for result name.
5492
5493             Returns:
5494                 List of sub-shapes of type theShapeType, contained in theShape.
5495             """
5496             # Example: see GEOM_TestAll.py
5497             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5498             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5499             self._autoPublish(ListObj, theName, "subshape")
5500             return ListObj
5501
5502         ## Explode a shape on sub-shapes of a given type.
5503         #  @param aShape Shape to be exploded.
5504         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5505         #  @return List of IDs of sub-shapes.
5506         #
5507         #  @ref swig_all_decompose "Example"
5508         def SubShapeAllIDs(self, aShape, aType):
5509             """
5510             Explode a shape on sub-shapes of a given type.
5511
5512             Parameters:
5513                 aShape Shape to be exploded (see geompy.ShapeType)
5514                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5515
5516             Returns:
5517                 List of IDs of sub-shapes.
5518             """
5519             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5520             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5521             return ListObj
5522
5523         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5524         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
5525         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5526         #  @param aShape Shape to get sub-shape of.
5527         #  @param ListOfInd List of sub-shapes indices.
5528         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5529         #  @param theName Object name; when specified, this parameter is used
5530         #         for result publication in the study. Otherwise, if automatic
5531         #         publication is switched on, default value is used for result name.
5532         #
5533         #  @return A compound of sub-shapes of aShape.
5534         #
5535         #  @ref swig_all_decompose "Example"
5536         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5537             """
5538             Obtain a compound of sub-shapes of aShape,
5539             selected by their indices in list of all sub-shapes of type aType.
5540             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5541             
5542             Parameters:
5543                 aShape Shape to get sub-shape of.
5544                 ListOfID List of sub-shapes indices.
5545                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5546                 theName Object name; when specified, this parameter is used
5547                         for result publication in the study. Otherwise, if automatic
5548                         publication is switched on, default value is used for result name.
5549
5550             Returns:
5551                 A compound of sub-shapes of aShape.
5552             """
5553             # Example: see GEOM_TestAll.py
5554             ListOfIDs = []
5555             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5556             for ind in ListOfInd:
5557                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5558             # note: auto-publishing is done in self.GetSubShape()
5559             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5560             return anObj
5561
5562         ## Explode a shape on sub-shapes of a given type.
5563         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5564         #  If the shape itself matches the type, it is also returned.
5565         #  @param aShape Shape to be exploded.
5566         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5567         #  @param theName Object name; when specified, this parameter is used
5568         #         for result publication in the study. Otherwise, if automatic
5569         #         publication is switched on, default value is used for result name.
5570         #
5571         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5572         #
5573         #  @ref swig_SubShapeAllSorted "Example"
5574         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5575             """
5576             Explode a shape on sub-shapes of a given type.
5577             Sub-shapes will be sorted by coordinates of their gravity centers.
5578             If the shape itself matches the type, it is also returned.
5579
5580             Parameters: 
5581                 aShape Shape to be exploded.
5582                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5583                 theName Object name; when specified, this parameter is used
5584                         for result publication in the study. Otherwise, if automatic
5585                         publication is switched on, default value is used for result name.
5586
5587             Returns: 
5588                 List of sub-shapes of type theShapeType, contained in theShape.
5589             """
5590             # Example: see GEOM_TestAll.py
5591             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5592             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5593             self._autoPublish(ListObj, theName, "subshape")
5594             return ListObj
5595
5596         ## Explode a shape on sub-shapes of a given type.
5597         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5598         #  @param aShape Shape to be exploded.
5599         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5600         #  @return List of IDs of sub-shapes.
5601         #
5602         #  @ref swig_all_decompose "Example"
5603         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5604             """
5605             Explode a shape on sub-shapes of a given type.
5606             Sub-shapes will be sorted by coordinates of their gravity centers.
5607
5608             Parameters: 
5609                 aShape Shape to be exploded.
5610                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5611
5612             Returns: 
5613                 List of IDs of sub-shapes.
5614             """
5615             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5616             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5617             return ListIDs
5618
5619         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5620         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5621         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5622         #  @param aShape Shape to get sub-shape of.
5623         #  @param ListOfInd List of sub-shapes indices.
5624         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5625         #  @param theName Object name; when specified, this parameter is used
5626         #         for result publication in the study. Otherwise, if automatic
5627         #         publication is switched on, default value is used for result name.
5628         #
5629         #  @return A compound of sub-shapes of aShape.
5630         #
5631         #  @ref swig_all_decompose "Example"
5632         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5633             """
5634             Obtain a compound of sub-shapes of aShape,
5635             selected by they indices in sorted list of all sub-shapes of type aType.
5636             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5637
5638             Parameters:
5639                 aShape Shape to get sub-shape of.
5640                 ListOfID List of sub-shapes indices.
5641                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5642                 theName Object name; when specified, this parameter is used
5643                         for result publication in the study. Otherwise, if automatic
5644                         publication is switched on, default value is used for result name.
5645
5646             Returns:
5647                 A compound of sub-shapes of aShape.
5648             """
5649             # Example: see GEOM_TestAll.py
5650             ListOfIDs = []
5651             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5652             for ind in ListOfInd:
5653                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5654             # note: auto-publishing is done in self.GetSubShape()
5655             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5656             return anObj
5657
5658         ## Extract shapes (excluding the main shape) of given type.
5659         #  @param aShape The shape.
5660         #  @param aType  The shape type (see ShapeType())
5661         #  @param isSorted Boolean flag to switch sorting on/off.
5662         #  @param theName Object name; when specified, this parameter is used
5663         #         for result publication in the study. Otherwise, if automatic
5664         #         publication is switched on, default value is used for result name.
5665         #
5666         #  @return List of sub-shapes of type aType, contained in aShape.
5667         #
5668         #  @ref swig_FilletChamfer "Example"
5669         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
5670             """
5671             Extract shapes (excluding the main shape) of given type.
5672
5673             Parameters:
5674                 aShape The shape.
5675                 aType  The shape type (see geompy.ShapeType)
5676                 isSorted Boolean flag to switch sorting on/off.
5677                 theName Object name; when specified, this parameter is used
5678                         for result publication in the study. Otherwise, if automatic
5679                         publication is switched on, default value is used for result name.
5680
5681             Returns:     
5682                 List of sub-shapes of type aType, contained in aShape.
5683             """
5684             # Example: see GEOM_TestAll.py
5685             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
5686             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
5687             self._autoPublish(ListObj, theName, "subshape")
5688             return ListObj
5689
5690         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
5691         #  @param aShape Main shape.
5692         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
5693         #  @param theName Object name; when specified, this parameter is used
5694         #         for result publication in the study. Otherwise, if automatic
5695         #         publication is switched on, default value is used for result name.
5696         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5697         #
5698         #  @ref swig_all_decompose "Example"
5699         def SubShapes(self, aShape, anIDs, theName=None):
5700             """
5701             Get a set of sub-shapes defined by their unique IDs inside theMainShape
5702
5703             Parameters:
5704                 aShape Main shape.
5705                 anIDs List of unique IDs of sub-shapes inside theMainShape.
5706                 theName Object name; when specified, this parameter is used
5707                         for result publication in the study. Otherwise, if automatic
5708                         publication is switched on, default value is used for result name.
5709
5710             Returns:      
5711                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5712             """
5713             # Example: see GEOM_TestAll.py
5714             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
5715             RaiseIfFailed("SubShapes", self.ShapesOp)
5716             self._autoPublish(ListObj, theName, "subshape")
5717             return ListObj
5718
5719         # end of l4_decompose
5720         ## @}
5721
5722         ## @addtogroup l4_decompose_d
5723         ## @{
5724
5725         ## Deprecated method
5726         #  It works like SubShapeAllSortedCentres(), but wrongly
5727         #  defines centres of faces, shells and solids.
5728         def SubShapeAllSorted(self, aShape, aType, theName=None):
5729             """
5730             Deprecated method
5731             It works like geompy.SubShapeAllSortedCentres, but wrongly
5732             defines centres of faces, shells and solids.
5733             """
5734             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
5735             RaiseIfFailed("MakeExplode", self.ShapesOp)
5736             self._autoPublish(ListObj, theName, "subshape")
5737             return ListObj
5738
5739         ## Deprecated method
5740         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
5741         #  defines centres of faces, shells and solids.
5742         def SubShapeAllSortedIDs(self, aShape, aType):
5743             """
5744             Deprecated method
5745             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
5746             defines centres of faces, shells and solids.
5747             """
5748             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
5749             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5750             return ListIDs
5751
5752         ## Deprecated method
5753         #  It works like SubShapeSortedCentres(), but has a bug
5754         #  (wrongly defines centres of faces, shells and solids).
5755         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
5756             """
5757             Deprecated method
5758             It works like geompy.SubShapeSortedCentres, but has a bug
5759             (wrongly defines centres of faces, shells and solids).
5760             """
5761             ListOfIDs = []
5762             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
5763             for ind in ListOfInd:
5764                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5765             # note: auto-publishing is done in self.GetSubShape()
5766             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5767             return anObj
5768
5769         # end of l4_decompose_d
5770         ## @}
5771
5772         ## @addtogroup l3_healing
5773         ## @{
5774
5775         ## Apply a sequence of Shape Healing operators to the given object.
5776         #  @param theShape Shape to be processed.
5777         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5778         #  @param theParameters List of names of parameters
5779         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5780         #  @param theValues List of values of parameters, in the same order
5781         #                    as parameters are listed in <VAR>theParameters</VAR> list.
5782         #  @param theName Object name; when specified, this parameter is used
5783         #         for result publication in the study. Otherwise, if automatic
5784         #         publication is switched on, default value is used for result name.
5785         #
5786         #  <b> Operators and Parameters: </b> \n
5787         #
5788         #  * \b FixShape - corrects invalid shapes. \n
5789         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
5790         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
5791         #
5792         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
5793         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
5794         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
5795         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
5796         #
5797         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
5798         #    surfaces in segments using a certain angle. \n
5799         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5800         #    if Angle=180, four if Angle=90, etc). \n
5801         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
5802         #
5803         #  * \b SplitClosedFaces - splits closed faces in segments.
5804         #    The number of segments depends on the number of splitting points.\n
5805         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
5806         #
5807         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
5808         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
5809         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
5810         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
5811         #   This and the previous parameters can take the following values:\n
5812         #   \b Parametric \b Continuity \n
5813         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
5814         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
5815         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
5816         #    ruling out sharp edges).\n
5817         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
5818         #       are of the same magnitude).\n
5819         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
5820         #    or surfaces (d/du C(u)) are the same at junction. \n
5821         #   \b Geometric \b Continuity \n
5822         #   \b G1: first derivatives are proportional at junction.\n
5823         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
5824         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
5825         #   \b G2: first and second derivatives are proportional at junction.
5826         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
5827         #    continuity requires that the underlying parameterization was continuous as well.
5828         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
5829         #
5830         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
5831         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
5832         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
5833         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
5834         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
5835         #       with the specified parameters.\n
5836         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
5837         #       with the specified parameters.\n
5838         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
5839         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
5840         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
5841         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
5842         #
5843         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
5844         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
5845         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
5846         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
5847         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
5848         #
5849         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
5850         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
5851         #
5852         #
5853         #  @return New GEOM.GEOM_Object, containing processed shape.
5854         #
5855         #  \n @ref tui_shape_processing "Example"
5856         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
5857             """
5858             Apply a sequence of Shape Healing operators to the given object.
5859
5860             Parameters:
5861                 theShape Shape to be processed.
5862                 theValues List of values of parameters, in the same order
5863                           as parameters are listed in theParameters list.
5864                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5865                 theParameters List of names of parameters
5866                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5867                 theName Object name; when specified, this parameter is used
5868                         for result publication in the study. Otherwise, if automatic
5869                         publication is switched on, default value is used for result name.
5870
5871                 Operators and Parameters:
5872
5873                  * FixShape - corrects invalid shapes.
5874                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
5875                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
5876                  * FixFaceSize - removes small faces, such as spots and strips.
5877                      * FixFaceSize.Tolerance - defines minimum possible face size.
5878                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
5879                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
5880                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
5881                                 in segments using a certain angle.
5882                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5883                                           if Angle=180, four if Angle=90, etc).
5884                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
5885                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
5886                                       splitting points.
5887                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
5888                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
5889                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
5890                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
5891                      * SplitContinuity.CurveContinuity - required continuity for curves.
5892                        This and the previous parameters can take the following values:
5893                        
5894                        Parametric Continuity:
5895                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
5896                                                    coincidental. The curves or surfaces may still meet at an angle,
5897                                                    giving rise to a sharp corner or edge).
5898                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
5899                                                    are parallel, ruling out sharp edges).
5900                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
5901                                                   or surfaces are of the same magnitude).
5902                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
5903                           curves or surfaces (d/du C(u)) are the same at junction.
5904                           
5905                        Geometric Continuity:
5906                        G1: first derivatives are proportional at junction.
5907                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
5908                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
5909                        G2: first and second derivatives are proportional at junction. As the names imply,
5910                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
5911                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
5912                            geometric continuity of order n, but not vice-versa.
5913                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
5914                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
5915                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
5916                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
5917                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
5918                                                         the specified parameters.
5919                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
5920                                                         the specified parameters.
5921                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
5922                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
5923                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
5924                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
5925                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
5926                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
5927                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
5928                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
5929                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
5930                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
5931                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
5932
5933             Returns:
5934                 New GEOM.GEOM_Object, containing processed shape.
5935
5936             Note: For more information look through SALOME Geometry User's Guide->
5937                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
5938             """
5939             # Example: see GEOM_TestHealing.py
5940             theValues,Parameters = ParseList(theValues)
5941             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
5942             # To avoid script failure in case of good argument shape
5943             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
5944                 return theShape
5945             RaiseIfFailed("ProcessShape", self.HealOp)
5946             for string in (theOperators + theParameters):
5947                 Parameters = ":" + Parameters
5948                 pass
5949             anObj.SetParameters(Parameters)
5950             self._autoPublish(anObj, theName, "healed")
5951             return anObj
5952
5953         ## Remove faces from the given object (shape).
5954         #  @param theObject Shape to be processed.
5955         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
5956         #                  removes ALL faces of the given object.
5957         #  @param theName Object name; when specified, this parameter is used
5958         #         for result publication in the study. Otherwise, if automatic
5959         #         publication is switched on, default value is used for result name.
5960         #
5961         #  @return New GEOM.GEOM_Object, containing processed shape.
5962         #
5963         #  @ref tui_suppress_faces "Example"
5964         def SuppressFaces(self, theObject, theFaces, theName=None):
5965             """
5966             Remove faces from the given object (shape).
5967
5968             Parameters:
5969                 theObject Shape to be processed.
5970                 theFaces Indices of faces to be removed, if EMPTY then the method
5971                          removes ALL faces of the given object.
5972                 theName Object name; when specified, this parameter is used
5973                         for result publication in the study. Otherwise, if automatic
5974                         publication is switched on, default value is used for result name.
5975
5976             Returns:
5977                 New GEOM.GEOM_Object, containing processed shape.
5978             """
5979             # Example: see GEOM_TestHealing.py
5980             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
5981             RaiseIfFailed("SuppressFaces", self.HealOp)
5982             self._autoPublish(anObj, theName, "suppressFaces")
5983             return anObj
5984
5985         ## Sewing of some shapes into single shape.
5986         #  @param ListShape Shapes to be processed.
5987         #  @param theTolerance Required tolerance value.
5988         #  @param AllowNonManifold Flag that allows non-manifold sewing.
5989         #  @param theName Object name; when specified, this parameter is used
5990         #         for result publication in the study. Otherwise, if automatic
5991         #         publication is switched on, default value is used for result name.
5992         #
5993         #  @return New GEOM.GEOM_Object, containing processed shape.
5994         #
5995         #  @ref tui_sewing "Example"
5996         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
5997             """
5998             Sewing of some shapes into single shape.
5999
6000             Parameters:
6001                 ListShape Shapes to be processed.
6002                 theTolerance Required tolerance value.
6003                 AllowNonManifold Flag that allows non-manifold sewing.
6004                 theName Object name; when specified, this parameter is used
6005                         for result publication in the study. Otherwise, if automatic
6006                         publication is switched on, default value is used for result name.
6007
6008             Returns:
6009                 New GEOM.GEOM_Object, containing processed shape.
6010             """
6011             # Example: see GEOM_TestHealing.py
6012             comp = self.MakeCompound(ListShape)
6013             # note: auto-publishing is done in self.Sew()
6014             anObj = self.Sew(comp, theTolerance, AllowNonManifold, theName)
6015             return anObj
6016
6017         ## Sewing of the given object.
6018         #  @param theObject Shape to be processed.
6019         #  @param theTolerance Required tolerance value.
6020         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6021         #  @param theName Object name; when specified, this parameter is used
6022         #         for result publication in the study. Otherwise, if automatic
6023         #         publication is switched on, default value is used for result name.
6024         #
6025         #  @return New GEOM.GEOM_Object, containing processed shape.
6026         def Sew(self, theObject, theTolerance, AllowNonManifold=False, theName=None):
6027             """
6028             Sewing of the given object.
6029
6030             Parameters:
6031                 theObject Shape to be processed.
6032                 theTolerance Required tolerance value.
6033                 AllowNonManifold Flag that allows non-manifold sewing.
6034                 theName Object name; when specified, this parameter is used
6035                         for result publication in the study. Otherwise, if automatic
6036                         publication is switched on, default value is used for result name.
6037
6038             Returns:
6039                 New GEOM.GEOM_Object, containing processed shape.
6040             """
6041             # Example: see MakeSewing() above
6042             theTolerance,Parameters = ParseParameters(theTolerance)
6043             if AllowNonManifold:
6044                 anObj = self.HealOp.SewAllowNonManifold(theObject, theTolerance)
6045             else:
6046                 anObj = self.HealOp.Sew(theObject, theTolerance)
6047             # To avoid script failure in case of good argument shape
6048             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6049                 return theObject
6050             RaiseIfFailed("Sew", self.HealOp)
6051             anObj.SetParameters(Parameters)
6052             self._autoPublish(anObj, theName, "sewed")
6053             return anObj
6054
6055         ## Rebuild the topology of theCompound of solids by removing
6056         #  of the faces that are shared by several solids.
6057         #  @param theCompound Shape to be processed.
6058         #  @param theName Object name; when specified, this parameter is used
6059         #         for result publication in the study. Otherwise, if automatic
6060         #         publication is switched on, default value is used for result name.
6061         #
6062         #  @return New GEOM.GEOM_Object, containing processed shape.
6063         #
6064         #  @ref tui_remove_webs "Example"
6065         def RemoveInternalFaces (self, theCompound, theName=None):
6066             """
6067             Rebuild the topology of theCompound of solids by removing
6068             of the faces that are shared by several solids.
6069
6070             Parameters:
6071                 theCompound Shape to be processed.
6072                 theName Object name; when specified, this parameter is used
6073                         for result publication in the study. Otherwise, if automatic
6074                         publication is switched on, default value is used for result name.
6075
6076             Returns:
6077                 New GEOM.GEOM_Object, containing processed shape.
6078             """
6079             # Example: see GEOM_TestHealing.py
6080             anObj = self.HealOp.RemoveInternalFaces(theCompound)
6081             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6082             self._autoPublish(anObj, theName, "removeWebs")
6083             return anObj
6084
6085         ## Remove internal wires and edges from the given object (face).
6086         #  @param theObject Shape to be processed.
6087         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6088         #                  removes ALL internal wires of the given object.
6089         #  @param theName Object name; when specified, this parameter is used
6090         #         for result publication in the study. Otherwise, if automatic
6091         #         publication is switched on, default value is used for result name.
6092         #
6093         #  @return New GEOM.GEOM_Object, containing processed shape.
6094         #
6095         #  @ref tui_suppress_internal_wires "Example"
6096         def SuppressInternalWires(self, theObject, theWires, theName=None):
6097             """
6098             Remove internal wires and edges from the given object (face).
6099
6100             Parameters:
6101                 theObject Shape to be processed.
6102                 theWires Indices of wires to be removed, if EMPTY then the method
6103                          removes ALL internal wires of the given object.
6104                 theName Object name; when specified, this parameter is used
6105                         for result publication in the study. Otherwise, if automatic
6106                         publication is switched on, default value is used for result name.
6107
6108             Returns:                
6109                 New GEOM.GEOM_Object, containing processed shape.
6110             """
6111             # Example: see GEOM_TestHealing.py
6112             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6113             RaiseIfFailed("RemoveIntWires", self.HealOp)
6114             self._autoPublish(anObj, theName, "suppressWires")
6115             return anObj
6116
6117         ## Remove internal closed contours (holes) from the given object.
6118         #  @param theObject Shape to be processed.
6119         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6120         #                  removes ALL internal holes of the given object
6121         #  @param theName Object name; when specified, this parameter is used
6122         #         for result publication in the study. Otherwise, if automatic
6123         #         publication is switched on, default value is used for result name.
6124         #
6125         #  @return New GEOM.GEOM_Object, containing processed shape.
6126         #
6127         #  @ref tui_suppress_holes "Example"
6128         def SuppressHoles(self, theObject, theWires, theName=None):
6129             """
6130             Remove internal closed contours (holes) from the given object.
6131
6132             Parameters:
6133                 theObject Shape to be processed.
6134                 theWires Indices of wires to be removed, if EMPTY then the method
6135                          removes ALL internal holes of the given object
6136                 theName Object name; when specified, this parameter is used
6137                         for result publication in the study. Otherwise, if automatic
6138                         publication is switched on, default value is used for result name.
6139
6140             Returns:    
6141                 New GEOM.GEOM_Object, containing processed shape.
6142             """
6143             # Example: see GEOM_TestHealing.py
6144             anObj = self.HealOp.FillHoles(theObject, theWires)
6145             RaiseIfFailed("FillHoles", self.HealOp)
6146             self._autoPublish(anObj, theName, "suppressHoles")
6147             return anObj
6148
6149         ## Close an open wire.
6150         #  @param theObject Shape to be processed.
6151         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6152         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6153         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6154         #                        If False : closure by creation of an edge between ends.
6155         #  @param theName Object name; when specified, this parameter is used
6156         #         for result publication in the study. Otherwise, if automatic
6157         #         publication is switched on, default value is used for result name.
6158         #
6159         #  @return New GEOM.GEOM_Object, containing processed shape.
6160         #
6161         #  @ref tui_close_contour "Example"
6162         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6163             """
6164             Close an open wire.
6165
6166             Parameters: 
6167                 theObject Shape to be processed.
6168                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6169                          if [ ], then theObject itself is a wire.
6170                 isCommonVertex If True  : closure by creation of a common vertex,
6171                                If False : closure by creation of an edge between ends.
6172                 theName Object name; when specified, this parameter is used
6173                         for result publication in the study. Otherwise, if automatic
6174                         publication is switched on, default value is used for result name.
6175
6176             Returns:                      
6177                 New GEOM.GEOM_Object, containing processed shape. 
6178             """
6179             # Example: see GEOM_TestHealing.py
6180             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6181             RaiseIfFailed("CloseContour", self.HealOp)
6182             self._autoPublish(anObj, theName, "closeContour")
6183             return anObj
6184
6185         ## Addition of a point to a given edge object.
6186         #  @param theObject Shape to be processed.
6187         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6188         #                      if -1, then theObject itself is the edge.
6189         #  @param theValue Value of parameter on edge or length parameter,
6190         #                  depending on \a isByParameter.
6191         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6192         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6193         #  @param theName Object name; when specified, this parameter is used
6194         #         for result publication in the study. Otherwise, if automatic
6195         #         publication is switched on, default value is used for result name.
6196         #
6197         #  @return New GEOM.GEOM_Object, containing processed shape.
6198         #
6199         #  @ref tui_add_point_on_edge "Example"
6200         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6201             """
6202             Addition of a point to a given edge object.
6203
6204             Parameters: 
6205                 theObject Shape to be processed.
6206                 theEdgeIndex Index of edge to be divided within theObject's shape,
6207                              if -1, then theObject itself is the edge.
6208                 theValue Value of parameter on edge or length parameter,
6209                          depending on isByParameter.
6210                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6211                               if FALSE : theValue is treated as a length parameter [0..1]
6212                 theName Object name; when specified, this parameter is used
6213                         for result publication in the study. Otherwise, if automatic
6214                         publication is switched on, default value is used for result name.
6215
6216             Returns:  
6217                 New GEOM.GEOM_Object, containing processed shape.
6218             """
6219             # Example: see GEOM_TestHealing.py
6220             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6221             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6222             RaiseIfFailed("DivideEdge", self.HealOp)
6223             anObj.SetParameters(Parameters)
6224             self._autoPublish(anObj, theName, "divideEdge")
6225             return anObj
6226
6227         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6228         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6229         #  @param theVertices A list of vertices to suppress. If the list
6230         #                     is empty, all vertices in a wire will be assumed.
6231         #  @param theName Object name; when specified, this parameter is used
6232         #         for result publication in the study. Otherwise, if automatic
6233         #         publication is switched on, default value is used for result name.
6234         #
6235         #  @return New GEOM.GEOM_Object with modified wire.
6236         #
6237         #  @ref tui_fuse_collinear_edges "Example"
6238         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6239             """
6240             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6241
6242             Parameters: 
6243                 theWire Wire to minimize the number of C1 continuous edges in.
6244                 theVertices A list of vertices to suppress. If the list
6245                             is empty, all vertices in a wire will be assumed.
6246                 theName Object name; when specified, this parameter is used
6247                         for result publication in the study. Otherwise, if automatic
6248                         publication is switched on, default value is used for result name.
6249
6250             Returns:  
6251                 New GEOM.GEOM_Object with modified wire.
6252             """
6253             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6254             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6255             self._autoPublish(anObj, theName, "fuseEdges")
6256             return anObj
6257
6258         ## Change orientation of the given object. Updates given shape.
6259         #  @param theObject Shape to be processed.
6260         #  @return Updated <var>theObject</var>
6261         #
6262         #  @ref swig_todo "Example"
6263         def ChangeOrientationShell(self,theObject):
6264             """
6265             Change orientation of the given object. Updates given shape.
6266
6267             Parameters: 
6268                 theObject Shape to be processed.
6269
6270             Returns:  
6271                 Updated theObject
6272             """
6273             theObject = self.HealOp.ChangeOrientation(theObject)
6274             RaiseIfFailed("ChangeOrientation", self.HealOp)
6275             pass
6276
6277         ## Change orientation of the given object.
6278         #  @param theObject Shape to be processed.
6279         #  @param theName Object name; when specified, this parameter is used
6280         #         for result publication in the study. Otherwise, if automatic
6281         #         publication is switched on, default value is used for result name.
6282         #
6283         #  @return New GEOM.GEOM_Object, containing processed shape.
6284         #
6285         #  @ref swig_todo "Example"
6286         def ChangeOrientationShellCopy(self, theObject, theName=None):
6287             """
6288             Change orientation of the given object.
6289
6290             Parameters:
6291                 theObject Shape to be processed.
6292                 theName Object name; when specified, this parameter is used
6293                         for result publication in the study. Otherwise, if automatic
6294                         publication is switched on, default value is used for result name.
6295
6296             Returns:   
6297                 New GEOM.GEOM_Object, containing processed shape.
6298             """
6299             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6300             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6301             self._autoPublish(anObj, theName, "reversed")
6302             return anObj
6303
6304         ## Try to limit tolerance of the given object by value \a theTolerance.
6305         #  @param theObject Shape to be processed.
6306         #  @param theTolerance Required tolerance value.
6307         #  @param theName Object name; when specified, this parameter is used
6308         #         for result publication in the study. Otherwise, if automatic
6309         #         publication is switched on, default value is used for result name.
6310         #
6311         #  @return New GEOM.GEOM_Object, containing processed shape.
6312         #
6313         #  @ref tui_limit_tolerance "Example"
6314         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6315             """
6316             Try to limit tolerance of the given object by value theTolerance.
6317
6318             Parameters:
6319                 theObject Shape to be processed.
6320                 theTolerance Required tolerance value.
6321                 theName Object name; when specified, this parameter is used
6322                         for result publication in the study. Otherwise, if automatic
6323                         publication is switched on, default value is used for result name.
6324
6325             Returns:   
6326                 New GEOM.GEOM_Object, containing processed shape.
6327             """
6328             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6329             RaiseIfFailed("LimitTolerance", self.HealOp)
6330             self._autoPublish(anObj, theName, "limitTolerance")
6331             return anObj
6332
6333         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6334         #  that constitute a free boundary of the given shape.
6335         #  @param theObject Shape to get free boundary of.
6336         #  @param theName Object name; when specified, this parameter is used
6337         #         for result publication in the study. Otherwise, if automatic
6338         #         publication is switched on, default value is used for result name.
6339         #
6340         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6341         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6342         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6343         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6344         #
6345         #  @ref tui_measurement_tools_page "Example"
6346         def GetFreeBoundary(self, theObject, theName=None):
6347             """
6348             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6349             that constitute a free boundary of the given shape.
6350
6351             Parameters:
6352                 theObject Shape to get free boundary of.
6353                 theName Object name; when specified, this parameter is used
6354                         for result publication in the study. Otherwise, if automatic
6355                         publication is switched on, default value is used for result name.
6356
6357             Returns: 
6358                 [status, theClosedWires, theOpenWires]
6359                  status: FALSE, if an error(s) occured during the method execution.
6360                  theClosedWires: Closed wires on the free boundary of the given shape.
6361                  theOpenWires: Open wires on the free boundary of the given shape.
6362             """
6363             # Example: see GEOM_TestHealing.py
6364             anObj = self.HealOp.GetFreeBoundary(theObject)
6365             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6366             self._autoPublish(anObj[1], theName, "closedWire")
6367             self._autoPublish(anObj[2], theName, "openWire")
6368             return anObj
6369
6370         ## Replace coincident faces in theShape by one face.
6371         #  @param theShape Initial shape.
6372         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6373         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6374         #                         otherwise all initial shapes.
6375         #  @param theName Object name; when specified, this parameter is used
6376         #         for result publication in the study. Otherwise, if automatic
6377         #         publication is switched on, default value is used for result name.
6378         #
6379         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6380         #
6381         #  @ref tui_glue_faces "Example"
6382         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6383             """
6384             Replace coincident faces in theShape by one face.
6385
6386             Parameters:
6387                 theShape Initial shape.
6388                 theTolerance Maximum distance between faces, which can be considered as coincident.
6389                 doKeepNonSolids If FALSE, only solids will present in the result,
6390                                 otherwise all initial shapes.
6391                 theName Object name; when specified, this parameter is used
6392                         for result publication in the study. Otherwise, if automatic
6393                         publication is switched on, default value is used for result name.
6394
6395             Returns:
6396                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6397             """
6398             # Example: see GEOM_Spanner.py
6399             theTolerance,Parameters = ParseParameters(theTolerance)
6400             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6401             if anObj is None:
6402                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6403             anObj.SetParameters(Parameters)
6404             self._autoPublish(anObj, theName, "glueFaces")
6405             return anObj
6406
6407         ## Find coincident faces in theShape for possible gluing.
6408         #  @param theShape Initial shape.
6409         #  @param theTolerance Maximum distance between faces,
6410         #                      which can be considered as coincident.
6411         #  @param theName Object name; when specified, this parameter is used
6412         #         for result publication in the study. Otherwise, if automatic
6413         #         publication is switched on, default value is used for result name.
6414         #
6415         #  @return GEOM.ListOfGO
6416         #
6417         #  @ref tui_glue_faces "Example"
6418         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6419             """
6420             Find coincident faces in theShape for possible gluing.
6421
6422             Parameters:
6423                 theShape Initial shape.
6424                 theTolerance Maximum distance between faces,
6425                              which can be considered as coincident.
6426                 theName Object name; when specified, this parameter is used
6427                         for result publication in the study. Otherwise, if automatic
6428                         publication is switched on, default value is used for result name.
6429
6430             Returns:                    
6431                 GEOM.ListOfGO
6432             """
6433             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6434             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6435             self._autoPublish(anObj, theName, "facesToGlue")
6436             return anObj
6437
6438         ## Replace coincident faces in theShape by one face
6439         #  in compliance with given list of faces
6440         #  @param theShape Initial shape.
6441         #  @param theTolerance Maximum distance between faces,
6442         #                      which can be considered as coincident.
6443         #  @param theFaces List of faces for gluing.
6444         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6445         #                         otherwise all initial shapes.
6446         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6447         #                        will be glued, otherwise only the edges,
6448         #                        belonging to <VAR>theFaces</VAR>.
6449         #  @param 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         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6454         #          without some faces.
6455         #
6456         #  @ref tui_glue_faces "Example"
6457         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6458                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6459             """
6460             Replace coincident faces in theShape by one face
6461             in compliance with given list of faces
6462
6463             Parameters:
6464                 theShape Initial shape.
6465                 theTolerance Maximum distance between faces,
6466                              which can be considered as coincident.
6467                 theFaces List of faces for gluing.
6468                 doKeepNonSolids If FALSE, only solids will present in the result,
6469                                 otherwise all initial shapes.
6470                 doGlueAllEdges If TRUE, all coincident edges of theShape
6471                                will be glued, otherwise only the edges,
6472                                belonging to theFaces.
6473                 theName Object name; when specified, this parameter is used
6474                         for result publication in the study. Otherwise, if automatic
6475                         publication is switched on, default value is used for result name.
6476
6477             Returns:
6478                 New GEOM.GEOM_Object, containing a copy of theShape
6479                     without some faces.
6480             """
6481             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6482                                                       doKeepNonSolids, doGlueAllEdges)
6483             if anObj is None:
6484                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6485             self._autoPublish(anObj, theName, "glueFaces")
6486             return anObj
6487
6488         ## Replace coincident edges in theShape by one edge.
6489         #  @param theShape Initial shape.
6490         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6491         #  @param theName Object name; when specified, this parameter is used
6492         #         for result publication in the study. Otherwise, if automatic
6493         #         publication is switched on, default value is used for result name.
6494         #
6495         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6496         #
6497         #  @ref tui_glue_edges "Example"
6498         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6499             """
6500             Replace coincident edges in theShape by one edge.
6501
6502             Parameters:
6503                 theShape Initial shape.
6504                 theTolerance Maximum distance between edges, which can be considered as coincident.
6505                 theName Object name; when specified, this parameter is used
6506                         for result publication in the study. Otherwise, if automatic
6507                         publication is switched on, default value is used for result name.
6508
6509             Returns:    
6510                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6511             """
6512             theTolerance,Parameters = ParseParameters(theTolerance)
6513             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6514             if anObj is None:
6515                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6516             anObj.SetParameters(Parameters)
6517             self._autoPublish(anObj, theName, "glueEdges")
6518             return anObj
6519
6520         ## Find coincident edges in theShape for possible gluing.
6521         #  @param theShape Initial shape.
6522         #  @param theTolerance Maximum distance between edges,
6523         #                      which can be considered as coincident.
6524         #  @param theName Object name; when specified, this parameter is used
6525         #         for result publication in the study. Otherwise, if automatic
6526         #         publication is switched on, default value is used for result name.
6527         #
6528         #  @return GEOM.ListOfGO
6529         #
6530         #  @ref tui_glue_edges "Example"
6531         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6532             """
6533             Find coincident edges in theShape for possible gluing.
6534
6535             Parameters:
6536                 theShape Initial shape.
6537                 theTolerance Maximum distance between edges,
6538                              which can be considered as coincident.
6539                 theName Object name; when specified, this parameter is used
6540                         for result publication in the study. Otherwise, if automatic
6541                         publication is switched on, default value is used for result name.
6542
6543             Returns:                         
6544                 GEOM.ListOfGO
6545             """
6546             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6547             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6548             self._autoPublish(anObj, theName, "edgesToGlue")
6549             return anObj
6550
6551         ## Replace coincident edges in theShape by one edge
6552         #  in compliance with given list of edges.
6553         #  @param theShape Initial shape.
6554         #  @param theTolerance Maximum distance between edges,
6555         #                      which can be considered as coincident.
6556         #  @param theEdges List of edges for gluing.
6557         #  @param theName Object name; when specified, this parameter is used
6558         #         for result publication in the study. Otherwise, if automatic
6559         #         publication is switched on, default value is used for result name.
6560         #
6561         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6562         #          without some edges.
6563         #
6564         #  @ref tui_glue_edges "Example"
6565         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6566             """
6567             Replace coincident edges in theShape by one edge
6568             in compliance with given list of edges.
6569
6570             Parameters:
6571                 theShape Initial shape.
6572                 theTolerance Maximum distance between edges,
6573                              which can be considered as coincident.
6574                 theEdges List of edges for gluing.
6575                 theName Object name; when specified, this parameter is used
6576                         for result publication in the study. Otherwise, if automatic
6577                         publication is switched on, default value is used for result name.
6578
6579             Returns:  
6580                 New GEOM.GEOM_Object, containing a copy of theShape
6581                 without some edges.
6582             """
6583             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6584             if anObj is None:
6585                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6586             self._autoPublish(anObj, theName, "glueEdges")
6587             return anObj
6588
6589         # end of l3_healing
6590         ## @}
6591
6592         ## @addtogroup l3_boolean Boolean Operations
6593         ## @{
6594
6595         # -----------------------------------------------------------------------------
6596         # Boolean (Common, Cut, Fuse, Section)
6597         # -----------------------------------------------------------------------------
6598
6599         ## Perform one of boolean operations on two given shapes.
6600         #  @param theShape1 First argument for boolean operation.
6601         #  @param theShape2 Second argument for boolean operation.
6602         #  @param theOperation Indicates the operation to be done:\n
6603         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6604         #  @param checkSelfInte The flag that tells if the arguments should
6605         #         be checked for self-intersection prior to the operation.
6606         #  @param theName Object name; when specified, this parameter is used
6607         #         for result publication in the study. Otherwise, if automatic
6608         #         publication is switched on, default value is used for result name.
6609         #
6610         #  @return New GEOM.GEOM_Object, containing the result shape.
6611         #
6612         #  @ref tui_fuse "Example"
6613         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
6614             """
6615             Perform one of boolean operations on two given shapes.
6616
6617             Parameters: 
6618                 theShape1 First argument for boolean operation.
6619                 theShape2 Second argument for boolean operation.
6620                 theOperation Indicates the operation to be done:
6621                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6622                 checkSelfInte The flag that tells if the arguments should
6623                               be checked for self-intersection prior to
6624                               the 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             # Example: see GEOM_TestAll.py
6633             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
6634             RaiseIfFailed("MakeBoolean", self.BoolOp)
6635             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
6636             self._autoPublish(anObj, theName, def_names[theOperation])
6637             return anObj
6638
6639         ## Perform Common boolean operation on two given shapes.
6640         #  @param theShape1 First argument for boolean operation.
6641         #  @param theShape2 Second argument for boolean operation.
6642         #  @param checkSelfInte The flag that tells if the arguments should
6643         #         be checked for self-intersection prior to the operation.
6644         #  @param theName Object name; when specified, this parameter is used
6645         #         for result publication in the study. Otherwise, if automatic
6646         #         publication is switched on, default value is used for result name.
6647         #
6648         #  @return New GEOM.GEOM_Object, containing the result shape.
6649         #
6650         #  @ref tui_common "Example 1"
6651         #  \n @ref swig_MakeCommon "Example 2"
6652         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6653             """
6654             Perform Common boolean operation on two given shapes.
6655
6656             Parameters: 
6657                 theShape1 First argument for boolean operation.
6658                 theShape2 Second argument for boolean operation.
6659                 checkSelfInte The flag that tells if the arguments should
6660                               be checked for self-intersection prior to
6661                               the operation.
6662                 theName Object name; when specified, this parameter is used
6663                         for result publication in the study. Otherwise, if automatic
6664                         publication is switched on, default value is used for result name.
6665
6666             Returns:   
6667                 New GEOM.GEOM_Object, containing the result shape.
6668             """
6669             # Example: see GEOM_TestOthers.py
6670             # note: auto-publishing is done in self.MakeBoolean()
6671             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
6672
6673         ## Perform Cut boolean operation on two given shapes.
6674         #  @param theShape1 First argument for boolean operation.
6675         #  @param theShape2 Second argument for boolean operation.
6676         #  @param checkSelfInte The flag that tells if the arguments should
6677         #         be checked for self-intersection prior to the operation.
6678         #  @param theName Object name; when specified, this parameter is used
6679         #         for result publication in the study. Otherwise, if automatic
6680         #         publication is switched on, default value is used for result name.
6681         #
6682         #  @return New GEOM.GEOM_Object, containing the result shape.
6683         #
6684         #  @ref tui_cut "Example 1"
6685         #  \n @ref swig_MakeCommon "Example 2"
6686         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6687             """
6688             Perform Cut boolean operation on two given shapes.
6689
6690             Parameters: 
6691                 theShape1 First argument for boolean operation.
6692                 theShape2 Second argument for boolean operation.
6693                 checkSelfInte The flag that tells if the arguments should
6694                               be checked for self-intersection prior to
6695                               the operation.
6696                 theName Object name; when specified, this parameter is used
6697                         for result publication in the study. Otherwise, if automatic
6698                         publication is switched on, default value is used for result name.
6699
6700             Returns:   
6701                 New GEOM.GEOM_Object, containing the result shape.
6702             
6703             """
6704             # Example: see GEOM_TestOthers.py
6705             # note: auto-publishing is done in self.MakeBoolean()
6706             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
6707
6708         ## Perform Fuse boolean operation on two given shapes.
6709         #  @param theShape1 First argument for boolean operation.
6710         #  @param theShape2 Second argument for boolean operation.
6711         #  @param checkSelfInte The flag that tells if the arguments should
6712         #         be checked for self-intersection prior to the operation.
6713         #  @param 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         #  @return New GEOM.GEOM_Object, containing the result shape.
6718         #
6719         #  @ref tui_fuse "Example 1"
6720         #  \n @ref swig_MakeCommon "Example 2"
6721         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6722             """
6723             Perform Fuse boolean operation on two given shapes.
6724
6725             Parameters: 
6726                 theShape1 First argument for boolean operation.
6727                 theShape2 Second argument for boolean operation.
6728                 checkSelfInte The flag that tells if the arguments should
6729                               be checked for self-intersection prior to
6730                               the operation.
6731                 theName Object name; when specified, this parameter is used
6732                         for result publication in the study. Otherwise, if automatic
6733                         publication is switched on, default value is used for result name.
6734
6735             Returns:   
6736                 New GEOM.GEOM_Object, containing the result shape.
6737             
6738             """
6739             # Example: see GEOM_TestOthers.py
6740             # note: auto-publishing is done in self.MakeBoolean()
6741             return self.MakeBoolean(theShape1, theShape2, 3, checkSelfInte, theName)
6742
6743         ## Perform Section boolean operation on two given shapes.
6744         #  @param theShape1 First argument for boolean operation.
6745         #  @param theShape2 Second argument for boolean operation.
6746         #  @param checkSelfInte The flag that tells if the arguments should
6747         #         be checked for self-intersection prior to the operation.
6748         #  @param theName Object name; when specified, this parameter is used
6749         #         for result publication in the study. Otherwise, if automatic
6750         #         publication is switched on, default value is used for result name.
6751         #
6752         #  @return New GEOM.GEOM_Object, containing the result shape.
6753         #
6754         #  @ref tui_section "Example 1"
6755         #  \n @ref swig_MakeCommon "Example 2"
6756         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6757             """
6758             Perform Section boolean operation on two given shapes.
6759
6760             Parameters: 
6761                 theShape1 First argument for boolean operation.
6762                 theShape2 Second argument for boolean operation.
6763                 checkSelfInte The flag that tells if the arguments should
6764                               be checked for self-intersection prior to
6765                               the operation.
6766                 theName Object name; when specified, this parameter is used
6767                         for result publication in the study. Otherwise, if automatic
6768                         publication is switched on, default value is used for result name.
6769
6770             Returns:   
6771                 New GEOM.GEOM_Object, containing the result shape.
6772             
6773             """
6774             # Example: see GEOM_TestOthers.py
6775             # note: auto-publishing is done in self.MakeBoolean()
6776             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
6777
6778         ## Perform Fuse boolean operation on the list of shapes.
6779         #  @param theShapesList Shapes to be fused.
6780         #  @param checkSelfInte The flag that tells if the arguments should
6781         #         be checked for self-intersection prior to the operation.
6782         #  @param theName Object name; when specified, this parameter is used
6783         #         for result publication in the study. Otherwise, if automatic
6784         #         publication is switched on, default value is used for result name.
6785         #
6786         #  @return New GEOM.GEOM_Object, containing the result shape.
6787         #
6788         #  @ref tui_fuse "Example 1"
6789         #  \n @ref swig_MakeCommon "Example 2"
6790         def MakeFuseList(self, theShapesList, checkSelfInte=False, theName=None):
6791             """
6792             Perform Fuse boolean operation on the list of shapes.
6793
6794             Parameters: 
6795                 theShapesList Shapes to be fused.
6796                 checkSelfInte The flag that tells if the arguments should
6797                               be checked for self-intersection prior to
6798                               the operation.
6799                 theName Object name; when specified, this parameter is used
6800                         for result publication in the study. Otherwise, if automatic
6801                         publication is switched on, default value is used for result name.
6802
6803             Returns:   
6804                 New GEOM.GEOM_Object, containing the result shape.
6805             
6806             """
6807             # Example: see GEOM_TestOthers.py
6808             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte)
6809             RaiseIfFailed("MakeFuseList", self.BoolOp)
6810             self._autoPublish(anObj, theName, "fuse")
6811             return anObj
6812
6813         ## Perform Common boolean operation on the list of shapes.
6814         #  @param theShapesList Shapes for Common operation.
6815         #  @param checkSelfInte The flag that tells if the arguments should
6816         #         be checked for self-intersection prior to the operation.
6817         #  @param theName Object name; when specified, this parameter is used
6818         #         for result publication in the study. Otherwise, if automatic
6819         #         publication is switched on, default value is used for result name.
6820         #
6821         #  @return New GEOM.GEOM_Object, containing the result shape.
6822         #
6823         #  @ref tui_common "Example 1"
6824         #  \n @ref swig_MakeCommon "Example 2"
6825         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
6826             """
6827             Perform Common boolean operation on the list of shapes.
6828
6829             Parameters: 
6830                 theShapesList Shapes for Common operation.
6831                 checkSelfInte The flag that tells if the arguments should
6832                               be checked for self-intersection prior to
6833                               the operation.
6834                 theName Object name; when specified, this parameter is used
6835                         for result publication in the study. Otherwise, if automatic
6836                         publication is switched on, default value is used for result name.
6837
6838             Returns:   
6839                 New GEOM.GEOM_Object, containing the result shape.
6840             
6841             """
6842             # Example: see GEOM_TestOthers.py
6843             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
6844             RaiseIfFailed("MakeCommonList", self.BoolOp)
6845             self._autoPublish(anObj, theName, "common")
6846             return anObj
6847
6848         ## Perform Cut boolean operation on one object and the list of tools.
6849         #  @param theMainShape The object of the operation.
6850         #  @param theShapesList The list of tools of the operation.
6851         #  @param checkSelfInte The flag that tells if the arguments should
6852         #         be checked for self-intersection prior to the operation.
6853         #  @param theName Object name; when specified, this parameter is used
6854         #         for result publication in the study. Otherwise, if automatic
6855         #         publication is switched on, default value is used for result name.
6856         #
6857         #  @return New GEOM.GEOM_Object, containing the result shape.
6858         #
6859         #  @ref tui_cut "Example 1"
6860         #  \n @ref swig_MakeCommon "Example 2"
6861         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
6862             """
6863             Perform Cut boolean operation on one object and the list of tools.
6864
6865             Parameters: 
6866                 theMainShape The object of the operation.
6867                 theShapesList The list of tools of the operation.
6868                 checkSelfInte The flag that tells if the arguments should
6869                               be checked for self-intersection prior to
6870                               the operation.
6871                 theName Object name; when specified, this parameter is used
6872                         for result publication in the study. Otherwise, if automatic
6873                         publication is switched on, default value is used for result name.
6874
6875             Returns:   
6876                 New GEOM.GEOM_Object, containing the result shape.
6877             
6878             """
6879             # Example: see GEOM_TestOthers.py
6880             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
6881             RaiseIfFailed("MakeCutList", self.BoolOp)
6882             self._autoPublish(anObj, theName, "cut")
6883             return anObj
6884
6885         # end of l3_boolean
6886         ## @}
6887
6888         ## @addtogroup l3_basic_op
6889         ## @{
6890
6891         ## Perform partition operation.
6892         #  @param ListShapes Shapes to be intersected.
6893         #  @param ListTools Shapes to intersect theShapes.
6894         #  @param Limit Type of resulting shapes (see ShapeType()).\n
6895         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
6896         #         type will be detected automatically.
6897         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
6898         #                             target type (equal to Limit) are kept in the result,
6899         #                             else standalone shapes of lower dimension
6900         #                             are kept also (if they exist).
6901         #  @param theName Object name; when specified, this parameter is used
6902         #         for result publication in the study. Otherwise, if automatic
6903         #         publication is switched on, default value is used for result name.
6904         #
6905         #  @note Each compound from ListShapes and ListTools will be exploded
6906         #        in order to avoid possible intersection between shapes from this compound.
6907         #
6908         #  After implementation new version of PartitionAlgo (October 2006)
6909         #  other parameters are ignored by current functionality. They are kept
6910         #  in this function only for support old versions.
6911         #      @param ListKeepInside Shapes, outside which the results will be deleted.
6912         #         Each shape from theKeepInside must belong to theShapes also.
6913         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
6914         #         Each shape from theRemoveInside must belong to theShapes also.
6915         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
6916         #      @param ListMaterials Material indices for each shape. Make sence,
6917         #         only if theRemoveWebs is TRUE.
6918         #
6919         #  @return New GEOM.GEOM_Object, containing the result shapes.
6920         #
6921         #  @ref tui_partition "Example"
6922         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6923                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6924                           KeepNonlimitShapes=0, theName=None):
6925             """
6926             Perform partition operation.
6927
6928             Parameters: 
6929                 ListShapes Shapes to be intersected.
6930                 ListTools Shapes to intersect theShapes.
6931                 Limit Type of resulting shapes (see geompy.ShapeType)
6932                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
6933                       type will be detected automatically.
6934                 KeepNonlimitShapes if this parameter == 0, then only shapes of
6935                                     target type (equal to Limit) are kept in the result,
6936                                     else standalone shapes of lower dimension
6937                                     are kept also (if they exist).
6938                 theName Object name; when specified, this parameter is used
6939                         for result publication in the study. Otherwise, if automatic
6940                         publication is switched on, default value is used for result name.
6941             Note:
6942                     Each compound from ListShapes and ListTools will be exploded
6943                     in order to avoid possible intersection between shapes from
6944                     this compound.
6945                     
6946             After implementation new version of PartitionAlgo (October 2006) other
6947             parameters are ignored by current functionality. They are kept in this
6948             function only for support old versions.
6949             
6950             Ignored parameters:
6951                 ListKeepInside Shapes, outside which the results will be deleted.
6952                                Each shape from theKeepInside must belong to theShapes also.
6953                 ListRemoveInside Shapes, inside which the results will be deleted.
6954                                  Each shape from theRemoveInside must belong to theShapes also.
6955                 RemoveWebs If TRUE, perform Glue 3D algorithm.
6956                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
6957
6958             Returns:   
6959                 New GEOM.GEOM_Object, containing the result shapes.
6960             """
6961             # Example: see GEOM_TestAll.py
6962             if Limit == self.ShapeType["AUTO"]:
6963                 # automatic detection of the most appropriate shape limit type
6964                 lim = GEOM.SHAPE
6965                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6966                 Limit = EnumToLong(lim)
6967                 pass
6968             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
6969                                               ListKeepInside, ListRemoveInside,
6970                                               Limit, RemoveWebs, ListMaterials,
6971                                               KeepNonlimitShapes);
6972             RaiseIfFailed("MakePartition", self.BoolOp)
6973             self._autoPublish(anObj, theName, "partition")
6974             return anObj
6975
6976         ## Perform partition operation.
6977         #  This method may be useful if it is needed to make a partition for
6978         #  compound contains nonintersected shapes. Performance will be better
6979         #  since intersection between shapes from compound is not performed.
6980         #
6981         #  Description of all parameters as in previous method MakePartition()
6982         #
6983         #  @note Passed compounds (via ListShapes or via ListTools)
6984         #           have to consist of nonintersecting shapes.
6985         #
6986         #  @return New GEOM.GEOM_Object, containing the result shapes.
6987         #
6988         #  @ref swig_todo "Example"
6989         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
6990                                                  ListKeepInside=[], ListRemoveInside=[],
6991                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
6992                                                  ListMaterials=[], KeepNonlimitShapes=0,
6993                                                  theName=None):
6994             """
6995             Perform partition operation.
6996             This method may be useful if it is needed to make a partition for
6997             compound contains nonintersected shapes. Performance will be better
6998             since intersection between shapes from compound is not performed.
6999
7000             Parameters: 
7001                 Description of all parameters as in method geompy.MakePartition
7002         
7003             NOTE:
7004                 Passed compounds (via ListShapes or via ListTools)
7005                 have to consist of nonintersecting shapes.
7006
7007             Returns:   
7008                 New GEOM.GEOM_Object, containing the result shapes.
7009             """
7010             if Limit == self.ShapeType["AUTO"]:
7011                 # automatic detection of the most appropriate shape limit type
7012                 lim = GEOM.SHAPE
7013                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7014                 Limit = EnumToLong(lim)
7015                 pass
7016             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
7017                                                                      ListKeepInside, ListRemoveInside,
7018                                                                      Limit, RemoveWebs, ListMaterials,
7019                                                                      KeepNonlimitShapes);
7020             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
7021             self._autoPublish(anObj, theName, "partition")
7022             return anObj
7023
7024         ## See method MakePartition() for more information.
7025         #
7026         #  @ref tui_partition "Example 1"
7027         #  \n @ref swig_Partition "Example 2"
7028         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7029                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7030                       KeepNonlimitShapes=0, theName=None):
7031             """
7032             See method geompy.MakePartition for more information.
7033             """
7034             # Example: see GEOM_TestOthers.py
7035             # note: auto-publishing is done in self.MakePartition()
7036             anObj = self.MakePartition(ListShapes, ListTools,
7037                                        ListKeepInside, ListRemoveInside,
7038                                        Limit, RemoveWebs, ListMaterials,
7039                                        KeepNonlimitShapes, theName);
7040             return anObj
7041
7042         ## Perform partition of the Shape with the Plane
7043         #  @param theShape Shape to be intersected.
7044         #  @param thePlane Tool shape, to intersect theShape.
7045         #  @param theName Object name; when specified, this parameter is used
7046         #         for result publication in the study. Otherwise, if automatic
7047         #         publication is switched on, default value is used for result name.
7048         #
7049         #  @return New GEOM.GEOM_Object, containing the result shape.
7050         #
7051         #  @ref tui_partition "Example"
7052         def MakeHalfPartition(self, theShape, thePlane, theName=None):
7053             """
7054             Perform partition of the Shape with the Plane
7055
7056             Parameters: 
7057                 theShape Shape to be intersected.
7058                 thePlane Tool shape, to intersect theShape.
7059                 theName Object name; when specified, this parameter is used
7060                         for result publication in the study. Otherwise, if automatic
7061                         publication is switched on, default value is used for result name.
7062
7063             Returns:  
7064                 New GEOM.GEOM_Object, containing the result shape.
7065             """
7066             # Example: see GEOM_TestAll.py
7067             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
7068             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7069             self._autoPublish(anObj, theName, "partition")
7070             return anObj
7071
7072         # end of l3_basic_op
7073         ## @}
7074
7075         ## @addtogroup l3_transform
7076         ## @{
7077
7078         ## Translate the given object along the vector, specified
7079         #  by its end points.
7080         #  @param theObject The object to be translated.
7081         #  @param thePoint1 Start point of translation vector.
7082         #  @param thePoint2 End point of translation vector.
7083         #  @param theCopy Flag used to translate object itself or create a copy.
7084         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7085         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7086         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7087             """
7088             Translate the given object along the vector, specified by its end points.
7089
7090             Parameters: 
7091                 theObject The object to be translated.
7092                 thePoint1 Start point of translation vector.
7093                 thePoint2 End point of translation vector.
7094                 theCopy Flag used to translate object itself or create a copy.
7095
7096             Returns: 
7097                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7098                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7099             """
7100             if theCopy:
7101                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7102             else:
7103                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7104             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7105             return anObj
7106
7107         ## Translate the given object along the vector, specified
7108         #  by its end points, creating its copy before the translation.
7109         #  @param theObject The object to be translated.
7110         #  @param thePoint1 Start point of translation vector.
7111         #  @param thePoint2 End point of translation vector.
7112         #  @param theName Object name; when specified, this parameter is used
7113         #         for result publication in the study. Otherwise, if automatic
7114         #         publication is switched on, default value is used for result name.
7115         #
7116         #  @return New GEOM.GEOM_Object, containing the translated object.
7117         #
7118         #  @ref tui_translation "Example 1"
7119         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7120         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7121             """
7122             Translate the given object along the vector, specified
7123             by its end points, creating its copy before the translation.
7124
7125             Parameters: 
7126                 theObject The object to be translated.
7127                 thePoint1 Start point of translation vector.
7128                 thePoint2 End point of translation vector.
7129                 theName Object name; when specified, this parameter is used
7130                         for result publication in the study. Otherwise, if automatic
7131                         publication is switched on, default value is used for result name.
7132
7133             Returns:  
7134                 New GEOM.GEOM_Object, containing the translated object.
7135             """
7136             # Example: see GEOM_TestAll.py
7137             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7138             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7139             self._autoPublish(anObj, theName, "translated")
7140             return anObj
7141
7142         ## Translate the given object along the vector, specified by its components.
7143         #  @param theObject The object to be translated.
7144         #  @param theDX,theDY,theDZ Components of translation vector.
7145         #  @param theCopy Flag used to translate object itself or create a copy.
7146         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7147         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7148         #
7149         #  @ref tui_translation "Example"
7150         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7151             """
7152             Translate the given object along the vector, specified by its components.
7153
7154             Parameters: 
7155                 theObject The object to be translated.
7156                 theDX,theDY,theDZ Components of translation vector.
7157                 theCopy Flag used to translate object itself or create a copy.
7158
7159             Returns: 
7160                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7161                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7162             """
7163             # Example: see GEOM_TestAll.py
7164             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7165             if theCopy:
7166                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7167             else:
7168                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7169             anObj.SetParameters(Parameters)
7170             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7171             return anObj
7172
7173         ## Translate the given object along the vector, specified
7174         #  by its components, creating its copy before the translation.
7175         #  @param theObject The object to be translated.
7176         #  @param theDX,theDY,theDZ Components of translation vector.
7177         #  @param theName Object name; when specified, this parameter is used
7178         #         for result publication in the study. Otherwise, if automatic
7179         #         publication is switched on, default value is used for result name.
7180         #
7181         #  @return New GEOM.GEOM_Object, containing the translated object.
7182         #
7183         #  @ref tui_translation "Example"
7184         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7185             """
7186             Translate the given object along the vector, specified
7187             by its components, creating its copy before the translation.
7188
7189             Parameters: 
7190                 theObject The object to be translated.
7191                 theDX,theDY,theDZ Components of translation vector.
7192                 theName Object name; when specified, this parameter is used
7193                         for result publication in the study. Otherwise, if automatic
7194                         publication is switched on, default value is used for result name.
7195
7196             Returns: 
7197                 New GEOM.GEOM_Object, containing the translated object.
7198             """
7199             # Example: see GEOM_TestAll.py
7200             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7201             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7202             anObj.SetParameters(Parameters)
7203             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7204             self._autoPublish(anObj, theName, "translated")
7205             return anObj
7206
7207         ## Translate the given object along the given vector.
7208         #  @param theObject The object to be translated.
7209         #  @param theVector The translation vector.
7210         #  @param theCopy Flag used to translate object itself or create a copy.
7211         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7212         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7213         def TranslateVector(self, theObject, theVector, theCopy=False):
7214             """
7215             Translate the given object along the given vector.
7216
7217             Parameters: 
7218                 theObject The object to be translated.
7219                 theVector The translation vector.
7220                 theCopy Flag used to translate object itself or create a copy.
7221
7222             Returns: 
7223                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7224                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7225             """
7226             if theCopy:
7227                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7228             else:
7229                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7230             RaiseIfFailed("TranslateVector", self.TrsfOp)
7231             return anObj
7232
7233         ## Translate the given object along the given vector,
7234         #  creating its copy before the translation.
7235         #  @param theObject The object to be translated.
7236         #  @param theVector The translation vector.
7237         #  @param theName Object name; when specified, this parameter is used
7238         #         for result publication in the study. Otherwise, if automatic
7239         #         publication is switched on, default value is used for result name.
7240         #
7241         #  @return New GEOM.GEOM_Object, containing the translated object.
7242         #
7243         #  @ref tui_translation "Example"
7244         def MakeTranslationVector(self, theObject, theVector, theName=None):
7245             """
7246             Translate the given object along the given vector,
7247             creating its copy before the translation.
7248
7249             Parameters: 
7250                 theObject The object to be translated.
7251                 theVector The translation vector.
7252                 theName Object name; when specified, this parameter is used
7253                         for result publication in the study. Otherwise, if automatic
7254                         publication is switched on, default value is used for result name.
7255
7256             Returns: 
7257                 New GEOM.GEOM_Object, containing the translated object.
7258             """
7259             # Example: see GEOM_TestAll.py
7260             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7261             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7262             self._autoPublish(anObj, theName, "translated")
7263             return anObj
7264
7265         ## Translate the given object along the given vector on given distance.
7266         #  @param theObject The object to be translated.
7267         #  @param theVector The translation vector.
7268         #  @param theDistance The translation distance.
7269         #  @param theCopy Flag used to translate object itself or create a copy.
7270         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7271         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7272         #
7273         #  @ref tui_translation "Example"
7274         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7275             """
7276             Translate the given object along the given vector on given distance.
7277
7278             Parameters: 
7279                 theObject The object to be translated.
7280                 theVector The translation vector.
7281                 theDistance The translation distance.
7282                 theCopy Flag used to translate object itself or create a copy.
7283
7284             Returns: 
7285                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7286                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7287             """
7288             # Example: see GEOM_TestAll.py
7289             theDistance,Parameters = ParseParameters(theDistance)
7290             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7291             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7292             anObj.SetParameters(Parameters)
7293             return anObj
7294
7295         ## Translate the given object along the given vector on given distance,
7296         #  creating its copy before the translation.
7297         #  @param theObject The object to be translated.
7298         #  @param theVector The translation vector.
7299         #  @param theDistance The translation distance.
7300         #  @param theName Object name; when specified, this parameter is used
7301         #         for result publication in the study. Otherwise, if automatic
7302         #         publication is switched on, default value is used for result name.
7303         #
7304         #  @return New GEOM.GEOM_Object, containing the translated object.
7305         #
7306         #  @ref tui_translation "Example"
7307         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7308             """
7309             Translate the given object along the given vector on given distance,
7310             creating its copy before the translation.
7311
7312             Parameters:
7313                 theObject The object to be translated.
7314                 theVector The translation vector.
7315                 theDistance The translation distance.
7316                 theName Object name; when specified, this parameter is used
7317                         for result publication in the study. Otherwise, if automatic
7318                         publication is switched on, default value is used for result name.
7319
7320             Returns: 
7321                 New GEOM.GEOM_Object, containing the translated object.
7322             """
7323             # Example: see GEOM_TestAll.py
7324             theDistance,Parameters = ParseParameters(theDistance)
7325             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7326             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7327             anObj.SetParameters(Parameters)
7328             self._autoPublish(anObj, theName, "translated")
7329             return anObj
7330
7331         ## Rotate the given object around the given axis on the given angle.
7332         #  @param theObject The object to be rotated.
7333         #  @param theAxis Rotation axis.
7334         #  @param theAngle Rotation angle in radians.
7335         #  @param theCopy Flag used to rotate object itself or create a copy.
7336         #
7337         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7338         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7339         #
7340         #  @ref tui_rotation "Example"
7341         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7342             """
7343             Rotate the given object around the given axis on the given angle.
7344
7345             Parameters:
7346                 theObject The object to be rotated.
7347                 theAxis Rotation axis.
7348                 theAngle Rotation angle in radians.
7349                 theCopy Flag used to rotate object itself or create a copy.
7350
7351             Returns:
7352                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7353                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7354             """
7355             # Example: see GEOM_TestAll.py
7356             flag = False
7357             if isinstance(theAngle,str):
7358                 flag = True
7359             theAngle, Parameters = ParseParameters(theAngle)
7360             if flag:
7361                 theAngle = theAngle*math.pi/180.0
7362             if theCopy:
7363                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7364             else:
7365                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7366             RaiseIfFailed("Rotate", self.TrsfOp)
7367             anObj.SetParameters(Parameters)
7368             return anObj
7369
7370         ## Rotate the given object around the given axis
7371         #  on the given angle, creating its copy before the rotatation.
7372         #  @param theObject The object to be rotated.
7373         #  @param theAxis Rotation axis.
7374         #  @param theAngle Rotation angle in radians.
7375         #  @param theName Object name; when specified, this parameter is used
7376         #         for result publication in the study. Otherwise, if automatic
7377         #         publication is switched on, default value is used for result name.
7378         #
7379         #  @return New GEOM.GEOM_Object, containing the rotated object.
7380         #
7381         #  @ref tui_rotation "Example"
7382         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7383             """
7384             Rotate the given object around the given axis
7385             on the given angle, creating its copy before the rotatation.
7386
7387             Parameters:
7388                 theObject The object to be rotated.
7389                 theAxis Rotation axis.
7390                 theAngle Rotation angle in radians.
7391                 theName Object name; when specified, this parameter is used
7392                         for result publication in the study. Otherwise, if automatic
7393                         publication is switched on, default value is used for result name.
7394
7395             Returns:
7396                 New GEOM.GEOM_Object, containing the rotated object.
7397             """
7398             # Example: see GEOM_TestAll.py
7399             flag = False
7400             if isinstance(theAngle,str):
7401                 flag = True
7402             theAngle, Parameters = ParseParameters(theAngle)
7403             if flag:
7404                 theAngle = theAngle*math.pi/180.0
7405             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7406             RaiseIfFailed("RotateCopy", self.TrsfOp)
7407             anObj.SetParameters(Parameters)
7408             self._autoPublish(anObj, theName, "rotated")
7409             return anObj
7410
7411         ## Rotate given object around vector perpendicular to plane
7412         #  containing three points.
7413         #  @param theObject The object to be rotated.
7414         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7415         #  containing the three points.
7416         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7417         #  @param theCopy Flag used to rotate object itself or create a copy.
7418         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7419         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7420         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7421             """
7422             Rotate given object around vector perpendicular to plane
7423             containing three points.
7424
7425             Parameters:
7426                 theObject The object to be rotated.
7427                 theCentPoint central point  the axis is the vector perpendicular to the plane
7428                              containing the three points.
7429                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7430                 theCopy Flag used to rotate object itself or create a copy.
7431
7432             Returns:
7433                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7434                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7435             """
7436             if theCopy:
7437                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7438             else:
7439                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7440             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7441             return anObj
7442
7443         ## Rotate given object around vector perpendicular to plane
7444         #  containing three points, creating its copy before the rotatation.
7445         #  @param theObject The object to be rotated.
7446         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7447         #  containing the three points.
7448         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7449         #  @param theName Object name; when specified, this parameter is used
7450         #         for result publication in the study. Otherwise, if automatic
7451         #         publication is switched on, default value is used for result name.
7452         #
7453         #  @return New GEOM.GEOM_Object, containing the rotated object.
7454         #
7455         #  @ref tui_rotation "Example"
7456         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
7457             """
7458             Rotate given object around vector perpendicular to plane
7459             containing three points, creating its copy before the rotatation.
7460
7461             Parameters:
7462                 theObject The object to be rotated.
7463                 theCentPoint central point  the axis is the vector perpendicular to the plane
7464                              containing the three points.
7465                 thePoint1,thePoint2  in a perpendicular plane of the axis.
7466                 theName Object name; when specified, this parameter is used
7467                         for result publication in the study. Otherwise, if automatic
7468                         publication is switched on, default value is used for result name.
7469
7470             Returns:
7471                 New GEOM.GEOM_Object, containing the rotated object.
7472             """
7473             # Example: see GEOM_TestAll.py
7474             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7475             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
7476             self._autoPublish(anObj, theName, "rotated")
7477             return anObj
7478
7479         ## Scale the given object by the specified factor.
7480         #  @param theObject The object to be scaled.
7481         #  @param thePoint Center point for scaling.
7482         #                  Passing None for it means scaling relatively the origin of global CS.
7483         #  @param theFactor Scaling factor value.
7484         #  @param theCopy Flag used to scale object itself or create a copy.
7485         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7486         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7487         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
7488             """
7489             Scale the given object by the specified factor.
7490
7491             Parameters:
7492                 theObject The object to be scaled.
7493                 thePoint Center point for scaling.
7494                          Passing None for it means scaling relatively the origin of global CS.
7495                 theFactor Scaling factor value.
7496                 theCopy Flag used to scale object itself or create a copy.
7497
7498             Returns:    
7499                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7500                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7501             """
7502             # Example: see GEOM_TestAll.py
7503             theFactor, Parameters = ParseParameters(theFactor)
7504             if theCopy:
7505                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7506             else:
7507                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
7508             RaiseIfFailed("Scale", self.TrsfOp)
7509             anObj.SetParameters(Parameters)
7510             return anObj
7511
7512         ## Scale the given object by the factor, creating its copy before the scaling.
7513         #  @param theObject The object to be scaled.
7514         #  @param thePoint Center point for scaling.
7515         #                  Passing None for it means scaling relatively the origin of global CS.
7516         #  @param theFactor Scaling factor value.
7517         #  @param theName Object name; when specified, this parameter is used
7518         #         for result publication in the study. Otherwise, if automatic
7519         #         publication is switched on, default value is used for result name.
7520         #
7521         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7522         #
7523         #  @ref tui_scale "Example"
7524         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
7525             """
7526             Scale the given object by the factor, creating its copy before the scaling.
7527
7528             Parameters:
7529                 theObject The object to be scaled.
7530                 thePoint Center point for scaling.
7531                          Passing None for it means scaling relatively the origin of global CS.
7532                 theFactor Scaling factor value.
7533                 theName Object name; when specified, this parameter is used
7534                         for result publication in the study. Otherwise, if automatic
7535                         publication is switched on, default value is used for result name.
7536
7537             Returns:    
7538                 New GEOM.GEOM_Object, containing the scaled shape.
7539             """
7540             # Example: see GEOM_TestAll.py
7541             theFactor, Parameters = ParseParameters(theFactor)
7542             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7543             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
7544             anObj.SetParameters(Parameters)
7545             self._autoPublish(anObj, theName, "scaled")
7546             return anObj
7547
7548         ## Scale the given object by different factors along coordinate axes.
7549         #  @param theObject The object to be scaled.
7550         #  @param thePoint Center point for scaling.
7551         #                  Passing None for it means scaling relatively the origin of global CS.
7552         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7553         #  @param theCopy Flag used to scale object itself or create a copy.
7554         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7555         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7556         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
7557             """
7558             Scale the given object by different factors along coordinate axes.
7559
7560             Parameters:
7561                 theObject The object to be scaled.
7562                 thePoint Center point for scaling.
7563                             Passing None for it means scaling relatively the origin of global CS.
7564                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7565                 theCopy Flag used to scale object itself or create a copy.
7566
7567             Returns:    
7568                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7569                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7570             """
7571             # Example: see GEOM_TestAll.py
7572             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7573             if theCopy:
7574                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7575                                                             theFactorX, theFactorY, theFactorZ)
7576             else:
7577                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
7578                                                         theFactorX, theFactorY, theFactorZ)
7579             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
7580             anObj.SetParameters(Parameters)
7581             return anObj
7582
7583         ## Scale the given object by different factors along coordinate axes,
7584         #  creating its copy before the scaling.
7585         #  @param theObject The object to be scaled.
7586         #  @param thePoint Center point for scaling.
7587         #                  Passing None for it means scaling relatively the origin of global CS.
7588         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7589         #  @param theName Object name; when specified, this parameter is used
7590         #         for result publication in the study. Otherwise, if automatic
7591         #         publication is switched on, default value is used for result name.
7592         #
7593         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7594         #
7595         #  @ref swig_scale "Example"
7596         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
7597             """
7598             Scale the given object by different factors along coordinate axes,
7599             creating its copy before the scaling.
7600
7601             Parameters:
7602                 theObject The object to be scaled.
7603                 thePoint Center point for scaling.
7604                             Passing None for it means scaling relatively the origin of global CS.
7605                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7606                 theName Object name; when specified, this parameter is used
7607                         for result publication in the study. Otherwise, if automatic
7608                         publication is switched on, default value is used for result name.
7609
7610             Returns:
7611                 New GEOM.GEOM_Object, containing the scaled shape.
7612             """
7613             # Example: see GEOM_TestAll.py
7614             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7615             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7616                                                         theFactorX, theFactorY, theFactorZ)
7617             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
7618             anObj.SetParameters(Parameters)
7619             self._autoPublish(anObj, theName, "scaled")
7620             return anObj
7621
7622         ## Mirror an object relatively the given plane.
7623         #  @param theObject The object to be mirrored.
7624         #  @param thePlane Plane of symmetry.
7625         #  @param theCopy Flag used to mirror object itself or create a copy.
7626         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7627         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7628         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
7629             """
7630             Mirror an object relatively the given plane.
7631
7632             Parameters:
7633                 theObject The object to be mirrored.
7634                 thePlane Plane of symmetry.
7635                 theCopy Flag used to mirror object itself or create a copy.
7636
7637             Returns:
7638                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7639                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7640             """
7641             if theCopy:
7642                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7643             else:
7644                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
7645             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
7646             return anObj
7647
7648         ## Create an object, symmetrical
7649         #  to the given one relatively the given plane.
7650         #  @param theObject The object to be mirrored.
7651         #  @param thePlane Plane of symmetry.
7652         #  @param theName Object name; when specified, this parameter is used
7653         #         for result publication in the study. Otherwise, if automatic
7654         #         publication is switched on, default value is used for result name.
7655         #
7656         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7657         #
7658         #  @ref tui_mirror "Example"
7659         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
7660             """
7661             Create an object, symmetrical to the given one relatively the given plane.
7662
7663             Parameters:
7664                 theObject The object to be mirrored.
7665                 thePlane Plane of symmetry.
7666                 theName Object name; when specified, this parameter is used
7667                         for result publication in the study. Otherwise, if automatic
7668                         publication is switched on, default value is used for result name.
7669
7670             Returns:
7671                 New GEOM.GEOM_Object, containing the mirrored shape.
7672             """
7673             # Example: see GEOM_TestAll.py
7674             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7675             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
7676             self._autoPublish(anObj, theName, "mirrored")
7677             return anObj
7678
7679         ## Mirror an object relatively the given axis.
7680         #  @param theObject The object to be mirrored.
7681         #  @param theAxis Axis of symmetry.
7682         #  @param theCopy Flag used to mirror object itself or create a copy.
7683         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7684         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7685         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
7686             """
7687             Mirror an object relatively the given axis.
7688
7689             Parameters:
7690                 theObject The object to be mirrored.
7691                 theAxis Axis of symmetry.
7692                 theCopy Flag used to mirror object itself or create a copy.
7693
7694             Returns:
7695                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7696                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7697             """
7698             if theCopy:
7699                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7700             else:
7701                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
7702             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
7703             return anObj
7704
7705         ## Create an object, symmetrical
7706         #  to the given one relatively the given axis.
7707         #  @param theObject The object to be mirrored.
7708         #  @param theAxis Axis of symmetry.
7709         #  @param theName Object name; when specified, this parameter is used
7710         #         for result publication in the study. Otherwise, if automatic
7711         #         publication is switched on, default value is used for result name.
7712         #
7713         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7714         #
7715         #  @ref tui_mirror "Example"
7716         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
7717             """
7718             Create an object, symmetrical to the given one relatively the given axis.
7719
7720             Parameters:
7721                 theObject The object to be mirrored.
7722                 theAxis Axis of symmetry.
7723                 theName Object name; when specified, this parameter is used
7724                         for result publication in the study. Otherwise, if automatic
7725                         publication is switched on, default value is used for result name.
7726
7727             Returns: 
7728                 New GEOM.GEOM_Object, containing the mirrored shape.
7729             """
7730             # Example: see GEOM_TestAll.py
7731             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7732             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
7733             self._autoPublish(anObj, theName, "mirrored")
7734             return anObj
7735
7736         ## Mirror an object relatively the given point.
7737         #  @param theObject The object to be mirrored.
7738         #  @param thePoint Point of symmetry.
7739         #  @param theCopy Flag used to mirror object itself or create a copy.
7740         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7741         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7742         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
7743             """
7744             Mirror an object relatively the given point.
7745
7746             Parameters:
7747                 theObject The object to be mirrored.
7748                 thePoint Point of symmetry.
7749                 theCopy Flag used to mirror object itself or create a copy.
7750
7751             Returns:
7752                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7753                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7754             """
7755             # Example: see GEOM_TestAll.py
7756             if theCopy:
7757                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7758             else:
7759                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
7760             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
7761             return anObj
7762
7763         ## Create an object, symmetrical
7764         #  to the given one relatively the given point.
7765         #  @param theObject The object to be mirrored.
7766         #  @param thePoint Point of symmetry.
7767         #  @param theName Object name; when specified, this parameter is used
7768         #         for result publication in the study. Otherwise, if automatic
7769         #         publication is switched on, default value is used for result name.
7770         #
7771         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7772         #
7773         #  @ref tui_mirror "Example"
7774         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
7775             """
7776             Create an object, symmetrical
7777             to the given one relatively the given point.
7778
7779             Parameters:
7780                 theObject The object to be mirrored.
7781                 thePoint Point of symmetry.
7782                 theName Object name; when specified, this parameter is used
7783                         for result publication in the study. Otherwise, if automatic
7784                         publication is switched on, default value is used for result name.
7785
7786             Returns:  
7787                 New GEOM.GEOM_Object, containing the mirrored shape.
7788             """
7789             # Example: see GEOM_TestAll.py
7790             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7791             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
7792             self._autoPublish(anObj, theName, "mirrored")
7793             return anObj
7794
7795         ## Modify the location of the given object.
7796         #  @param theObject The object to be displaced.
7797         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7798         #                     If \a theStartLCS is NULL, displacement
7799         #                     will be performed from global CS.\n
7800         #                     If \a theObject itself is used as \a theStartLCS,
7801         #                     its location will be changed to \a theEndLCS.
7802         #  @param theEndLCS Coordinate system to perform displacement to it.
7803         #  @param theCopy Flag used to displace object itself or create a copy.
7804         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7805         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
7806         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
7807             """
7808             Modify the Location of the given object by LCS, creating its copy before the setting.
7809
7810             Parameters:
7811                 theObject The object to be displaced.
7812                 theStartLCS Coordinate system to perform displacement from it.
7813                             If theStartLCS is NULL, displacement
7814                             will be performed from global CS.
7815                             If theObject itself is used as theStartLCS,
7816                             its location will be changed to theEndLCS.
7817                 theEndLCS Coordinate system to perform displacement to it.
7818                 theCopy Flag used to displace object itself or create a copy.
7819
7820             Returns:
7821                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7822                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
7823             """
7824             # Example: see GEOM_TestAll.py
7825             if theCopy:
7826                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7827             else:
7828                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
7829             RaiseIfFailed("Displace", self.TrsfOp)
7830             return anObj
7831
7832         ## Modify the Location of the given object by LCS,
7833         #  creating its copy before the setting.
7834         #  @param theObject The object to be displaced.
7835         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7836         #                     If \a theStartLCS is NULL, displacement
7837         #                     will be performed from global CS.\n
7838         #                     If \a theObject itself is used as \a theStartLCS,
7839         #                     its location will be changed to \a theEndLCS.
7840         #  @param theEndLCS Coordinate system to perform displacement to it.
7841         #  @param theName Object name; when specified, this parameter is used
7842         #         for result publication in the study. Otherwise, if automatic
7843         #         publication is switched on, default value is used for result name.
7844         #
7845         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7846         #
7847         #  @ref tui_modify_location "Example"
7848         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
7849             """
7850             Modify the Location of the given object by LCS, creating its copy before the setting.
7851
7852             Parameters:
7853                 theObject The object to be displaced.
7854                 theStartLCS Coordinate system to perform displacement from it.
7855                             If theStartLCS is NULL, displacement
7856                             will be performed from global CS.
7857                             If theObject itself is used as theStartLCS,
7858                             its location will be changed to theEndLCS.
7859                 theEndLCS Coordinate system to perform displacement to it.
7860                 theName Object name; when specified, this parameter is used
7861                         for result publication in the study. Otherwise, if automatic
7862                         publication is switched on, default value is used for result name.
7863
7864             Returns:  
7865                 New GEOM.GEOM_Object, containing the displaced shape.
7866
7867             Example of usage:
7868                 # create local coordinate systems
7869                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
7870                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
7871                 # modify the location of the given object
7872                 position = geompy.MakePosition(cylinder, cs1, cs2)
7873             """
7874             # Example: see GEOM_TestAll.py
7875             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7876             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
7877             self._autoPublish(anObj, theName, "displaced")
7878             return anObj
7879
7880         ## Modify the Location of the given object by Path.
7881         #  @param  theObject The object to be displaced.
7882         #  @param  thePath Wire or Edge along that the object will be translated.
7883         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
7884         #  @param  theCopy is to create a copy objects if true.
7885         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
7886         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
7887         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
7888         #
7889         #  @ref tui_modify_location "Example"
7890         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
7891             """
7892             Modify the Location of the given object by Path.
7893
7894             Parameters:
7895                  theObject The object to be displaced.
7896                  thePath Wire or Edge along that the object will be translated.
7897                  theDistance progress of Path (0 = start location, 1 = end of path location).
7898                  theCopy is to create a copy objects if true.
7899                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7900
7901             Returns:  
7902                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
7903                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
7904
7905             Example of usage:
7906                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
7907             """
7908             # Example: see GEOM_TestAll.py
7909             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
7910             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7911             return anObj
7912
7913         ## Modify the Location of the given object by Path, creating its copy before the operation.
7914         #  @param theObject The object to be displaced.
7915         #  @param thePath Wire or Edge along that the object will be translated.
7916         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
7917         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
7918         #  @param theName Object name; when specified, this parameter is used
7919         #         for result publication in the study. Otherwise, if automatic
7920         #         publication is switched on, default value is used for result name.
7921         #
7922         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7923         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
7924             """
7925             Modify the Location of the given object by Path, creating its copy before the operation.
7926
7927             Parameters:
7928                  theObject The object to be displaced.
7929                  thePath Wire or Edge along that the object will be translated.
7930                  theDistance progress of Path (0 = start location, 1 = end of path location).
7931                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7932                  theName Object name; when specified, this parameter is used
7933                          for result publication in the study. Otherwise, if automatic
7934                          publication is switched on, default value is used for result name.
7935
7936             Returns:  
7937                 New GEOM.GEOM_Object, containing the displaced shape.
7938             """
7939             # Example: see GEOM_TestAll.py
7940             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
7941             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7942             self._autoPublish(anObj, theName, "displaced")
7943             return anObj
7944
7945         ## Offset given shape.
7946         #  @param theObject The base object for the offset.
7947         #  @param theOffset Offset value.
7948         #  @param theCopy Flag used to offset object itself or create a copy.
7949         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7950         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
7951         def Offset(self, theObject, theOffset, theCopy=False):
7952             """
7953             Offset given shape.
7954
7955             Parameters:
7956                 theObject The base object for the offset.
7957                 theOffset Offset value.
7958                 theCopy Flag used to offset object itself or create a copy.
7959
7960             Returns: 
7961                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7962                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
7963             """
7964             theOffset, Parameters = ParseParameters(theOffset)
7965             if theCopy:
7966                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7967             else:
7968                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
7969             RaiseIfFailed("Offset", self.TrsfOp)
7970             anObj.SetParameters(Parameters)
7971             return anObj
7972
7973         ## Create new object as offset of the given one.
7974         #  @param theObject The base object for the offset.
7975         #  @param theOffset Offset value.
7976         #  @param theName Object name; when specified, this parameter is used
7977         #         for result publication in the study. Otherwise, if automatic
7978         #         publication is switched on, default value is used for result name.
7979         #
7980         #  @return New GEOM.GEOM_Object, containing the offset object.
7981         #
7982         #  @ref tui_offset "Example"
7983         def MakeOffset(self, theObject, theOffset, theName=None):
7984             """
7985             Create new object as offset of the given one.
7986
7987             Parameters:
7988                 theObject The base object for the offset.
7989                 theOffset Offset value.
7990                 theName Object name; when specified, this parameter is used
7991                         for result publication in the study. Otherwise, if automatic
7992                         publication is switched on, default value is used for result name.
7993
7994             Returns:  
7995                 New GEOM.GEOM_Object, containing the offset object.
7996
7997             Example of usage:
7998                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
7999                  # create a new object as offset of the given object
8000                  offset = geompy.MakeOffset(box, 70.)
8001             """
8002             # Example: see GEOM_TestAll.py
8003             theOffset, Parameters = ParseParameters(theOffset)
8004             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8005             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
8006             anObj.SetParameters(Parameters)
8007             self._autoPublish(anObj, theName, "offset")
8008             return anObj
8009
8010         ## Create new object as projection of the given one on a 2D surface.
8011         #  @param theSource The source object for the projection. It can be a point, edge or wire.
8012         #  @param theTarget The target object. It can be planar or cylindrical face.
8013         #  @param theName Object name; when specified, this parameter is used
8014         #         for result publication in the study. Otherwise, if automatic
8015         #         publication is switched on, default value is used for result name.
8016         #
8017         #  @return New GEOM.GEOM_Object, containing the projection.
8018         #
8019         #  @ref tui_projection "Example"
8020         def MakeProjection(self, theSource, theTarget, theName=None):
8021             """
8022             Create new object as projection of the given one on a 2D surface.
8023
8024             Parameters:
8025                 theSource The source object for the projection. It can be a point, edge or wire.
8026                 theTarget The target object. It can be planar or cylindrical face.
8027                 theName Object name; when specified, this parameter is used
8028                         for result publication in the study. Otherwise, if automatic
8029                         publication is switched on, default value is used for result name.
8030
8031             Returns:  
8032                 New GEOM.GEOM_Object, containing the projection.
8033             """
8034             # Example: see GEOM_TestAll.py
8035             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
8036             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
8037             self._autoPublish(anObj, theName, "projection")
8038             return anObj
8039             
8040         ## Create a projection projection of the given point on a wire or an edge.
8041         #  If there are no solutions or there are 2 or more solutions It throws an
8042         #  exception.
8043         #  @param thePoint the point to be projected.
8044         #  @param theWire the wire. The edge is accepted as well.
8045         #  @param theName Object name; when specified, this parameter is used
8046         #         for result publication in the study. Otherwise, if automatic
8047         #         publication is switched on, default value is used for result name.
8048         #
8049         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
8050         #  \n \a u: The parameter of projection point on edge.
8051         #  \n \a PointOnEdge: The projection point.
8052         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
8053         #
8054         #  @ref tui_projection "Example"
8055         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
8056             """
8057             Create a projection projection of the given point on a wire or an edge.
8058             If there are no solutions or there are 2 or more solutions It throws an
8059             exception.
8060             
8061             Parameters:
8062                 thePoint the point to be projected.
8063                 theWire the wire. The edge is accepted as well.
8064                 theName Object name; when specified, this parameter is used
8065                         for result publication in the study. Otherwise, if automatic
8066                         publication is switched on, default value is used for result name.
8067           
8068             Returns:
8069                 [u, PointOnEdge, EdgeInWireIndex]
8070                  u: The parameter of projection point on edge.
8071                  PointOnEdge: The projection point.
8072                  EdgeInWireIndex: The index of an edge in a wire.
8073             """
8074             # Example: see GEOM_TestAll.py
8075             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
8076             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
8077             self._autoPublish(anObj[1], theName, "projection")
8078             return anObj
8079
8080         # -----------------------------------------------------------------------------
8081         # Patterns
8082         # -----------------------------------------------------------------------------
8083
8084         ## Translate the given object along the given vector a given number times
8085         #  @param theObject The object to be translated.
8086         #  @param theVector Direction of the translation. DX if None.
8087         #  @param theStep Distance to translate on.
8088         #  @param theNbTimes Quantity of translations to be done.
8089         #  @param theName Object name; when specified, this parameter is used
8090         #         for result publication in the study. Otherwise, if automatic
8091         #         publication is switched on, default value is used for result name.
8092         #
8093         #  @return New GEOM.GEOM_Object, containing compound of all
8094         #          the shapes, obtained after each translation.
8095         #
8096         #  @ref tui_multi_translation "Example"
8097         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
8098             """
8099             Translate the given object along the given vector a given number times
8100
8101             Parameters:
8102                 theObject The object to be translated.
8103                 theVector Direction of the translation. DX if None.
8104                 theStep Distance to translate on.
8105                 theNbTimes Quantity of translations to be done.
8106                 theName Object name; when specified, this parameter is used
8107                         for result publication in the study. Otherwise, if automatic
8108                         publication is switched on, default value is used for result name.
8109
8110             Returns:     
8111                 New GEOM.GEOM_Object, containing compound of all
8112                 the shapes, obtained after each translation.
8113
8114             Example of usage:
8115                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
8116             """
8117             # Example: see GEOM_TestAll.py
8118             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
8119             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
8120             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
8121             anObj.SetParameters(Parameters)
8122             self._autoPublish(anObj, theName, "multitranslation")
8123             return anObj
8124
8125         ## Conseqently apply two specified translations to theObject specified number of times.
8126         #  @param theObject The object to be translated.
8127         #  @param theVector1 Direction of the first translation. DX if None.
8128         #  @param theStep1 Step of the first translation.
8129         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
8130         #  @param theVector2 Direction of the second translation. DY if None.
8131         #  @param theStep2 Step of the second translation.
8132         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
8133         #  @param theName Object name; when specified, this parameter is used
8134         #         for result publication in the study. Otherwise, if automatic
8135         #         publication is switched on, default value is used for result name.
8136         #
8137         #  @return New GEOM.GEOM_Object, containing compound of all
8138         #          the shapes, obtained after each translation.
8139         #
8140         #  @ref tui_multi_translation "Example"
8141         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8142                                    theVector2, theStep2, theNbTimes2, theName=None):
8143             """
8144             Conseqently apply two specified translations to theObject specified number of times.
8145
8146             Parameters:
8147                 theObject The object to be translated.
8148                 theVector1 Direction of the first translation. DX if None.
8149                 theStep1 Step of the first translation.
8150                 theNbTimes1 Quantity of translations to be done along theVector1.
8151                 theVector2 Direction of the second translation. DY if None.
8152                 theStep2 Step of the second translation.
8153                 theNbTimes2 Quantity of translations to be done along theVector2.
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
8160                 the shapes, obtained after each translation.
8161
8162             Example of usage:
8163                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8164             """
8165             # Example: see GEOM_TestAll.py
8166             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8167             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8168                                                  theVector2, theStep2, theNbTimes2)
8169             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8170             anObj.SetParameters(Parameters)
8171             self._autoPublish(anObj, theName, "multitranslation")
8172             return anObj
8173
8174         ## Rotate the given object around the given axis a given number times.
8175         #  Rotation angle will be 2*PI/theNbTimes.
8176         #  @param theObject The object to be rotated.
8177         #  @param theAxis The rotation axis. DZ if None.
8178         #  @param theNbTimes Quantity of rotations to be done.
8179         #  @param theName Object name; when specified, this parameter is used
8180         #         for result publication in the study. Otherwise, if automatic
8181         #         publication is switched on, default value is used for result name.
8182         #
8183         #  @return New GEOM.GEOM_Object, containing compound of all the
8184         #          shapes, obtained after each rotation.
8185         #
8186         #  @ref tui_multi_rotation "Example"
8187         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8188             """
8189             Rotate the given object around the given axis a given number times.
8190             Rotation angle will be 2*PI/theNbTimes.
8191
8192             Parameters:
8193                 theObject The object to be rotated.
8194                 theAxis The rotation axis. DZ if None.
8195                 theNbTimes Quantity of rotations to be done.
8196                 theName Object name; when specified, this parameter is used
8197                         for result publication in the study. Otherwise, if automatic
8198                         publication is switched on, default value is used for result name.
8199
8200             Returns:     
8201                 New GEOM.GEOM_Object, containing compound of all the
8202                 shapes, obtained after each rotation.
8203
8204             Example of usage:
8205                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8206             """
8207             # Example: see GEOM_TestAll.py
8208             theNbTimes, Parameters = ParseParameters(theNbTimes)
8209             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8210             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8211             anObj.SetParameters(Parameters)
8212             self._autoPublish(anObj, theName, "multirotation")
8213             return anObj
8214
8215         ## Rotate the given object around the given axis
8216         #  a given number times on the given angle.
8217         #  @param theObject The object to be rotated.
8218         #  @param theAxis The rotation axis. DZ if None.
8219         #  @param theAngleStep Rotation angle in radians.
8220         #  @param theNbTimes Quantity of rotations to be done.
8221         #  @param theName Object name; when specified, this parameter is used
8222         #         for result publication in the study. Otherwise, if automatic
8223         #         publication is switched on, default value is used for result name.
8224         #
8225         #  @return New GEOM.GEOM_Object, containing compound of all the
8226         #          shapes, obtained after each rotation.
8227         #
8228         #  @ref tui_multi_rotation "Example"
8229         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8230             """
8231             Rotate the given object around the given axis
8232             a given number times on the given angle.
8233
8234             Parameters:
8235                 theObject The object to be rotated.
8236                 theAxis The rotation axis. DZ if None.
8237                 theAngleStep Rotation angle in radians.
8238                 theNbTimes Quantity of rotations to be done.
8239                 theName Object name; when specified, this parameter is used
8240                         for result publication in the study. Otherwise, if automatic
8241                         publication is switched on, default value is used for result name.
8242
8243             Returns:     
8244                 New GEOM.GEOM_Object, containing compound of all the
8245                 shapes, obtained after each rotation.
8246
8247             Example of usage:
8248                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8249             """
8250             # Example: see GEOM_TestAll.py
8251             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8252             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8253             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8254             anObj.SetParameters(Parameters)
8255             self._autoPublish(anObj, theName, "multirotation")
8256             return anObj
8257
8258         ## Rotate the given object around the given axis a given
8259         #  number times and multi-translate each rotation result.
8260         #  Rotation angle will be 2*PI/theNbTimes1.
8261         #  Translation direction passes through center of gravity
8262         #  of rotated shape and its projection on the rotation axis.
8263         #  @param theObject The object to be rotated.
8264         #  @param theAxis Rotation axis. DZ if None.
8265         #  @param theNbTimes1 Quantity of rotations to be done.
8266         #  @param theRadialStep Translation distance.
8267         #  @param theNbTimes2 Quantity of translations to be done.
8268         #  @param theName Object name; when specified, this parameter is used
8269         #         for result publication in the study. Otherwise, if automatic
8270         #         publication is switched on, default value is used for result name.
8271         #
8272         #  @return New GEOM.GEOM_Object, containing compound of all the
8273         #          shapes, obtained after each transformation.
8274         #
8275         #  @ref tui_multi_rotation "Example"
8276         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8277             """
8278             Rotate the given object around the
8279             given axis on the given angle a given number
8280             times and multi-translate each rotation result.
8281             Translation direction passes through center of gravity
8282             of rotated shape and its projection on the rotation axis.
8283
8284             Parameters:
8285                 theObject The object to be rotated.
8286                 theAxis Rotation axis. DZ if None.
8287                 theNbTimes1 Quantity of rotations to be done.
8288                 theRadialStep Translation distance.
8289                 theNbTimes2 Quantity of translations to be done.
8290                 theName Object name; when specified, this parameter is used
8291                         for result publication in the study. Otherwise, if automatic
8292                         publication is switched on, default value is used for result name.
8293
8294             Returns:    
8295                 New GEOM.GEOM_Object, containing compound of all the
8296                 shapes, obtained after each transformation.
8297
8298             Example of usage:
8299                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8300             """
8301             # Example: see GEOM_TestAll.py
8302             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8303             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8304             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8305             anObj.SetParameters(Parameters)
8306             self._autoPublish(anObj, theName, "multirotation")
8307             return anObj
8308
8309         ## Rotate the given object around the
8310         #  given axis on the given angle a given number
8311         #  times and multi-translate each rotation result.
8312         #  Translation direction passes through center of gravity
8313         #  of rotated shape and its projection on the rotation axis.
8314         #  @param theObject The object to be rotated.
8315         #  @param theAxis Rotation axis. DZ if None.
8316         #  @param theAngleStep Rotation angle in radians.
8317         #  @param theNbTimes1 Quantity of rotations to be done.
8318         #  @param theRadialStep Translation distance.
8319         #  @param theNbTimes2 Quantity of translations to be done.
8320         #  @param theName Object name; when specified, this parameter is used
8321         #         for result publication in the study. Otherwise, if automatic
8322         #         publication is switched on, default value is used for result name.
8323         #
8324         #  @return New GEOM.GEOM_Object, containing compound of all the
8325         #          shapes, obtained after each transformation.
8326         #
8327         #  @ref tui_multi_rotation "Example"
8328         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8329             """
8330             Rotate the given object around the
8331             given axis on the given angle a given number
8332             times and multi-translate each rotation result.
8333             Translation direction passes through center of gravity
8334             of rotated shape and its projection on the rotation axis.
8335
8336             Parameters:
8337                 theObject The object to be rotated.
8338                 theAxis Rotation axis. DZ if None.
8339                 theAngleStep Rotation angle in radians.
8340                 theNbTimes1 Quantity of rotations to be done.
8341                 theRadialStep Translation distance.
8342                 theNbTimes2 Quantity of translations to be done.
8343                 theName Object name; when specified, this parameter is used
8344                         for result publication in the study. Otherwise, if automatic
8345                         publication is switched on, default value is used for result name.
8346
8347             Returns:    
8348                 New GEOM.GEOM_Object, containing compound of all the
8349                 shapes, obtained after each transformation.
8350
8351             Example of usage:
8352                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8353             """
8354             # Example: see GEOM_TestAll.py
8355             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8356             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8357             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8358             anObj.SetParameters(Parameters)
8359             self._autoPublish(anObj, theName, "multirotation")
8360             return anObj
8361
8362         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8363         #
8364         #  @ref swig_MakeMultiRotation "Example"
8365         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8366             """
8367             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8368
8369             Example of usage:
8370                 pz = geompy.MakeVertex(0, 0, 100)
8371                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8372                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8373             """
8374             # Example: see GEOM_TestOthers.py
8375             aVec = self.MakeLine(aPoint,aDir)
8376             # note: auto-publishing is done in self.MultiRotate1D()
8377             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8378             return anObj
8379
8380         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8381         #
8382         #  @ref swig_MakeMultiRotation "Example"
8383         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8384             """
8385             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8386
8387             Example of usage:
8388                 pz = geompy.MakeVertex(0, 0, 100)
8389                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8390                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8391             """
8392             # Example: see GEOM_TestOthers.py
8393             aVec = self.MakeLine(aPoint,aDir)
8394             # note: auto-publishing is done in self.MultiRotate1D()
8395             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8396             return anObj
8397
8398         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8399         #
8400         #  @ref swig_MakeMultiRotation "Example"
8401         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8402             """
8403             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8404             
8405             Example of usage:
8406                 pz = geompy.MakeVertex(0, 0, 100)
8407                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8408                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8409             """
8410             # Example: see GEOM_TestOthers.py
8411             aVec = self.MakeLine(aPoint,aDir)
8412             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8413             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8414             return anObj
8415
8416         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8417         #
8418         #  @ref swig_MakeMultiRotation "Example"
8419         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8420             """
8421             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8422             
8423             Example of usage:
8424                 pz = geompy.MakeVertex(0, 0, 100)
8425                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8426                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8427             """
8428             # Example: see GEOM_TestOthers.py
8429             aVec = self.MakeLine(aPoint,aDir)
8430             # note: auto-publishing is done in self.MultiRotate2D()
8431             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8432             return anObj
8433
8434         # end of l3_transform
8435         ## @}
8436
8437         ## @addtogroup l3_transform_d
8438         ## @{
8439
8440         ## Deprecated method. Use MultiRotate1DNbTimes instead.
8441         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
8442             """
8443             Deprecated method. Use MultiRotate1DNbTimes instead.
8444             """
8445             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
8446             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
8447
8448         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8449         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8450         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
8451             """
8452             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8453             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8454
8455             Example of usage:
8456                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8457             """
8458             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
8459             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
8460             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
8461             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
8462             anObj.SetParameters(Parameters)
8463             self._autoPublish(anObj, theName, "multirotation")
8464             return anObj
8465
8466         ## The same, as MultiRotate1D(), but axis is given by direction and point
8467         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8468         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8469             """
8470             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
8471             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8472
8473             Example of usage:
8474                 pz = geompy.MakeVertex(0, 0, 100)
8475                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8476                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
8477             """
8478             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
8479             aVec = self.MakeLine(aPoint,aDir)
8480             # note: auto-publishing is done in self.MultiRotate1D()
8481             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
8482             return anObj
8483
8484         ## The same, as MultiRotate2D(), but axis is given by direction and point
8485         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8486         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8487             """
8488             The same, as MultiRotate2D(), but axis is given by direction and point
8489             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8490             
8491             Example of usage:
8492                 pz = geompy.MakeVertex(0, 0, 100)
8493                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8494                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
8495             """
8496             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
8497             aVec = self.MakeLine(aPoint,aDir)
8498             # note: auto-publishing is done in self.MultiRotate2D()
8499             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8500             return anObj
8501
8502         # end of l3_transform_d
8503         ## @}
8504
8505         ## @addtogroup l3_local
8506         ## @{
8507
8508         ## Perform a fillet on all edges of the given shape.
8509         #  @param theShape Shape, to perform fillet on.
8510         #  @param theR Fillet radius.
8511         #  @param theName Object name; when specified, this parameter is used
8512         #         for result publication in the study. Otherwise, if automatic
8513         #         publication is switched on, default value is used for result name.
8514         #
8515         #  @return New GEOM.GEOM_Object, containing the result shape.
8516         #
8517         #  @ref tui_fillet "Example 1"
8518         #  \n @ref swig_MakeFilletAll "Example 2"
8519         def MakeFilletAll(self, theShape, theR, theName=None):
8520             """
8521             Perform a fillet on all edges of the given shape.
8522
8523             Parameters:
8524                 theShape Shape, to perform fillet on.
8525                 theR Fillet radius.
8526                 theName Object name; when specified, this parameter is used
8527                         for result publication in the study. Otherwise, if automatic
8528                         publication is switched on, default value is used for result name.
8529
8530             Returns: 
8531                 New GEOM.GEOM_Object, containing the result shape.
8532
8533             Example of usage: 
8534                filletall = geompy.MakeFilletAll(prism, 10.)
8535             """
8536             # Example: see GEOM_TestOthers.py
8537             theR,Parameters = ParseParameters(theR)
8538             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
8539             RaiseIfFailed("MakeFilletAll", self.LocalOp)
8540             anObj.SetParameters(Parameters)
8541             self._autoPublish(anObj, theName, "fillet")
8542             return anObj
8543
8544         ## Perform a fillet on the specified edges/faces of the given shape
8545         #  @param theShape Shape, to perform fillet on.
8546         #  @param theR Fillet radius.
8547         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
8548         #  @param theListShapes Global indices of edges/faces to perform fillet on.
8549         #  @param theName Object name; when specified, this parameter is used
8550         #         for result publication in the study. Otherwise, if automatic
8551         #         publication is switched on, default value is used for result name.
8552         #
8553         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8554         #
8555         #  @return New GEOM.GEOM_Object, containing the result shape.
8556         #
8557         #  @ref tui_fillet "Example"
8558         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
8559             """
8560             Perform a fillet on the specified edges/faces of the given shape
8561
8562             Parameters:
8563                 theShape Shape, to perform fillet on.
8564                 theR Fillet radius.
8565                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
8566                 theListShapes Global indices of edges/faces to perform fillet on.
8567                 theName Object name; when specified, this parameter is used
8568                         for result publication in the study. Otherwise, if automatic
8569                         publication is switched on, default value is used for result name.
8570
8571             Note:
8572                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8573
8574             Returns: 
8575                 New GEOM.GEOM_Object, containing the result shape.
8576
8577             Example of usage:
8578                 # get the list of IDs (IDList) for the fillet
8579                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8580                 IDlist_e = []
8581                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8582                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8583                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8584                 # make a fillet on the specified edges of the given shape
8585                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
8586             """
8587             # Example: see GEOM_TestAll.py
8588             theR,Parameters = ParseParameters(theR)
8589             anObj = None
8590             if theShapeType == self.ShapeType["EDGE"]:
8591                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
8592                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
8593             else:
8594                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
8595                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
8596             anObj.SetParameters(Parameters)
8597             self._autoPublish(anObj, theName, "fillet")
8598             return anObj
8599
8600         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
8601         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
8602             """
8603             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
8604
8605             Example of usage:
8606                 # get the list of IDs (IDList) for the fillet
8607                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8608                 IDlist_e = []
8609                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8610                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8611                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8612                 # make a fillet on the specified edges of the given shape
8613                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
8614             """
8615             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
8616             anObj = None
8617             if theShapeType == self.ShapeType["EDGE"]:
8618                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
8619                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
8620             else:
8621                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
8622                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
8623             anObj.SetParameters(Parameters)
8624             self._autoPublish(anObj, theName, "fillet")
8625             return anObj
8626
8627         ## Perform a fillet on the specified edges of the given shape
8628         #  @param theShape  Wire Shape to perform fillet on.
8629         #  @param theR  Fillet radius.
8630         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8631         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
8632         #    \note The list of vertices could be empty,
8633         #          in this case fillet will done done at all vertices in wire
8634         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
8635         #         by the length of the edges, nearest to the fillet vertex.
8636         #         But sometimes the next edge is C1 continuous with the one, nearest to
8637         #         the fillet point, and such two (or more) edges can be united to allow
8638         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
8639         #         thus ignoring the secant vertex (vertices).
8640         #  @param theName Object name; when specified, this parameter is used
8641         #         for result publication in the study. Otherwise, if automatic
8642         #         publication is switched on, default value is used for result name.
8643         #
8644         #  @return New GEOM.GEOM_Object, containing the result shape.
8645         #
8646         #  @ref tui_fillet2d "Example"
8647         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
8648             """
8649             Perform a fillet on the specified edges of the given shape
8650
8651             Parameters:
8652                 theShape  Wire Shape to perform fillet on.
8653                 theR  Fillet radius.
8654                 theListOfVertexes Global indices of vertexes to perform fillet on.
8655                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
8656                     by the length of the edges, nearest to the fillet vertex.
8657                     But sometimes the next edge is C1 continuous with the one, nearest to
8658                     the fillet point, and such two (or more) edges can be united to allow
8659                     bigger radius. Set this flag to TRUE to allow collinear edges union,
8660                     thus ignoring the secant vertex (vertices).
8661                 theName Object name; when specified, this parameter is used
8662                         for result publication in the study. Otherwise, if automatic
8663                         publication is switched on, default value is used for result name.
8664             Note:
8665                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8666
8667                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
8668
8669             Returns: 
8670                 New GEOM.GEOM_Object, containing the result shape.
8671
8672             Example of usage:  
8673                 # create wire
8674                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
8675                 # make fillet at given wire vertices with giver radius
8676                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
8677             """
8678             # Example: see GEOM_TestAll.py
8679             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
8680             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
8681             RaiseIfFailed("MakeFillet1D", self.LocalOp)
8682             anObj.SetParameters(Parameters)
8683             self._autoPublish(anObj, theName, "fillet")
8684             return anObj
8685
8686         ## Perform a fillet at the specified vertices of the given face/shell.
8687         #  @param theShape Face or Shell shape to perform fillet on.
8688         #  @param theR Fillet radius.
8689         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8690         #  @param theName Object name; when specified, this parameter is used
8691         #         for result publication in the study. Otherwise, if automatic
8692         #         publication is switched on, default value is used for result name.
8693         #
8694         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8695         #
8696         #  @return New GEOM.GEOM_Object, containing the result shape.
8697         #
8698         #  @ref tui_fillet2d "Example"
8699         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
8700             """
8701             Perform a fillet at the specified vertices of the given face/shell.
8702
8703             Parameters:
8704                 theShape  Face or Shell shape to perform fillet on.
8705                 theR  Fillet radius.
8706                 theListOfVertexes Global indices of vertexes to perform fillet on.
8707                 theName Object name; when specified, this parameter is used
8708                         for result publication in the study. Otherwise, if automatic
8709                         publication is switched on, default value is used for result name.
8710             Note:
8711                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8712
8713             Returns: 
8714                 New GEOM.GEOM_Object, containing the result shape.
8715
8716             Example of usage:
8717                 face = geompy.MakeFaceHW(100, 100, 1)
8718                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
8719             """
8720             # Example: see GEOM_TestAll.py
8721             theR,Parameters = ParseParameters(theR)
8722             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
8723             RaiseIfFailed("MakeFillet2D", self.LocalOp)
8724             anObj.SetParameters(Parameters)
8725             self._autoPublish(anObj, theName, "fillet")
8726             return anObj
8727
8728         ## Perform a symmetric chamfer on all edges of the given shape.
8729         #  @param theShape Shape, to perform chamfer on.
8730         #  @param theD Chamfer size along each face.
8731         #  @param theName Object name; when specified, this parameter is used
8732         #         for result publication in the study. Otherwise, if automatic
8733         #         publication is switched on, default value is used for result name.
8734         #
8735         #  @return New GEOM.GEOM_Object, containing the result shape.
8736         #
8737         #  @ref tui_chamfer "Example 1"
8738         #  \n @ref swig_MakeChamferAll "Example 2"
8739         def MakeChamferAll(self, theShape, theD, theName=None):
8740             """
8741             Perform a symmetric chamfer on all edges of the given shape.
8742
8743             Parameters:
8744                 theShape Shape, to perform chamfer on.
8745                 theD Chamfer size along each face.
8746                 theName Object name; when specified, this parameter is used
8747                         for result publication in the study. Otherwise, if automatic
8748                         publication is switched on, default value is used for result name.
8749
8750             Returns:     
8751                 New GEOM.GEOM_Object, containing the result shape.
8752
8753             Example of usage:
8754                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
8755             """
8756             # Example: see GEOM_TestOthers.py
8757             theD,Parameters = ParseParameters(theD)
8758             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
8759             RaiseIfFailed("MakeChamferAll", self.LocalOp)
8760             anObj.SetParameters(Parameters)
8761             self._autoPublish(anObj, theName, "chamfer")
8762             return anObj
8763
8764         ## Perform a chamfer on edges, common to the specified faces,
8765         #  with distance D1 on the Face1
8766         #  @param theShape Shape, to perform chamfer on.
8767         #  @param theD1 Chamfer size along \a theFace1.
8768         #  @param theD2 Chamfer size along \a theFace2.
8769         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8770         #  @param theName Object name; when specified, this parameter is used
8771         #         for result publication in the study. Otherwise, if automatic
8772         #         publication is switched on, default value is used for result name.
8773         #
8774         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8775         #
8776         #  @return New GEOM.GEOM_Object, containing the result shape.
8777         #
8778         #  @ref tui_chamfer "Example"
8779         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
8780             """
8781             Perform a chamfer on edges, common to the specified faces,
8782             with distance D1 on the Face1
8783
8784             Parameters:
8785                 theShape Shape, to perform chamfer on.
8786                 theD1 Chamfer size along theFace1.
8787                 theD2 Chamfer size along theFace2.
8788                 theFace1,theFace2 Global indices of two faces of theShape.
8789                 theName Object name; when specified, this parameter is used
8790                         for result publication in the study. Otherwise, if automatic
8791                         publication is switched on, default value is used for result name.
8792
8793             Note:
8794                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8795
8796             Returns:      
8797                 New GEOM.GEOM_Object, containing the result shape.
8798
8799             Example of usage:
8800                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8801                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8802                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8803                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
8804             """
8805             # Example: see GEOM_TestAll.py
8806             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8807             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
8808             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
8809             anObj.SetParameters(Parameters)
8810             self._autoPublish(anObj, theName, "chamfer")
8811             return anObj
8812
8813         ## Perform a chamfer on edges
8814         #  @param theShape Shape, to perform chamfer on.
8815         #  @param theD Chamfer length
8816         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8817         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8818         #  @param theName Object name; when specified, this parameter is used
8819         #         for result publication in the study. Otherwise, if automatic
8820         #         publication is switched on, default value is used for result name.
8821         #
8822         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8823         #
8824         #  @return New GEOM.GEOM_Object, containing the result shape.
8825         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
8826             """
8827             Perform a chamfer on edges
8828
8829             Parameters:
8830                 theShape Shape, to perform chamfer on.
8831                 theD1 Chamfer size along theFace1.
8832                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
8833                 theFace1,theFace2 Global indices of two faces of theShape.
8834                 theName Object name; when specified, this parameter is used
8835                         for result publication in the study. Otherwise, if automatic
8836                         publication is switched on, default value is used for result name.
8837
8838             Note:
8839                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8840
8841             Returns:      
8842                 New GEOM.GEOM_Object, containing the result shape.
8843
8844             Example of usage:
8845                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8846                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8847                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8848                 ang = 30
8849                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
8850             """
8851             flag = False
8852             if isinstance(theAngle,str):
8853                 flag = True
8854             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8855             if flag:
8856                 theAngle = theAngle*math.pi/180.0
8857             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
8858             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
8859             anObj.SetParameters(Parameters)
8860             self._autoPublish(anObj, theName, "chamfer")
8861             return anObj
8862
8863         ## Perform a chamfer on all edges of the specified faces,
8864         #  with distance D1 on the first specified face (if several for one edge)
8865         #  @param theShape Shape, to perform chamfer on.
8866         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
8867         #               connected to the edge, are in \a theFaces, \a theD1
8868         #               will be get along face, which is nearer to \a theFaces beginning.
8869         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
8870         #  @param theFaces Sequence of global indices of faces of \a theShape.
8871         #  @param theName Object name; when specified, this parameter is used
8872         #         for result publication in the study. Otherwise, if automatic
8873         #         publication is switched on, default value is used for result name.
8874         #
8875         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8876         #
8877         #  @return New GEOM.GEOM_Object, containing the result shape.
8878         #
8879         #  @ref tui_chamfer "Example"
8880         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
8881             """
8882             Perform a chamfer on all edges of the specified faces,
8883             with distance D1 on the first specified face (if several for one edge)
8884
8885             Parameters:
8886                 theShape Shape, to perform chamfer on.
8887                 theD1 Chamfer size along face from  theFaces. If both faces,
8888                       connected to the edge, are in theFaces, theD1
8889                       will be get along face, which is nearer to theFaces beginning.
8890                 theD2 Chamfer size along another of two faces, connected to the edge.
8891                 theFaces Sequence of global indices of faces of theShape.
8892                 theName Object name; when specified, this parameter is used
8893                         for result publication in the study. Otherwise, if automatic
8894                         publication is switched on, default value is used for result name.
8895                 
8896             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
8897
8898             Returns:  
8899                 New GEOM.GEOM_Object, containing the result shape.
8900             """
8901             # Example: see GEOM_TestAll.py
8902             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8903             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
8904             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
8905             anObj.SetParameters(Parameters)
8906             self._autoPublish(anObj, theName, "chamfer")
8907             return anObj
8908
8909         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
8910         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8911         #
8912         #  @ref swig_FilletChamfer "Example"
8913         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
8914             """
8915             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
8916             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8917             """
8918             flag = False
8919             if isinstance(theAngle,str):
8920                 flag = True
8921             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8922             if flag:
8923                 theAngle = theAngle*math.pi/180.0
8924             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
8925             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
8926             anObj.SetParameters(Parameters)
8927             self._autoPublish(anObj, theName, "chamfer")
8928             return anObj
8929
8930         ## Perform a chamfer on edges,
8931         #  with distance D1 on the first specified face (if several for one edge)
8932         #  @param theShape Shape, to perform chamfer on.
8933         #  @param theD1,theD2 Chamfer size
8934         #  @param theEdges Sequence of edges of \a theShape.
8935         #  @param theName Object name; when specified, this parameter is used
8936         #         for result publication in the study. Otherwise, if automatic
8937         #         publication is switched on, default value is used for result name.
8938         #
8939         #  @return New GEOM.GEOM_Object, containing the result shape.
8940         #
8941         #  @ref swig_FilletChamfer "Example"
8942         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
8943             """
8944             Perform a chamfer on edges,
8945             with distance D1 on the first specified face (if several for one edge)
8946             
8947             Parameters:
8948                 theShape Shape, to perform chamfer on.
8949                 theD1,theD2 Chamfer size
8950                 theEdges Sequence of edges of theShape.
8951                 theName Object name; when specified, this parameter is used
8952                         for result publication in the study. Otherwise, if automatic
8953                         publication is switched on, default value is used for result name.
8954
8955             Returns:
8956                 New GEOM.GEOM_Object, containing the result shape.
8957             """
8958             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8959             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
8960             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
8961             anObj.SetParameters(Parameters)
8962             self._autoPublish(anObj, theName, "chamfer")
8963             return anObj
8964
8965         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
8966         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8967         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
8968             """
8969             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
8970             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8971             """
8972             flag = False
8973             if isinstance(theAngle,str):
8974                 flag = True
8975             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8976             if flag:
8977                 theAngle = theAngle*math.pi/180.0
8978             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
8979             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
8980             anObj.SetParameters(Parameters)
8981             self._autoPublish(anObj, theName, "chamfer")
8982             return anObj
8983
8984         ## @sa MakeChamferEdge(), MakeChamferFaces()
8985         #
8986         #  @ref swig_MakeChamfer "Example"
8987         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
8988             """
8989             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
8990             """
8991             # Example: see GEOM_TestOthers.py
8992             anObj = None
8993             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
8994             if aShapeType == self.ShapeType["EDGE"]:
8995                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
8996             else:
8997                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
8998             return anObj
8999             
9000         ## Remove material from a solid by extrusion of the base shape on the given distance.
9001         #  @param theInit Shape to remove material from. It must be a solid or 
9002         #  a compound made of a single solid.
9003         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9004         #  @param theH Prism dimension along the normal to theBase
9005         #  @param theAngle Draft angle in degrees.
9006         #  @param theName Object name; when specified, this parameter is used
9007         #         for result publication in the study. Otherwise, if automatic
9008         #         publication is switched on, default value is used for result name.
9009         #
9010         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
9011         #
9012         #  @ref tui_creation_prism "Example"
9013         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
9014             """
9015             Add material to a solid by extrusion of the base shape on the given distance.
9016
9017             Parameters:
9018                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
9019                 theBase Closed edge or wire defining the base shape to be extruded.
9020                 theH Prism dimension along the normal  to theBase
9021                 theAngle Draft angle in degrees.
9022                 theName Object name; when specified, this parameter is used
9023                         for result publication in the study. Otherwise, if automatic
9024                         publication is switched on, default value is used for result name.
9025
9026             Returns:
9027                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
9028             """
9029             # Example: see GEOM_TestAll.py
9030             #theH,Parameters = ParseParameters(theH)
9031             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
9032             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9033             #anObj.SetParameters(Parameters)
9034             self._autoPublish(anObj, theName, "extrudedCut")
9035             return anObj   
9036             
9037         ## Add material to a solid by extrusion of the base shape on the given distance.
9038         #  @param theInit Shape to add material to. It must be a solid or 
9039         #  a compound made of a single solid.
9040         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9041         #  @param theH Prism dimension along the normal to theBase
9042         #  @param theAngle Draft angle in degrees.
9043         #  @param theName Object name; when specified, this parameter is used
9044         #         for result publication in the study. Otherwise, if automatic
9045         #         publication is switched on, default value is used for result name.
9046         #
9047         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
9048         #
9049         #  @ref tui_creation_prism "Example"
9050         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
9051             """
9052             Add material to a solid by extrusion of the base shape on the given distance.
9053
9054             Parameters:
9055                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
9056                 theBase Closed edge or wire defining the base shape to be extruded.
9057                 theH Prism dimension along the normal  to theBase
9058                 theAngle Draft angle in degrees.
9059                 theName Object name; when specified, this parameter is used
9060                         for result publication in the study. Otherwise, if automatic
9061                         publication is switched on, default value is used for result name.
9062
9063             Returns:
9064                 New GEOM.GEOM_Object,  containing the initial shape with added material.
9065             """
9066             # Example: see GEOM_TestAll.py
9067             #theH,Parameters = ParseParameters(theH)
9068             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
9069             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9070             #anObj.SetParameters(Parameters)
9071             self._autoPublish(anObj, theName, "extrudedBoss")
9072             return anObj   
9073
9074         # end of l3_local
9075         ## @}
9076
9077         ## @addtogroup l3_basic_op
9078         ## @{
9079
9080         ## Perform an Archimde operation on the given shape with given parameters.
9081         #  The object presenting the resulting face is returned.
9082         #  @param theShape Shape to be put in water.
9083         #  @param theWeight Weight og the shape.
9084         #  @param theWaterDensity Density of the water.
9085         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
9086         #  @param theName Object name; when specified, this parameter is used
9087         #         for result publication in the study. Otherwise, if automatic
9088         #         publication is switched on, default value is used for result name.
9089         #
9090         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
9091         #          by a plane, corresponding to water level.
9092         #
9093         #  @ref tui_archimede "Example"
9094         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
9095             """
9096             Perform an Archimde operation on the given shape with given parameters.
9097             The object presenting the resulting face is returned.
9098
9099             Parameters: 
9100                 theShape Shape to be put in water.
9101                 theWeight Weight og the shape.
9102                 theWaterDensity Density of the water.
9103                 theMeshDeflection Deflection of the mesh, using to compute the section.
9104                 theName Object name; when specified, this parameter is used
9105                         for result publication in the study. Otherwise, if automatic
9106                         publication is switched on, default value is used for result name.
9107
9108             Returns: 
9109                 New GEOM.GEOM_Object, containing a section of theShape
9110                 by a plane, corresponding to water level.
9111             """
9112             # Example: see GEOM_TestAll.py
9113             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
9114               theWeight,theWaterDensity,theMeshDeflection)
9115             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
9116             RaiseIfFailed("MakeArchimede", self.LocalOp)
9117             anObj.SetParameters(Parameters)
9118             self._autoPublish(anObj, theName, "archimede")
9119             return anObj
9120
9121         # end of l3_basic_op
9122         ## @}
9123
9124         ## @addtogroup l2_measure
9125         ## @{
9126
9127         ## Get point coordinates
9128         #  @return [x, y, z]
9129         #
9130         #  @ref tui_measurement_tools_page "Example"
9131         def PointCoordinates(self,Point):
9132             """
9133             Get point coordinates
9134
9135             Returns:
9136                 [x, y, z]
9137             """
9138             # Example: see GEOM_TestMeasures.py
9139             aTuple = self.MeasuOp.PointCoordinates(Point)
9140             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9141             return aTuple 
9142         
9143         ## Get vector coordinates
9144         #  @return [x, y, z]
9145         #
9146         #  @ref tui_measurement_tools_page "Example"
9147         def VectorCoordinates(self,Vector):
9148             """
9149             Get vector coordinates
9150
9151             Returns:
9152                 [x, y, z]
9153             """
9154
9155             p1=self.GetFirstVertex(Vector)
9156             p2=self.GetLastVertex(Vector)
9157             
9158             X1=self.PointCoordinates(p1)
9159             X2=self.PointCoordinates(p2)
9160
9161             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9162
9163
9164         ## Compute cross product
9165         #  @return vector w=u^v
9166         #
9167         #  @ref tui_measurement_tools_page "Example"
9168         def CrossProduct(self, Vector1, Vector2):
9169             """ 
9170             Compute cross product
9171             
9172             Returns: vector w=u^v
9173             """
9174             u=self.VectorCoordinates(Vector1)
9175             v=self.VectorCoordinates(Vector2)
9176             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])
9177             
9178             return w
9179         
9180         ## Compute cross product
9181         #  @return dot product  p=u.v
9182         #
9183         #  @ref tui_measurement_tools_page "Example"
9184         def DotProduct(self, Vector1, Vector2):
9185             """ 
9186             Compute cross product
9187             
9188             Returns: dot product  p=u.v
9189             """
9190             u=self.VectorCoordinates(Vector1)
9191             v=self.VectorCoordinates(Vector2)
9192             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9193             
9194             return p
9195
9196
9197         ## Get summarized length of all wires,
9198         #  area of surface and volume of the given shape.
9199         #  @param theShape Shape to define properties of.
9200         #  @return [theLength, theSurfArea, theVolume]\n
9201         #  theLength:   Summarized length of all wires of the given shape.\n
9202         #  theSurfArea: Area of surface of the given shape.\n
9203         #  theVolume:   Volume of the given shape.
9204         #
9205         #  @ref tui_measurement_tools_page "Example"
9206         def BasicProperties(self,theShape):
9207             """
9208             Get summarized length of all wires,
9209             area of surface and volume of the given shape.
9210
9211             Parameters: 
9212                 theShape Shape to define properties of.
9213
9214             Returns:
9215                 [theLength, theSurfArea, theVolume]
9216                  theLength:   Summarized length of all wires of the given shape.
9217                  theSurfArea: Area of surface of the given shape.
9218                  theVolume:   Volume of the given shape.
9219             """
9220             # Example: see GEOM_TestMeasures.py
9221             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9222             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9223             return aTuple
9224
9225         ## Get parameters of bounding box of the given shape
9226         #  @param theShape Shape to obtain bounding box of.
9227         #  @param precise TRUE for precise computation; FALSE for fast one.
9228         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9229         #  Xmin,Xmax: Limits of shape along OX axis.
9230         #  Ymin,Ymax: Limits of shape along OY axis.
9231         #  Zmin,Zmax: Limits of shape along OZ axis.
9232         #
9233         #  @ref tui_measurement_tools_page "Example"
9234         def BoundingBox (self, theShape, precise=False):
9235             """
9236             Get parameters of bounding box of the given shape
9237
9238             Parameters: 
9239                 theShape Shape to obtain bounding box of.
9240                 precise TRUE for precise computation; FALSE for fast one.
9241
9242             Returns:
9243                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9244                  Xmin,Xmax: Limits of shape along OX axis.
9245                  Ymin,Ymax: Limits of shape along OY axis.
9246                  Zmin,Zmax: Limits of shape along OZ axis.
9247             """
9248             # Example: see GEOM_TestMeasures.py
9249             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9250             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9251             return aTuple
9252
9253         ## Get bounding box of the given shape
9254         #  @param theShape Shape to obtain bounding box of.
9255         #  @param precise TRUE for precise computation; FALSE for fast one.
9256         #  @param theName Object name; when specified, this parameter is used
9257         #         for result publication in the study. Otherwise, if automatic
9258         #         publication is switched on, default value is used for result name.
9259         #
9260         #  @return New GEOM.GEOM_Object, containing the created box.
9261         #
9262         #  @ref tui_measurement_tools_page "Example"
9263         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9264             """
9265             Get bounding box of the given shape
9266
9267             Parameters: 
9268                 theShape Shape to obtain bounding box of.
9269                 precise TRUE for precise computation; FALSE for fast one.
9270                 theName Object name; when specified, this parameter is used
9271                         for result publication in the study. Otherwise, if automatic
9272                         publication is switched on, default value is used for result name.
9273
9274             Returns:
9275                 New GEOM.GEOM_Object, containing the created box.
9276             """
9277             # Example: see GEOM_TestMeasures.py
9278             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9279             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9280             self._autoPublish(anObj, theName, "bndbox")
9281             return anObj
9282
9283         ## Get inertia matrix and moments of inertia of theShape.
9284         #  @param theShape Shape to calculate inertia of.
9285         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9286         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9287         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9288         #
9289         #  @ref tui_measurement_tools_page "Example"
9290         def Inertia(self,theShape):
9291             """
9292             Get inertia matrix and moments of inertia of theShape.
9293
9294             Parameters: 
9295                 theShape Shape to calculate inertia of.
9296
9297             Returns:
9298                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9299                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9300                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9301             """
9302             # Example: see GEOM_TestMeasures.py
9303             aTuple = self.MeasuOp.GetInertia(theShape)
9304             RaiseIfFailed("GetInertia", self.MeasuOp)
9305             return aTuple
9306
9307         ## Get if coords are included in the shape (ST_IN or ST_ON)
9308         #  @param theShape Shape
9309         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9310         #  @param tolerance to be used (default is 1.0e-7)
9311         #  @return list_of_boolean = [res1, res2, ...]
9312         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9313             """
9314             Get if coords are included in the shape (ST_IN or ST_ON)
9315             
9316             Parameters: 
9317                 theShape Shape
9318                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9319                 tolerance to be used (default is 1.0e-7)
9320
9321             Returns:
9322                 list_of_boolean = [res1, res2, ...]
9323             """
9324             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9325
9326         ## Get minimal distance between the given shapes.
9327         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9328         #  @return Value of the minimal distance between the given shapes.
9329         #
9330         #  @ref tui_measurement_tools_page "Example"
9331         def MinDistance(self, theShape1, theShape2):
9332             """
9333             Get minimal distance between the given shapes.
9334             
9335             Parameters: 
9336                 theShape1,theShape2 Shapes to find minimal distance between.
9337
9338             Returns:    
9339                 Value of the minimal distance between the given shapes.
9340             """
9341             # Example: see GEOM_TestMeasures.py
9342             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9343             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9344             return aTuple[0]
9345
9346         ## Get minimal distance between the given shapes.
9347         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9348         #  @return Value of the minimal distance between the given shapes, in form of list
9349         #          [Distance, DX, DY, DZ].
9350         #
9351         #  @ref swig_all_measure "Example"
9352         def MinDistanceComponents(self, theShape1, theShape2):
9353             """
9354             Get minimal distance between the given shapes.
9355
9356             Parameters: 
9357                 theShape1,theShape2 Shapes to find minimal distance between.
9358
9359             Returns:  
9360                 Value of the minimal distance between the given shapes, in form of list
9361                 [Distance, DX, DY, DZ]
9362             """
9363             # Example: see GEOM_TestMeasures.py
9364             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9365             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9366             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9367             return aRes
9368
9369         ## Get closest points of the given shapes.
9370         #  @param theShape1,theShape2 Shapes to find closest points of.
9371         #  @return The number of found solutions (-1 in case of infinite number of
9372         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9373         #
9374         #  @ref tui_measurement_tools_page "Example"
9375         def ClosestPoints (self, theShape1, theShape2):
9376             """
9377             Get closest points of the given shapes.
9378
9379             Parameters: 
9380                 theShape1,theShape2 Shapes to find closest points of.
9381
9382             Returns:    
9383                 The number of found solutions (-1 in case of infinite number of
9384                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9385             """
9386             # Example: see GEOM_TestMeasures.py
9387             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9388             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9389             return aTuple
9390
9391         ## Get angle between the given shapes in degrees.
9392         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9393         #  @note If both arguments are vectors, the angle is computed in accordance
9394         #        with their orientations, otherwise the minimum angle is computed.
9395         #  @return Value of the angle between the given shapes in degrees.
9396         #
9397         #  @ref tui_measurement_tools_page "Example"
9398         def GetAngle(self, theShape1, theShape2):
9399             """
9400             Get angle between the given shapes in degrees.
9401
9402             Parameters: 
9403                 theShape1,theShape2 Lines or linear edges to find angle between.
9404
9405             Note:
9406                 If both arguments are vectors, the angle is computed in accordance
9407                 with their orientations, otherwise the minimum angle is computed.
9408
9409             Returns:  
9410                 Value of the angle between the given shapes in degrees.
9411             """
9412             # Example: see GEOM_TestMeasures.py
9413             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
9414             RaiseIfFailed("GetAngle", self.MeasuOp)
9415             return anAngle
9416
9417         ## Get angle between the given shapes in radians.
9418         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9419         #  @note If both arguments are vectors, the angle is computed in accordance
9420         #        with their orientations, otherwise the minimum angle is computed.
9421         #  @return Value of the angle between the given shapes in radians.
9422         #
9423         #  @ref tui_measurement_tools_page "Example"
9424         def GetAngleRadians(self, theShape1, theShape2):
9425             """
9426             Get angle between the given shapes in radians.
9427
9428             Parameters: 
9429                 theShape1,theShape2 Lines or linear edges to find angle between.
9430
9431                 
9432             Note:
9433                 If both arguments are vectors, the angle is computed in accordance
9434                 with their orientations, otherwise the minimum angle is computed.
9435
9436             Returns:  
9437                 Value of the angle between the given shapes in radians.
9438             """
9439             # Example: see GEOM_TestMeasures.py
9440             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
9441             RaiseIfFailed("GetAngle", self.MeasuOp)
9442             return anAngle
9443
9444         ## Get angle between the given vectors in degrees.
9445         #  @param theShape1,theShape2 Vectors to find angle between.
9446         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
9447         #                 if False, the opposite vector to the normal vector is used.
9448         #  @return Value of the angle between the given vectors in degrees.
9449         #
9450         #  @ref tui_measurement_tools_page "Example"
9451         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
9452             """
9453             Get angle between the given vectors in degrees.
9454
9455             Parameters: 
9456                 theShape1,theShape2 Vectors to find angle between.
9457                 theFlag If True, the normal vector is defined by the two vectors cross,
9458                         if False, the opposite vector to the normal vector is used.
9459
9460             Returns:  
9461                 Value of the angle between the given vectors in degrees.
9462             """
9463             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
9464             if not theFlag:
9465                 anAngle = 360. - anAngle
9466             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
9467             return anAngle
9468
9469         ## The same as GetAngleVectors, but the result is in radians.
9470         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
9471             """
9472             Get angle between the given vectors in radians.
9473
9474             Parameters: 
9475                 theShape1,theShape2 Vectors to find angle between.
9476                 theFlag If True, the normal vector is defined by the two vectors cross,
9477                         if False, the opposite vector to the normal vector is used.
9478
9479             Returns:  
9480                 Value of the angle between the given vectors in radians.
9481             """
9482             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
9483             return anAngle
9484
9485         ## @name Curve Curvature Measurement
9486         #  Methods for receiving radius of curvature of curves
9487         #  in the given point
9488         ## @{
9489
9490         ## Measure curvature of a curve at a point, set by parameter.
9491         #  @param theCurve a curve.
9492         #  @param theParam parameter.
9493         #  @return radius of curvature of \a theCurve.
9494         #
9495         #  @ref swig_todo "Example"
9496         def CurveCurvatureByParam(self, theCurve, theParam):
9497             """
9498             Measure curvature of a curve at a point, set by parameter.
9499
9500             Parameters: 
9501                 theCurve a curve.
9502                 theParam parameter.
9503
9504             Returns: 
9505                 radius of curvature of theCurve.
9506             """
9507             # Example: see GEOM_TestMeasures.py
9508             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
9509             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
9510             return aCurv
9511
9512         ## Measure curvature of a curve at a point.
9513         #  @param theCurve a curve.
9514         #  @param thePoint given point.
9515         #  @return radius of curvature of \a theCurve.
9516         #
9517         #  @ref swig_todo "Example"
9518         def CurveCurvatureByPoint(self, theCurve, thePoint):
9519             """
9520             Measure curvature of a curve at a point.
9521
9522             Parameters: 
9523                 theCurve a curve.
9524                 thePoint given point.
9525
9526             Returns: 
9527                 radius of curvature of theCurve.           
9528             """
9529             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
9530             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
9531             return aCurv
9532         ## @}
9533
9534         ## @name Surface Curvature Measurement
9535         #  Methods for receiving max and min radius of curvature of surfaces
9536         #  in the given point
9537         ## @{
9538
9539         ## Measure max radius of curvature of surface.
9540         #  @param theSurf the given surface.
9541         #  @param theUParam Value of U-parameter on the referenced surface.
9542         #  @param theVParam Value of V-parameter on the referenced surface.
9543         #  @return max radius of curvature of theSurf.
9544         #
9545         ## @ref swig_todo "Example"
9546         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9547             """
9548             Measure max radius of curvature of surface.
9549
9550             Parameters: 
9551                 theSurf the given surface.
9552                 theUParam Value of U-parameter on the referenced surface.
9553                 theVParam Value of V-parameter on the referenced surface.
9554                 
9555             Returns:     
9556                 max radius of curvature of theSurf.
9557             """
9558             # Example: see GEOM_TestMeasures.py
9559             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9560             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
9561             return aSurf
9562
9563         ## Measure max radius of curvature of surface in the given point
9564         #  @param theSurf the given surface.
9565         #  @param thePoint given point.
9566         #  @return max radius of curvature of theSurf.
9567         #
9568         ## @ref swig_todo "Example"
9569         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
9570             """
9571             Measure max radius of curvature of surface in the given point.
9572
9573             Parameters: 
9574                 theSurf the given surface.
9575                 thePoint given point.
9576                 
9577             Returns:     
9578                 max radius of curvature of theSurf.          
9579             """
9580             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
9581             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
9582             return aSurf
9583
9584         ## Measure min radius of curvature of surface.
9585         #  @param theSurf the given surface.
9586         #  @param theUParam Value of U-parameter on the referenced surface.
9587         #  @param theVParam Value of V-parameter on the referenced surface.
9588         #  @return min radius of curvature of theSurf.
9589         #   
9590         ## @ref swig_todo "Example"
9591         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9592             """
9593             Measure min radius of curvature of surface.
9594
9595             Parameters: 
9596                 theSurf the given surface.
9597                 theUParam Value of U-parameter on the referenced surface.
9598                 theVParam Value of V-parameter on the referenced surface.
9599                 
9600             Returns:     
9601                 Min radius of curvature of theSurf.
9602             """
9603             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9604             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
9605             return aSurf
9606
9607         ## Measure min radius of curvature of surface in the given point
9608         #  @param theSurf the given surface.
9609         #  @param thePoint given point.
9610         #  @return min radius of curvature of theSurf.
9611         #
9612         ## @ref swig_todo "Example"
9613         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
9614             """
9615             Measure min radius of curvature of surface in the given point.
9616
9617             Parameters: 
9618                 theSurf the given surface.
9619                 thePoint given point.
9620                 
9621             Returns:     
9622                 Min radius of curvature of theSurf.          
9623             """
9624             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
9625             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
9626             return aSurf
9627         ## @}
9628
9629         ## Get min and max tolerances of sub-shapes of theShape
9630         #  @param theShape Shape, to get tolerances of.
9631         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
9632         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
9633         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
9634         #  VertMin,VertMax: Min and max tolerances of the vertices.
9635         #
9636         #  @ref tui_measurement_tools_page "Example"
9637         def Tolerance(self,theShape):
9638             """
9639             Get min and max tolerances of sub-shapes of theShape
9640
9641             Parameters: 
9642                 theShape Shape, to get tolerances of.
9643
9644             Returns:    
9645                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
9646                  FaceMin,FaceMax: Min and max tolerances of the faces.
9647                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
9648                  VertMin,VertMax: Min and max tolerances of the vertices.
9649             """
9650             # Example: see GEOM_TestMeasures.py
9651             aTuple = self.MeasuOp.GetTolerance(theShape)
9652             RaiseIfFailed("GetTolerance", self.MeasuOp)
9653             return aTuple
9654
9655         ## Obtain description of the given shape (number of sub-shapes of each type)
9656         #  @param theShape Shape to be described.
9657         #  @return Description of the given shape.
9658         #
9659         #  @ref tui_measurement_tools_page "Example"
9660         def WhatIs(self,theShape):
9661             """
9662             Obtain description of the given shape (number of sub-shapes of each type)
9663
9664             Parameters:
9665                 theShape Shape to be described.
9666
9667             Returns:
9668                 Description of the given shape.
9669             """
9670             # Example: see GEOM_TestMeasures.py
9671             aDescr = self.MeasuOp.WhatIs(theShape)
9672             RaiseIfFailed("WhatIs", self.MeasuOp)
9673             return aDescr
9674
9675         ## Obtain quantity of shapes of the given type in \a theShape.
9676         #  If \a theShape is of type \a theType, it is also counted.
9677         #  @param theShape Shape to be described.
9678         #  @param theType the given ShapeType().
9679         #  @return Quantity of shapes of type \a theType in \a theShape.
9680         #
9681         #  @ref tui_measurement_tools_page "Example"
9682         def NbShapes (self, theShape, theType):
9683             """
9684             Obtain quantity of shapes of the given type in theShape.
9685             If theShape is of type theType, it is also counted.
9686
9687             Parameters:
9688                 theShape Shape to be described.
9689                 theType the given geompy.ShapeType
9690
9691             Returns:
9692                 Quantity of shapes of type theType in theShape.
9693             """
9694             # Example: see GEOM_TestMeasures.py
9695             listSh = self.SubShapeAllIDs(theShape, theType)
9696             Nb = len(listSh)
9697             return Nb
9698
9699         ## Obtain quantity of shapes of each type in \a theShape.
9700         #  The \a theShape is also counted.
9701         #  @param theShape Shape to be described.
9702         #  @return Dictionary of ShapeType() with bound quantities of shapes.
9703         #
9704         #  @ref tui_measurement_tools_page "Example"
9705         def ShapeInfo (self, theShape):
9706             """
9707             Obtain quantity of shapes of each type in theShape.
9708             The theShape is also counted.
9709
9710             Parameters:
9711                 theShape Shape to be described.
9712
9713             Returns:
9714                 Dictionary of geompy.ShapeType with bound quantities of shapes.
9715             """
9716             # Example: see GEOM_TestMeasures.py
9717             aDict = {}
9718             for typeSh in self.ShapeType:
9719                 if typeSh in ( "AUTO", "SHAPE" ): continue
9720                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
9721                 Nb = len(listSh)
9722                 aDict[typeSh] = Nb
9723                 pass
9724             return aDict
9725
9726         def GetCreationInformation(self, theShape):
9727             info = theShape.GetCreationInformation()
9728             # operationName
9729             opName = info.operationName
9730             if not opName: opName = "no info available"
9731             res = "Operation: " + opName
9732             # parameters
9733             for parVal in info.params:
9734                 res += " \n %s = %s" % ( parVal.name, parVal.value )
9735             return res
9736
9737         ## Get a point, situated at the centre of mass of theShape.
9738         #  @param theShape Shape to define centre of mass of.
9739         #  @param theName Object name; when specified, this parameter is used
9740         #         for result publication in the study. Otherwise, if automatic
9741         #         publication is switched on, default value is used for result name.
9742         #
9743         #  @return New GEOM.GEOM_Object, containing the created point.
9744         #
9745         #  @ref tui_measurement_tools_page "Example"
9746         def MakeCDG(self, theShape, theName=None):
9747             """
9748             Get a point, situated at the centre of mass of theShape.
9749
9750             Parameters:
9751                 theShape Shape to define centre of mass of.
9752                 theName Object name; when specified, this parameter is used
9753                         for result publication in the study. Otherwise, if automatic
9754                         publication is switched on, default value is used for result name.
9755
9756             Returns:
9757                 New GEOM.GEOM_Object, containing the created point.
9758             """
9759             # Example: see GEOM_TestMeasures.py
9760             anObj = self.MeasuOp.GetCentreOfMass(theShape)
9761             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
9762             self._autoPublish(anObj, theName, "centerOfMass")
9763             return anObj
9764
9765         ## Get a vertex sub-shape by index depended with orientation.
9766         #  @param theShape Shape to find sub-shape.
9767         #  @param theIndex Index to find vertex by this index (starting from zero)
9768         #  @param theName Object name; when specified, this parameter is used
9769         #         for result publication in the study. Otherwise, if automatic
9770         #         publication is switched on, default value is used for result name.
9771         #
9772         #  @return New GEOM.GEOM_Object, containing the created vertex.
9773         #
9774         #  @ref tui_measurement_tools_page "Example"
9775         def GetVertexByIndex(self, theShape, theIndex, theName=None):
9776             """
9777             Get a vertex sub-shape by index depended with orientation.
9778
9779             Parameters:
9780                 theShape Shape to find sub-shape.
9781                 theIndex Index to find vertex by this index (starting from zero)
9782                 theName Object name; when specified, this parameter is used
9783                         for result publication in the study. Otherwise, if automatic
9784                         publication is switched on, default value is used for result name.
9785
9786             Returns:
9787                 New GEOM.GEOM_Object, containing the created vertex.
9788             """
9789             # Example: see GEOM_TestMeasures.py
9790             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
9791             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
9792             self._autoPublish(anObj, theName, "vertex")
9793             return anObj
9794
9795         ## Get the first vertex of wire/edge depended orientation.
9796         #  @param theShape Shape to find first vertex.
9797         #  @param theName Object name; when specified, this parameter is used
9798         #         for result publication in the study. Otherwise, if automatic
9799         #         publication is switched on, default value is used for result name.
9800         #
9801         #  @return New GEOM.GEOM_Object, containing the created vertex.
9802         #
9803         #  @ref tui_measurement_tools_page "Example"
9804         def GetFirstVertex(self, theShape, theName=None):
9805             """
9806             Get the first vertex of wire/edge depended orientation.
9807
9808             Parameters:
9809                 theShape Shape to find first vertex.
9810                 theName Object name; when specified, this parameter is used
9811                         for result publication in the study. Otherwise, if automatic
9812                         publication is switched on, default value is used for result name.
9813
9814             Returns:    
9815                 New GEOM.GEOM_Object, containing the created vertex.
9816             """
9817             # Example: see GEOM_TestMeasures.py
9818             # note: auto-publishing is done in self.GetVertexByIndex()
9819             anObj = self.GetVertexByIndex(theShape, 0, theName)
9820             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
9821             return anObj
9822
9823         ## Get the last vertex of wire/edge depended orientation.
9824         #  @param theShape Shape to find last vertex.
9825         #  @param theName Object name; when specified, this parameter is used
9826         #         for result publication in the study. Otherwise, if automatic
9827         #         publication is switched on, default value is used for result name.
9828         #
9829         #  @return New GEOM.GEOM_Object, containing the created vertex.
9830         #
9831         #  @ref tui_measurement_tools_page "Example"
9832         def GetLastVertex(self, theShape, theName=None):
9833             """
9834             Get the last vertex of wire/edge depended orientation.
9835
9836             Parameters: 
9837                 theShape Shape to find last vertex.
9838                 theName Object name; when specified, this parameter is used
9839                         for result publication in the study. Otherwise, if automatic
9840                         publication is switched on, default value is used for result name.
9841
9842             Returns:   
9843                 New GEOM.GEOM_Object, containing the created vertex.
9844             """
9845             # Example: see GEOM_TestMeasures.py
9846             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
9847             # note: auto-publishing is done in self.GetVertexByIndex()
9848             anObj = self.GetVertexByIndex(theShape, (nb_vert-1), theName)
9849             RaiseIfFailed("GetLastVertex", self.MeasuOp)
9850             return anObj
9851
9852         ## Get a normale to the given face. If the point is not given,
9853         #  the normale is calculated at the center of mass.
9854         #  @param theFace Face to define normale of.
9855         #  @param theOptionalPoint Point to compute the normale at.
9856         #  @param theName Object name; when specified, this parameter is used
9857         #         for result publication in the study. Otherwise, if automatic
9858         #         publication is switched on, default value is used for result name.
9859         #
9860         #  @return New GEOM.GEOM_Object, containing the created vector.
9861         #
9862         #  @ref swig_todo "Example"
9863         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
9864             """
9865             Get a normale to the given face. If the point is not given,
9866             the normale is calculated at the center of mass.
9867             
9868             Parameters: 
9869                 theFace Face to define normale of.
9870                 theOptionalPoint Point to compute the normale at.
9871                 theName Object name; when specified, this parameter is used
9872                         for result publication in the study. Otherwise, if automatic
9873                         publication is switched on, default value is used for result name.
9874
9875             Returns:   
9876                 New GEOM.GEOM_Object, containing the created vector.
9877             """
9878             # Example: see GEOM_TestMeasures.py
9879             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
9880             RaiseIfFailed("GetNormal", self.MeasuOp)
9881             self._autoPublish(anObj, theName, "normal")
9882             return anObj
9883
9884         ## Check a topology of the given shape.
9885         #  @param theShape Shape to check validity of.
9886         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
9887         #                        if TRUE, the shape's geometry will be checked also.
9888         #  @param theReturnStatus If FALSE and if theShape is invalid, a description \n
9889         #                        of problem is printed.
9890         #                        if TRUE and if theShape is invalid, the description 
9891         #                        of problem is also returned.
9892         #  @return TRUE, if the shape "seems to be valid".
9893         #
9894         #  @ref tui_measurement_tools_page "Example"
9895         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
9896             """
9897             Check a topology of the given shape.
9898
9899             Parameters: 
9900                 theShape Shape to check validity of.
9901                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
9902                                if TRUE, the shape's geometry will be checked also.
9903                 theReturnStatus If FALSE and if theShape is invalid, a description
9904                                 of problem is printed.
9905                                 if TRUE and if theShape is invalid, the description 
9906                                 of problem is returned.
9907
9908             Returns:   
9909                 TRUE, if the shape "seems to be valid".
9910                 If theShape is invalid, prints a description of problem.
9911                 This description can also be returned.
9912             """
9913             # Example: see GEOM_TestMeasures.py
9914             if theIsCheckGeom:
9915                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
9916                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
9917             else:
9918                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
9919                 RaiseIfFailed("CheckShape", self.MeasuOp)
9920             if IsValid == 0:
9921                 if theReturnStatus == 0:
9922                     print Status
9923             if theReturnStatus == 1:
9924               return (IsValid, Status)
9925             return IsValid
9926
9927         ## Detect self-intersections in the given shape.
9928         #  @param theShape Shape to check.
9929         #  @return TRUE, if the shape contains no self-intersections.
9930         #
9931         #  @ref tui_measurement_tools_page "Example"
9932         def CheckSelfIntersections(self, theShape):
9933             """
9934             Detect self-intersections in the given shape.
9935
9936             Parameters: 
9937                 theShape Shape to check.
9938
9939             Returns:   
9940                 TRUE, if the shape contains no self-intersections.
9941             """
9942             # Example: see GEOM_TestMeasures.py
9943             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
9944             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
9945             return IsValid
9946
9947         ## Get position (LCS) of theShape.
9948         #
9949         #  Origin of the LCS is situated at the shape's center of mass.
9950         #  Axes of the LCS are obtained from shape's location or,
9951         #  if the shape is a planar face, from position of its plane.
9952         #
9953         #  @param theShape Shape to calculate position of.
9954         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9955         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
9956         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9957         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9958         #
9959         #  @ref swig_todo "Example"
9960         def GetPosition(self,theShape):
9961             """
9962             Get position (LCS) of theShape.
9963             Origin of the LCS is situated at the shape's center of mass.
9964             Axes of the LCS are obtained from shape's location or,
9965             if the shape is a planar face, from position of its plane.
9966
9967             Parameters: 
9968                 theShape Shape to calculate position of.
9969
9970             Returns:  
9971                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9972                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
9973                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9974                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9975             """
9976             # Example: see GEOM_TestMeasures.py
9977             aTuple = self.MeasuOp.GetPosition(theShape)
9978             RaiseIfFailed("GetPosition", self.MeasuOp)
9979             return aTuple
9980
9981         ## Get kind of theShape.
9982         #
9983         #  @param theShape Shape to get a kind of.
9984         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
9985         #          and a list of parameters, describing the shape.
9986         #  @note  Concrete meaning of each value, returned via \a theIntegers
9987         #         or \a theDoubles list depends on the kind() of the shape.
9988         #
9989         #  @ref swig_todo "Example"
9990         def KindOfShape(self,theShape):
9991             """
9992             Get kind of theShape.
9993          
9994             Parameters: 
9995                 theShape Shape to get a kind of.
9996
9997             Returns:
9998                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
9999                     and a list of parameters, describing the shape.
10000             Note:
10001                 Concrete meaning of each value, returned via theIntegers
10002                 or theDoubles list depends on the geompy.kind of the shape
10003             """
10004             # Example: see GEOM_TestMeasures.py
10005             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
10006             RaiseIfFailed("KindOfShape", self.MeasuOp)
10007
10008             aKind  = aRoughTuple[0]
10009             anInts = aRoughTuple[1]
10010             aDbls  = aRoughTuple[2]
10011
10012             # Now there is no exception from this rule:
10013             aKindTuple = [aKind] + aDbls + anInts
10014
10015             # If they are we will regroup parameters for such kind of shape.
10016             # For example:
10017             #if aKind == kind.SOME_KIND:
10018             #    #  SOME_KIND     int int double int double double
10019             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
10020
10021             return aKindTuple
10022
10023         # end of l2_measure
10024         ## @}
10025
10026         ## @addtogroup l2_import_export
10027         ## @{
10028
10029         ## Import a shape from the BREP or IGES or STEP file
10030         #  (depends on given format) with given name.
10031         #  @param theFileName The file, containing the shape.
10032         #  @param theFormatName Specify format for the file reading.
10033         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
10034         #         If format 'IGES_SCALE' is used instead of 'IGES' or
10035         #            format 'STEP_SCALE' is used instead of 'STEP',
10036         #            length unit will be set to 'meter' and result model will be scaled.
10037         #  @param theName Object name; when specified, this parameter is used
10038         #         for result publication in the study. Otherwise, if automatic
10039         #         publication is switched on, default value is used for result name.
10040         #
10041         #  @return New GEOM.GEOM_Object, containing the imported shape.
10042         #
10043         #  @ref swig_Import_Export "Example"
10044         def ImportFile(self, theFileName, theFormatName, theName=None):
10045             """
10046             Import a shape from the BREP or IGES or STEP file
10047             (depends on given format) with given name.
10048
10049             Parameters: 
10050                 theFileName The file, containing the shape.
10051                 theFormatName Specify format for the file reading.
10052                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
10053                     If format 'IGES_SCALE' is used instead of 'IGES' or
10054                        format 'STEP_SCALE' is used instead of 'STEP',
10055                        length unit will be set to 'meter' and result model will be scaled.
10056                 theName Object name; when specified, this parameter is used
10057                         for result publication in the study. Otherwise, if automatic
10058                         publication is switched on, default value is used for result name.
10059
10060             Returns:
10061                 New GEOM.GEOM_Object, containing the imported shape.
10062             """
10063             # Example: see GEOM_TestOthers.py
10064             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
10065             RaiseIfFailed("ImportFile", self.InsertOp)
10066             self._autoPublish(anObj, theName, "imported")
10067             return anObj
10068
10069         ## Deprecated analog of ImportFile()
10070         def Import(self, theFileName, theFormatName, theName=None):
10071             """
10072             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
10073             """
10074             print "WARNING: Function Import is deprecated, use ImportFile instead"
10075             # note: auto-publishing is done in self.ImportFile()
10076             return self.ImportFile(theFileName, theFormatName, theName)
10077
10078         ## Shortcut to ImportFile() for BREP format.
10079         #  Import a shape from the BREP file with given name.
10080         #  @param theFileName The file, containing the shape.
10081         #  @param theName Object name; when specified, this parameter is used
10082         #         for result publication in the study. Otherwise, if automatic
10083         #         publication is switched on, default value is used for result name.
10084         #
10085         #  @return New GEOM.GEOM_Object, containing the imported shape.
10086         #
10087         #  @ref swig_Import_Export "Example"
10088         def ImportBREP(self, theFileName, theName=None):
10089             """
10090             geompy.ImportFile(...) function for BREP format
10091             Import a shape from the BREP file with given name.
10092
10093             Parameters: 
10094                 theFileName The file, containing the shape.
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.GEOM_Object, containing the imported shape.
10101             """
10102             # Example: see GEOM_TestOthers.py
10103             # note: auto-publishing is done in self.ImportFile()
10104             return self.ImportFile(theFileName, "BREP", theName)
10105
10106         ## Shortcut to ImportFile() for IGES format
10107         #  Import a shape from the IGES file with given name.
10108         #  @param theFileName The file, containing the shape.
10109         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10110         #                     and result model will be scaled, if its units are not meters.
10111         #                     If False (default), file length units will be taken into account.
10112         #  @param theName Object name; when specified, this parameter is used
10113         #         for result publication in the study. Otherwise, if automatic
10114         #         publication is switched on, default value is used for result name.
10115         #
10116         #  @return New GEOM.GEOM_Object, containing the imported shape.
10117         #
10118         #  @ref swig_Import_Export "Example"
10119         def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
10120             """
10121             geompy.ImportFile(...) function for IGES format
10122
10123             Parameters:
10124                 theFileName The file, containing the shape.
10125                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10126                             and result model will be scaled, if its units are not meters.
10127                             If False (default), file length units will be taken into account.
10128                 theName Object name; when specified, this parameter is used
10129                         for result publication in the study. Otherwise, if automatic
10130                         publication is switched on, default value is used for result name.
10131
10132             Returns:
10133                 New GEOM.GEOM_Object, containing the imported shape.
10134             """
10135             # Example: see GEOM_TestOthers.py
10136             # note: auto-publishing is done in self.ImportFile()
10137             if ignoreUnits:
10138                 return self.ImportFile(theFileName, "IGES_SCALE", theName)
10139             return self.ImportFile(theFileName, "IGES", theName)
10140
10141         ## Return length unit from given IGES file
10142         #  @param theFileName The file, containing the shape.
10143         #  @return String, containing the units name.
10144         #
10145         #  @ref swig_Import_Export "Example"
10146         def GetIGESUnit(self, theFileName):
10147             """
10148             Return length units from given IGES file
10149
10150             Parameters:
10151                 theFileName The file, containing the shape.
10152
10153             Returns:
10154                 String, containing the units name.
10155             """
10156             # Example: see GEOM_TestOthers.py
10157             aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
10158             return aUnitName
10159
10160         ## Shortcut to ImportFile() for STEP format
10161         #  Import a shape from the STEP file with given name.
10162         #  @param theFileName The file, containing the shape.
10163         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10164         #                     and result model will be scaled, if its units are not meters.
10165         #                     If False (default), file length units will be taken into account.
10166         #  @param theName Object name; when specified, this parameter is used
10167         #         for result publication in the study. Otherwise, if automatic
10168         #         publication is switched on, default value is used for result name.
10169         #
10170         #  @return New GEOM.GEOM_Object, containing the imported shape.
10171         #
10172         #  @ref swig_Import_Export "Example"
10173         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
10174             """
10175             geompy.ImportFile(...) function for STEP format
10176
10177             Parameters:
10178                 theFileName The file, containing the shape.
10179                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10180                             and result model will be scaled, if its units are not meters.
10181                             If False (default), file length units will be taken into account.
10182                 theName Object name; when specified, this parameter is used
10183                         for result publication in the study. Otherwise, if automatic
10184                         publication is switched on, default value is used for result name.
10185
10186             Returns:
10187                 New GEOM.GEOM_Object, containing the imported shape.
10188             """
10189             # Example: see GEOM_TestOthers.py
10190             # note: auto-publishing is done in self.ImportFile()
10191             if ignoreUnits:
10192                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
10193             return self.ImportFile(theFileName, "STEP", theName)
10194
10195         ## Return length unit from given IGES or STEP file
10196         #  @param theFileName The file, containing the shape.
10197         #  @return String, containing the units name.
10198         #
10199         #  @ref swig_Import_Export "Example"
10200         def GetSTEPUnit(self, theFileName):
10201             """
10202             Return length units from given STEP file
10203
10204             Parameters:
10205                 theFileName The file, containing the shape.
10206
10207             Returns:
10208                 String, containing the units name.
10209             """
10210             # Example: see GEOM_TestOthers.py
10211             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
10212             return aUnitName
10213
10214         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10215         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10216         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10217         #  @param theStream The BRep binary stream.
10218         #  @param theName Object name; when specified, this parameter is used
10219         #         for result publication in the study. Otherwise, if automatic
10220         #         publication is switched on, default value is used for result name.
10221         #
10222         #  @return New GEOM_Object, containing the shape, read from theStream.
10223         #
10224         #  @ref swig_Import_Export "Example"
10225         def RestoreShape (self, theStream, theName=None):
10226             """
10227             Read a shape from the binary stream, containing its bounding representation (BRep).
10228
10229             Note:
10230                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10231
10232             Parameters: 
10233                 theStream The BRep binary stream.
10234                 theName Object name; when specified, this parameter is used
10235                         for result publication in the study. Otherwise, if automatic
10236                         publication is switched on, default value is used for result name.
10237
10238             Returns:
10239                 New GEOM_Object, containing the shape, read from theStream.
10240             """
10241             # Example: see GEOM_TestOthers.py
10242             anObj = self.InsertOp.RestoreShape(theStream)
10243             RaiseIfFailed("RestoreShape", self.InsertOp)
10244             self._autoPublish(anObj, theName, "restored")
10245             return anObj
10246
10247         ## Export the given shape into a file with given name.
10248         #  @param theObject Shape to be stored in the file.
10249         #  @param theFileName Name of the file to store the given shape in.
10250         #  @param theFormatName Specify format for the shape storage.
10251         #         Available formats can be obtained with
10252         #         geompy.InsertOp.ExportTranslators()[0] method.
10253         #
10254         #  @ref swig_Import_Export "Example"
10255         def Export(self, theObject, theFileName, theFormatName):
10256             """
10257             Export the given shape into a file with given name.
10258
10259             Parameters: 
10260                 theObject Shape to be stored in the file.
10261                 theFileName Name of the file to store the given shape in.
10262                 theFormatName Specify format for the shape storage.
10263                               Available formats can be obtained with
10264                               geompy.InsertOp.ExportTranslators()[0] method.
10265             """
10266             # Example: see GEOM_TestOthers.py
10267             self.InsertOp.Export(theObject, theFileName, theFormatName)
10268             if self.InsertOp.IsDone() == 0:
10269                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10270                 pass
10271             pass
10272
10273         ## Shortcut to Export() for BREP format
10274         #
10275         #  @ref swig_Import_Export "Example"
10276         def ExportBREP(self,theObject, theFileName):
10277             """
10278             geompy.Export(...) function for BREP format
10279             """
10280             # Example: see GEOM_TestOthers.py
10281             return self.Export(theObject, theFileName, "BREP")
10282
10283         ## Shortcut to Export() for IGES format
10284         #
10285         #  @ref swig_Import_Export "Example"
10286         def ExportIGES(self,theObject, theFileName):
10287             """
10288             geompy.Export(...) function for IGES format
10289             """
10290             # Example: see GEOM_TestOthers.py
10291             return self.Export(theObject, theFileName, "IGES")
10292
10293         ## Shortcut to Export() for STEP format
10294         #
10295         #  @ref swig_Import_Export "Example"
10296         def ExportSTEP(self,theObject, theFileName):
10297             """
10298             geompy.Export(...) function for STEP format
10299             """
10300             # Example: see GEOM_TestOthers.py
10301             return self.Export(theObject, theFileName, "STEP")
10302
10303         # end of l2_import_export
10304         ## @}
10305
10306         ## @addtogroup l3_blocks
10307         ## @{
10308
10309         ## Create a quadrangle face from four edges. Order of Edges is not
10310         #  important. It is  not necessary that edges share the same vertex.
10311         #  @param E1,E2,E3,E4 Edges for the face bound.
10312         #  @param theName Object name; when specified, this parameter is used
10313         #         for result publication in the study. Otherwise, if automatic
10314         #         publication is switched on, default value is used for result name.
10315         #
10316         #  @return New GEOM.GEOM_Object, containing the created face.
10317         #
10318         #  @ref tui_building_by_blocks_page "Example"
10319         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10320             """
10321             Create a quadrangle face from four edges. Order of Edges is not
10322             important. It is  not necessary that edges share the same vertex.
10323
10324             Parameters: 
10325                 E1,E2,E3,E4 Edges for the face bound.
10326                 theName Object name; when specified, this parameter is used
10327                         for result publication in the study. Otherwise, if automatic
10328                         publication is switched on, default value is used for result name.
10329
10330             Returns: 
10331                 New GEOM.GEOM_Object, containing the created face.
10332
10333             Example of usage:               
10334                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10335             """
10336             # Example: see GEOM_Spanner.py
10337             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10338             RaiseIfFailed("MakeQuad", self.BlocksOp)
10339             self._autoPublish(anObj, theName, "quad")
10340             return anObj
10341
10342         ## Create a quadrangle face on two edges.
10343         #  The missing edges will be built by creating the shortest ones.
10344         #  @param E1,E2 Two opposite edges for the face.
10345         #  @param theName Object name; when specified, this parameter is used
10346         #         for result publication in the study. Otherwise, if automatic
10347         #         publication is switched on, default value is used for result name.
10348         #
10349         #  @return New GEOM.GEOM_Object, containing the created face.
10350         #
10351         #  @ref tui_building_by_blocks_page "Example"
10352         def MakeQuad2Edges(self, E1, E2, theName=None):
10353             """
10354             Create a quadrangle face on two edges.
10355             The missing edges will be built by creating the shortest ones.
10356
10357             Parameters: 
10358                 E1,E2 Two opposite edges for the face.
10359                 theName Object name; when specified, this parameter is used
10360                         for result publication in the study. Otherwise, if automatic
10361                         publication is switched on, default value is used for result name.
10362
10363             Returns: 
10364                 New GEOM.GEOM_Object, containing the created face.
10365             
10366             Example of usage:
10367                 # create vertices
10368                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10369                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10370                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10371                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10372                 # create edges
10373                 edge1 = geompy.MakeEdge(p1, p2)
10374                 edge2 = geompy.MakeEdge(p3, p4)
10375                 # create a quadrangle face from two edges
10376                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10377             """
10378             # Example: see GEOM_Spanner.py
10379             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10380             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10381             self._autoPublish(anObj, theName, "quad")
10382             return anObj
10383
10384         ## Create a quadrangle face with specified corners.
10385         #  The missing edges will be built by creating the shortest ones.
10386         #  @param V1,V2,V3,V4 Corner vertices for the face.
10387         #  @param theName Object name; when specified, this parameter is used
10388         #         for result publication in the study. Otherwise, if automatic
10389         #         publication is switched on, default value is used for result name.
10390         #
10391         #  @return New GEOM.GEOM_Object, containing the created face.
10392         #
10393         #  @ref tui_building_by_blocks_page "Example 1"
10394         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10395         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10396             """
10397             Create a quadrangle face with specified corners.
10398             The missing edges will be built by creating the shortest ones.
10399
10400             Parameters: 
10401                 V1,V2,V3,V4 Corner vertices for the face.
10402                 theName Object name; when specified, this parameter is used
10403                         for result publication in the study. Otherwise, if automatic
10404                         publication is switched on, default value is used for result name.
10405
10406             Returns: 
10407                 New GEOM.GEOM_Object, containing the created face.
10408
10409             Example of usage:
10410                 # create vertices
10411                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10412                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10413                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10414                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10415                 # create a quadrangle from four points in its corners
10416                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10417             """
10418             # Example: see GEOM_Spanner.py
10419             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10420             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10421             self._autoPublish(anObj, theName, "quad")
10422             return anObj
10423
10424         ## Create a hexahedral solid, bounded by the six given faces. Order of
10425         #  faces is not important. It is  not necessary that Faces share the same edge.
10426         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10427         #  @param theName Object name; when specified, this parameter is used
10428         #         for result publication in the study. Otherwise, if automatic
10429         #         publication is switched on, default value is used for result name.
10430         #
10431         #  @return New GEOM.GEOM_Object, containing the created solid.
10432         #
10433         #  @ref tui_building_by_blocks_page "Example 1"
10434         #  \n @ref swig_MakeHexa "Example 2"
10435         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
10436             """
10437             Create a hexahedral solid, bounded by the six given faces. Order of
10438             faces is not important. It is  not necessary that Faces share the same edge.
10439
10440             Parameters: 
10441                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10442                 theName Object name; when specified, this parameter is used
10443                         for result publication in the study. Otherwise, if automatic
10444                         publication is switched on, default value is used for result name.
10445
10446             Returns:    
10447                 New GEOM.GEOM_Object, containing the created solid.
10448
10449             Example of usage:
10450                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
10451             """
10452             # Example: see GEOM_Spanner.py
10453             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
10454             RaiseIfFailed("MakeHexa", self.BlocksOp)
10455             self._autoPublish(anObj, theName, "hexa")
10456             return anObj
10457
10458         ## Create a hexahedral solid between two given faces.
10459         #  The missing faces will be built by creating the smallest ones.
10460         #  @param F1,F2 Two opposite faces for the hexahedral solid.
10461         #  @param theName Object name; when specified, this parameter is used
10462         #         for result publication in the study. Otherwise, if automatic
10463         #         publication is switched on, default value is used for result name.
10464         #
10465         #  @return New GEOM.GEOM_Object, containing the created solid.
10466         #
10467         #  @ref tui_building_by_blocks_page "Example 1"
10468         #  \n @ref swig_MakeHexa2Faces "Example 2"
10469         def MakeHexa2Faces(self, F1, F2, theName=None):
10470             """
10471             Create a hexahedral solid between two given faces.
10472             The missing faces will be built by creating the smallest ones.
10473
10474             Parameters: 
10475                 F1,F2 Two opposite faces for the hexahedral solid.
10476                 theName Object name; when specified, this parameter is used
10477                         for result publication in the study. Otherwise, if automatic
10478                         publication is switched on, default value is used for result name.
10479
10480             Returns:
10481                 New GEOM.GEOM_Object, containing the created solid.
10482
10483             Example of usage:
10484                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
10485             """
10486             # Example: see GEOM_Spanner.py
10487             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
10488             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
10489             self._autoPublish(anObj, theName, "hexa")
10490             return anObj
10491
10492         # end of l3_blocks
10493         ## @}
10494
10495         ## @addtogroup l3_blocks_op
10496         ## @{
10497
10498         ## Get a vertex, found in the given shape by its coordinates.
10499         #  @param theShape Block or a compound of blocks.
10500         #  @param theX,theY,theZ Coordinates of the sought vertex.
10501         #  @param theEpsilon Maximum allowed distance between the resulting
10502         #                    vertex and point with the given coordinates.
10503         #  @param theName Object name; when specified, this parameter is used
10504         #         for result publication in the study. Otherwise, if automatic
10505         #         publication is switched on, default value is used for result name.
10506         #
10507         #  @return New GEOM.GEOM_Object, containing the found vertex.
10508         #
10509         #  @ref swig_GetPoint "Example"
10510         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
10511             """
10512             Get a vertex, found in the given shape by its coordinates.
10513
10514             Parameters: 
10515                 theShape Block or a compound of blocks.
10516                 theX,theY,theZ Coordinates of the sought vertex.
10517                 theEpsilon Maximum allowed distance between the resulting
10518                            vertex and point with the given coordinates.
10519                 theName Object name; when specified, this parameter is used
10520                         for result publication in the study. Otherwise, if automatic
10521                         publication is switched on, default value is used for result name.
10522
10523             Returns:                  
10524                 New GEOM.GEOM_Object, containing the found vertex.
10525
10526             Example of usage:
10527                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
10528             """
10529             # Example: see GEOM_TestOthers.py
10530             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
10531             RaiseIfFailed("GetPoint", self.BlocksOp)
10532             self._autoPublish(anObj, theName, "vertex")
10533             return anObj
10534
10535         ## Find a vertex of the given shape, which has minimal distance to the given point.
10536         #  @param theShape Any shape.
10537         #  @param thePoint Point, close to the desired vertex.
10538         #  @param theName Object name; when specified, this parameter is used
10539         #         for result publication in the study. Otherwise, if automatic
10540         #         publication is switched on, default value is used for result name.
10541         #
10542         #  @return New GEOM.GEOM_Object, containing the found vertex.
10543         #
10544         #  @ref swig_GetVertexNearPoint "Example"
10545         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
10546             """
10547             Find a vertex of the given shape, which has minimal distance to the given point.
10548
10549             Parameters: 
10550                 theShape Any shape.
10551                 thePoint Point, close to the desired vertex.
10552                 theName Object name; when specified, this parameter is used
10553                         for result publication in the study. Otherwise, if automatic
10554                         publication is switched on, default value is used for result name.
10555
10556             Returns:
10557                 New GEOM.GEOM_Object, containing the found vertex.
10558
10559             Example of usage:
10560                 pmidle = geompy.MakeVertex(50, 0, 50)
10561                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
10562             """
10563             # Example: see GEOM_TestOthers.py
10564             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
10565             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
10566             self._autoPublish(anObj, theName, "vertex")
10567             return anObj
10568
10569         ## Get an edge, found in the given shape by two given vertices.
10570         #  @param theShape Block or a compound of blocks.
10571         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
10572         #  @param theName Object name; when specified, this parameter is used
10573         #         for result publication in the study. Otherwise, if automatic
10574         #         publication is switched on, default value is used for result name.
10575         #
10576         #  @return New GEOM.GEOM_Object, containing the found edge.
10577         #
10578         #  @ref swig_GetEdge "Example"
10579         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
10580             """
10581             Get an edge, found in the given shape by two given vertices.
10582
10583             Parameters: 
10584                 theShape Block or a compound of blocks.
10585                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
10586                 theName Object name; when specified, this parameter is used
10587                         for result publication in the study. Otherwise, if automatic
10588                         publication is switched on, default value is used for result name.
10589
10590             Returns:
10591                 New GEOM.GEOM_Object, containing the found edge.
10592             """
10593             # Example: see GEOM_Spanner.py
10594             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
10595             RaiseIfFailed("GetEdge", self.BlocksOp)
10596             self._autoPublish(anObj, theName, "edge")
10597             return anObj
10598
10599         ## Find an edge of the given shape, which has minimal distance to the given point.
10600         #  @param theShape Block or a compound of blocks.
10601         #  @param thePoint Point, close to the desired edge.
10602         #  @param theName Object name; when specified, this parameter is used
10603         #         for result publication in the study. Otherwise, if automatic
10604         #         publication is switched on, default value is used for result name.
10605         #
10606         #  @return New GEOM.GEOM_Object, containing the found edge.
10607         #
10608         #  @ref swig_GetEdgeNearPoint "Example"
10609         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
10610             """
10611             Find an edge of the given shape, which has minimal distance to the given point.
10612
10613             Parameters: 
10614                 theShape Block or a compound of blocks.
10615                 thePoint Point, close to the desired edge.
10616                 theName Object name; when specified, this parameter is used
10617                         for result publication in the study. Otherwise, if automatic
10618                         publication is switched on, default value is used for result name.
10619
10620             Returns:
10621                 New GEOM.GEOM_Object, containing the found edge.
10622             """
10623             # Example: see GEOM_TestOthers.py
10624             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
10625             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
10626             self._autoPublish(anObj, theName, "edge")
10627             return anObj
10628
10629         ## Returns a face, found in the given shape by four given corner vertices.
10630         #  @param theShape Block or a compound of blocks.
10631         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10632         #  @param theName Object name; when specified, this parameter is used
10633         #         for result publication in the study. Otherwise, if automatic
10634         #         publication is switched on, default value is used for result name.
10635         #
10636         #  @return New GEOM.GEOM_Object, containing the found face.
10637         #
10638         #  @ref swig_todo "Example"
10639         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
10640             """
10641             Returns a face, found in the given shape by four given corner vertices.
10642
10643             Parameters:
10644                 theShape Block or a compound of blocks.
10645                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10646                 theName Object name; when specified, this parameter is used
10647                         for result publication in the study. Otherwise, if automatic
10648                         publication is switched on, default value is used for result name.
10649
10650             Returns:
10651                 New GEOM.GEOM_Object, containing the found face.
10652             """
10653             # Example: see GEOM_Spanner.py
10654             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
10655             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
10656             self._autoPublish(anObj, theName, "face")
10657             return anObj
10658
10659         ## Get a face of block, found in the given shape by two given edges.
10660         #  @param theShape Block or a compound of blocks.
10661         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
10662         #  @param theName Object name; when specified, this parameter is used
10663         #         for result publication in the study. Otherwise, if automatic
10664         #         publication is switched on, default value is used for result name.
10665         #
10666         #  @return New GEOM.GEOM_Object, containing the found face.
10667         #
10668         #  @ref swig_todo "Example"
10669         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
10670             """
10671             Get a face of block, found in the given shape by two given edges.
10672
10673             Parameters:
10674                 theShape Block or a compound of blocks.
10675                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
10676                 theName Object name; when specified, this parameter is used
10677                         for result publication in the study. Otherwise, if automatic
10678                         publication is switched on, default value is used for result name.
10679
10680             Returns:
10681                 New GEOM.GEOM_Object, containing the found face.
10682             """
10683             # Example: see GEOM_Spanner.py
10684             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
10685             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
10686             self._autoPublish(anObj, theName, "face")
10687             return anObj
10688
10689         ## Find a face, opposite to the given one in the given block.
10690         #  @param theBlock Must be a hexahedral solid.
10691         #  @param theFace Face of \a theBlock, opposite to the desired face.
10692         #  @param theName Object name; when specified, this parameter is used
10693         #         for result publication in the study. Otherwise, if automatic
10694         #         publication is switched on, default value is used for result name.
10695         #
10696         #  @return New GEOM.GEOM_Object, containing the found face.
10697         #
10698         #  @ref swig_GetOppositeFace "Example"
10699         def GetOppositeFace(self, theBlock, theFace, theName=None):
10700             """
10701             Find a face, opposite to the given one in the given block.
10702
10703             Parameters:
10704                 theBlock Must be a hexahedral solid.
10705                 theFace Face of theBlock, opposite to the desired face.
10706                 theName Object name; when specified, this parameter is used
10707                         for result publication in the study. Otherwise, if automatic
10708                         publication is switched on, default value is used for result name.
10709
10710             Returns: 
10711                 New GEOM.GEOM_Object, containing the found face.
10712             """
10713             # Example: see GEOM_Spanner.py
10714             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
10715             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
10716             self._autoPublish(anObj, theName, "face")
10717             return anObj
10718
10719         ## Find a face of the given shape, which has minimal distance to the given point.
10720         #  @param theShape Block or a compound of blocks.
10721         #  @param thePoint Point, close to the desired face.
10722         #  @param theName Object name; when specified, this parameter is used
10723         #         for result publication in the study. Otherwise, if automatic
10724         #         publication is switched on, default value is used for result name.
10725         #
10726         #  @return New GEOM.GEOM_Object, containing the found face.
10727         #
10728         #  @ref swig_GetFaceNearPoint "Example"
10729         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
10730             """
10731             Find a face of the given shape, which has minimal distance to the given point.
10732
10733             Parameters:
10734                 theShape Block or a compound of blocks.
10735                 thePoint Point, close to the desired face.
10736                 theName Object name; when specified, this parameter is used
10737                         for result publication in the study. Otherwise, if automatic
10738                         publication is switched on, default value is used for result name.
10739
10740             Returns:
10741                 New GEOM.GEOM_Object, containing the found face.
10742             """
10743             # Example: see GEOM_Spanner.py
10744             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
10745             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
10746             self._autoPublish(anObj, theName, "face")
10747             return anObj
10748
10749         ## Find a face of block, whose outside normale has minimal angle with the given vector.
10750         #  @param theBlock Block or a compound of blocks.
10751         #  @param theVector Vector, close to the normale of the desired face.
10752         #  @param theName Object name; when specified, this parameter is used
10753         #         for result publication in the study. Otherwise, if automatic
10754         #         publication is switched on, default value is used for result name.
10755         #
10756         #  @return New GEOM.GEOM_Object, containing the found face.
10757         #
10758         #  @ref swig_todo "Example"
10759         def GetFaceByNormale(self, theBlock, theVector, theName=None):
10760             """
10761             Find a face of block, whose outside normale has minimal angle with the given vector.
10762
10763             Parameters:
10764                 theBlock Block or a compound of blocks.
10765                 theVector Vector, close to the normale of the desired face.
10766                 theName Object name; when specified, this parameter is used
10767                         for result publication in the study. Otherwise, if automatic
10768                         publication is switched on, default value is used for result name.
10769
10770             Returns:
10771                 New GEOM.GEOM_Object, containing the found face.
10772             """
10773             # Example: see GEOM_Spanner.py
10774             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
10775             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
10776             self._autoPublish(anObj, theName, "face")
10777             return anObj
10778
10779         ## Find all sub-shapes of type \a theShapeType of the given shape,
10780         #  which have minimal distance to the given point.
10781         #  @param theShape Any shape.
10782         #  @param thePoint Point, close to the desired shape.
10783         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
10784         #  @param theTolerance The tolerance for distances comparison. All shapes
10785         #                      with distances to the given point in interval
10786         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
10787         #  @param theName Object name; when specified, this parameter is used
10788         #         for result publication in the study. Otherwise, if automatic
10789         #         publication is switched on, default value is used for result name.
10790         #
10791         #  @return New GEOM_Object, containing a group of all found shapes.
10792         #
10793         #  @ref swig_GetShapesNearPoint "Example"
10794         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
10795             """
10796             Find all sub-shapes of type theShapeType of the given shape,
10797             which have minimal distance to the given point.
10798
10799             Parameters:
10800                 theShape Any shape.
10801                 thePoint Point, close to the desired shape.
10802                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
10803                 theTolerance The tolerance for distances comparison. All shapes
10804                                 with distances to the given point in interval
10805                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
10806                 theName Object name; when specified, this parameter is used
10807                         for result publication in the study. Otherwise, if automatic
10808                         publication is switched on, default value is used for result name.
10809
10810             Returns:
10811                 New GEOM_Object, containing a group of all found shapes.
10812             """
10813             # Example: see GEOM_TestOthers.py
10814             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
10815             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
10816             self._autoPublish(anObj, theName, "group")
10817             return anObj
10818
10819         # end of l3_blocks_op
10820         ## @}
10821
10822         ## @addtogroup l4_blocks_measure
10823         ## @{
10824
10825         ## Check, if the compound of blocks is given.
10826         #  To be considered as a compound of blocks, the
10827         #  given shape must satisfy the following conditions:
10828         #  - Each element of the compound should be a Block (6 faces and 12 edges).
10829         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10830         #  - The compound should be connexe.
10831         #  - The glue between two quadrangle faces should be applied.
10832         #  @param theCompound The compound to check.
10833         #  @return TRUE, if the given shape is a compound of blocks.
10834         #  If theCompound is not valid, prints all discovered errors.
10835         #
10836         #  @ref tui_measurement_tools_page "Example 1"
10837         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
10838         def CheckCompoundOfBlocks(self,theCompound):
10839             """
10840             Check, if the compound of blocks is given.
10841             To be considered as a compound of blocks, the
10842             given shape must satisfy the following conditions:
10843             - Each element of the compound should be a Block (6 faces and 12 edges).
10844             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10845             - The compound should be connexe.
10846             - The glue between two quadrangle faces should be applied.
10847
10848             Parameters:
10849                 theCompound The compound to check.
10850
10851             Returns:
10852                 TRUE, if the given shape is a compound of blocks.
10853                 If theCompound is not valid, prints all discovered errors.            
10854             """
10855             # Example: see GEOM_Spanner.py
10856             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
10857             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
10858             if IsValid == 0:
10859                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
10860                 print Descr
10861             return IsValid
10862
10863         ## Retrieve all non blocks solids and faces from \a theShape.
10864         #  @param theShape The shape to explore.
10865         #  @param theName Object name; when specified, this parameter is used
10866         #         for result publication in the study. Otherwise, if automatic
10867         #         publication is switched on, default value is used for result name.
10868         #
10869         #  @return A tuple of two GEOM_Objects. The first object is a group of all
10870         #          non block solids (= not 6 faces, or with 6 faces, but with the
10871         #          presence of non-quadrangular faces). The second object is a
10872         #          group of all non quadrangular faces.
10873         #
10874         #  @ref tui_measurement_tools_page "Example 1"
10875         #  \n @ref swig_GetNonBlocks "Example 2"
10876         def GetNonBlocks (self, theShape, theName=None):
10877             """
10878             Retrieve all non blocks solids and faces from theShape.
10879
10880             Parameters:
10881                 theShape The shape to explore.
10882                 theName Object name; when specified, this parameter is used
10883                         for result publication in the study. Otherwise, if automatic
10884                         publication is switched on, default value is used for result name.
10885
10886             Returns:
10887                 A tuple of two GEOM_Objects. The first object is a group of all
10888                 non block solids (= not 6 faces, or with 6 faces, but with the
10889                 presence of non-quadrangular faces). The second object is a
10890                 group of all non quadrangular faces.
10891
10892             Usage:
10893                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
10894             """
10895             # Example: see GEOM_Spanner.py
10896             aTuple = self.BlocksOp.GetNonBlocks(theShape)
10897             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
10898             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
10899             return aTuple
10900
10901         ## Remove all seam and degenerated edges from \a theShape.
10902         #  Unite faces and edges, sharing one surface. It means that
10903         #  this faces must have references to one C++ surface object (handle).
10904         #  @param theShape The compound or single solid to remove irregular edges from.
10905         #  @param doUnionFaces If True, then unite faces. If False (the default value),
10906         #         do not unite faces.
10907         #  @param theName Object name; when specified, this parameter is used
10908         #         for result publication in the study. Otherwise, if automatic
10909         #         publication is switched on, default value is used for result name.
10910         #
10911         #  @return Improved shape.
10912         #
10913         #  @ref swig_RemoveExtraEdges "Example"
10914         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
10915             """
10916             Remove all seam and degenerated edges from theShape.
10917             Unite faces and edges, sharing one surface. It means that
10918             this faces must have references to one C++ surface object (handle).
10919
10920             Parameters:
10921                 theShape The compound or single solid to remove irregular edges from.
10922                 doUnionFaces If True, then unite faces. If False (the default value),
10923                              do not unite faces.
10924                 theName Object name; when specified, this parameter is used
10925                         for result publication in the study. Otherwise, if automatic
10926                         publication is switched on, default value is used for result name.
10927
10928             Returns: 
10929                 Improved shape.
10930             """
10931             # Example: see GEOM_TestOthers.py
10932             nbFacesOptimum = -1 # -1 means do not unite faces
10933             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
10934             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
10935             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
10936             self._autoPublish(anObj, theName, "removeExtraEdges")
10937             return anObj
10938
10939         ## Performs union faces of \a theShape
10940         #  Unite faces sharing one surface. It means that
10941         #  these faces must have references to one C++ surface object (handle).
10942         #  @param theShape The compound or single solid that contains faces
10943         #         to perform union.
10944         #  @param theName Object name; when specified, this parameter is used
10945         #         for result publication in the study. Otherwise, if automatic
10946         #         publication is switched on, default value is used for result name.
10947         #
10948         #  @return Improved shape.
10949         #
10950         #  @ref swig_UnionFaces "Example"
10951         def UnionFaces(self, theShape, theName=None):
10952             """
10953             Performs union faces of theShape.
10954             Unite faces sharing one surface. It means that
10955             these faces must have references to one C++ surface object (handle).
10956
10957             Parameters:
10958                 theShape The compound or single solid that contains faces
10959                          to perform union.
10960                 theName Object name; when specified, this parameter is used
10961                         for result publication in the study. Otherwise, if automatic
10962                         publication is switched on, default value is used for result name.
10963
10964             Returns: 
10965                 Improved shape.
10966             """
10967             # Example: see GEOM_TestOthers.py
10968             anObj = self.BlocksOp.UnionFaces(theShape)
10969             RaiseIfFailed("UnionFaces", self.BlocksOp)
10970             self._autoPublish(anObj, theName, "unionFaces")
10971             return anObj
10972
10973         ## Check, if the given shape is a blocks compound.
10974         #  Fix all detected errors.
10975         #    \note Single block can be also fixed by this method.
10976         #  @param theShape The compound to check and improve.
10977         #  @param theName Object name; when specified, this parameter is used
10978         #         for result publication in the study. Otherwise, if automatic
10979         #         publication is switched on, default value is used for result name.
10980         #
10981         #  @return Improved compound.
10982         #
10983         #  @ref swig_CheckAndImprove "Example"
10984         def CheckAndImprove(self, theShape, theName=None):
10985             """
10986             Check, if the given shape is a blocks compound.
10987             Fix all detected errors.
10988
10989             Note:
10990                 Single block can be also fixed by this method.
10991
10992             Parameters:
10993                 theShape The compound to check and improve.
10994                 theName Object name; when specified, this parameter is used
10995                         for result publication in the study. Otherwise, if automatic
10996                         publication is switched on, default value is used for result name.
10997
10998             Returns: 
10999                 Improved compound.
11000             """
11001             # Example: see GEOM_TestOthers.py
11002             anObj = self.BlocksOp.CheckAndImprove(theShape)
11003             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
11004             self._autoPublish(anObj, theName, "improved")
11005             return anObj
11006
11007         # end of l4_blocks_measure
11008         ## @}
11009
11010         ## @addtogroup l3_blocks_op
11011         ## @{
11012
11013         ## Get all the blocks, contained in the given compound.
11014         #  @param theCompound The compound to explode.
11015         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
11016         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
11017         #  @param theName Object name; when specified, this parameter is used
11018         #         for result publication in the study. Otherwise, if automatic
11019         #         publication is switched on, default value is used for result name.
11020         #
11021         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11022         #
11023         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
11024         #
11025         #  @ref tui_explode_on_blocks "Example 1"
11026         #  \n @ref swig_MakeBlockExplode "Example 2"
11027         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
11028             """
11029             Get all the blocks, contained in the given compound.
11030
11031             Parameters:
11032                 theCompound The compound to explode.
11033                 theMinNbFaces If solid has lower number of faces, it is not a block.
11034                 theMaxNbFaces If solid has higher number of faces, it is not a block.
11035                 theName Object name; when specified, this parameter is used
11036                         for result publication in the study. Otherwise, if automatic
11037                         publication is switched on, default value is used for result name.
11038
11039             Note:
11040                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11041
11042             Returns:  
11043                 List of GEOM.GEOM_Object, containing the retrieved blocks.
11044             """
11045             # Example: see GEOM_TestOthers.py
11046             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
11047             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
11048             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
11049             for anObj in aList:
11050                 anObj.SetParameters(Parameters)
11051                 pass
11052             self._autoPublish(aList, theName, "block")
11053             return aList
11054
11055         ## Find block, containing the given point inside its volume or on boundary.
11056         #  @param theCompound Compound, to find block in.
11057         #  @param thePoint Point, close to the desired block. If the point lays on
11058         #         boundary between some blocks, we return block with nearest center.
11059         #  @param theName Object name; when specified, this parameter is used
11060         #         for result publication in the study. Otherwise, if automatic
11061         #         publication is switched on, default value is used for result name.
11062         #
11063         #  @return New GEOM.GEOM_Object, containing the found block.
11064         #
11065         #  @ref swig_todo "Example"
11066         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
11067             """
11068             Find block, containing the given point inside its volume or on boundary.
11069
11070             Parameters:
11071                 theCompound Compound, to find block in.
11072                 thePoint Point, close to the desired block. If the point lays on
11073                          boundary between some blocks, we return block with nearest center.
11074                 theName Object name; when specified, this parameter is used
11075                         for result publication in the study. Otherwise, if automatic
11076                         publication is switched on, default value is used for result name.
11077
11078             Returns:
11079                 New GEOM.GEOM_Object, containing the found block.
11080             """
11081             # Example: see GEOM_Spanner.py
11082             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
11083             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
11084             self._autoPublish(anObj, theName, "block")
11085             return anObj
11086
11087         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11088         #  @param theCompound Compound, to find block in.
11089         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
11090         #  @param theName Object name; when specified, this parameter is used
11091         #         for result publication in the study. Otherwise, if automatic
11092         #         publication is switched on, default value is used for result name.
11093         #
11094         #  @return New GEOM.GEOM_Object, containing the found block.
11095         #
11096         #  @ref swig_GetBlockByParts "Example"
11097         def GetBlockByParts(self, theCompound, theParts, theName=None):
11098             """
11099              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11100
11101              Parameters:
11102                 theCompound Compound, to find block in.
11103                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
11104                 theName Object name; when specified, this parameter is used
11105                         for result publication in the study. Otherwise, if automatic
11106                         publication is switched on, default value is used for result name.
11107
11108             Returns: 
11109                 New GEOM_Object, containing the found block.
11110             """
11111             # Example: see GEOM_TestOthers.py
11112             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
11113             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
11114             self._autoPublish(anObj, theName, "block")
11115             return anObj
11116
11117         ## Return all blocks, containing all the elements, passed as the parts.
11118         #  @param theCompound Compound, to find blocks in.
11119         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11120         #  @param theName Object name; when specified, this parameter is used
11121         #         for result publication in the study. Otherwise, if automatic
11122         #         publication is switched on, default value is used for result name.
11123         #
11124         #  @return List of GEOM.GEOM_Object, containing the found blocks.
11125         #
11126         #  @ref swig_todo "Example"
11127         def GetBlocksByParts(self, theCompound, theParts, theName=None):
11128             """
11129             Return all blocks, containing all the elements, passed as the parts.
11130
11131             Parameters:
11132                 theCompound Compound, to find blocks in.
11133                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11134                 theName Object name; when specified, this parameter is used
11135                         for result publication in the study. Otherwise, if automatic
11136                         publication is switched on, default value is used for result name.
11137
11138             Returns:
11139                 List of GEOM.GEOM_Object, containing the found blocks.
11140             """
11141             # Example: see GEOM_Spanner.py
11142             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11143             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11144             self._autoPublish(aList, theName, "block")
11145             return aList
11146
11147         ## Multi-transformate block and glue the result.
11148         #  Transformation is defined so, as to superpose direction faces.
11149         #  @param Block Hexahedral solid to be multi-transformed.
11150         #  @param DirFace1 ID of First direction face.
11151         #  @param DirFace2 ID of Second direction face.
11152         #  @param NbTimes Quantity of transformations to be done.
11153         #  @param theName Object name; when specified, this parameter is used
11154         #         for result publication in the study. Otherwise, if automatic
11155         #         publication is switched on, default value is used for result name.
11156         #
11157         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11158         #
11159         #  @return New GEOM.GEOM_Object, containing the result shape.
11160         #
11161         #  @ref tui_multi_transformation "Example"
11162         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11163             """
11164             Multi-transformate block and glue the result.
11165             Transformation is defined so, as to superpose direction faces.
11166
11167             Parameters:
11168                 Block Hexahedral solid to be multi-transformed.
11169                 DirFace1 ID of First direction face.
11170                 DirFace2 ID of Second direction face.
11171                 NbTimes Quantity of transformations to be done.
11172                 theName Object name; when specified, this parameter is used
11173                         for result publication in the study. Otherwise, if automatic
11174                         publication is switched on, default value is used for result name.
11175
11176             Note:
11177                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11178
11179             Returns:
11180                 New GEOM.GEOM_Object, containing the result shape.
11181             """
11182             # Example: see GEOM_Spanner.py
11183             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11184             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11185             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11186             anObj.SetParameters(Parameters)
11187             self._autoPublish(anObj, theName, "transformed")
11188             return anObj
11189
11190         ## Multi-transformate block and glue the result.
11191         #  @param Block Hexahedral solid to be multi-transformed.
11192         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11193         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11194         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11195         #  @param theName Object name; when specified, this parameter is used
11196         #         for result publication in the study. Otherwise, if automatic
11197         #         publication is switched on, default value is used for result name.
11198         #
11199         #  @return New GEOM.GEOM_Object, containing the result shape.
11200         #
11201         #  @ref tui_multi_transformation "Example"
11202         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11203                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11204             """
11205             Multi-transformate block and glue the result.
11206
11207             Parameters:
11208                 Block Hexahedral solid to be multi-transformed.
11209                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11210                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11211                 NbTimesU,NbTimesV Quantity of transformations to be done.
11212                 theName Object name; when specified, this parameter is used
11213                         for result publication in the study. Otherwise, if automatic
11214                         publication is switched on, default value is used for result name.
11215
11216             Returns:
11217                 New GEOM.GEOM_Object, containing the result shape.
11218             """
11219             # Example: see GEOM_Spanner.py
11220             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11221               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11222             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11223                                                             DirFace1V, DirFace2V, NbTimesV)
11224             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11225             anObj.SetParameters(Parameters)
11226             self._autoPublish(anObj, theName, "transformed")
11227             return anObj
11228
11229         ## Build all possible propagation groups.
11230         #  Propagation group is a set of all edges, opposite to one (main)
11231         #  edge of this group directly or through other opposite edges.
11232         #  Notion of Opposite Edge make sence only on quadrangle face.
11233         #  @param theShape Shape to build propagation groups on.
11234         #  @param theName Object name; when specified, this parameter is used
11235         #         for result publication in the study. Otherwise, if automatic
11236         #         publication is switched on, default value is used for result name.
11237         #
11238         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11239         #
11240         #  @ref swig_Propagate "Example"
11241         def Propagate(self, theShape, theName=None):
11242             """
11243             Build all possible propagation groups.
11244             Propagation group is a set of all edges, opposite to one (main)
11245             edge of this group directly or through other opposite edges.
11246             Notion of Opposite Edge make sence only on quadrangle face.
11247
11248             Parameters:
11249                 theShape Shape to build propagation groups on.
11250                 theName Object name; when specified, this parameter is used
11251                         for result publication in the study. Otherwise, if automatic
11252                         publication is switched on, default value is used for result name.
11253
11254             Returns:
11255                 List of GEOM.GEOM_Object, each of them is a propagation group.
11256             """
11257             # Example: see GEOM_TestOthers.py
11258             listChains = self.BlocksOp.Propagate(theShape)
11259             RaiseIfFailed("Propagate", self.BlocksOp)
11260             self._autoPublish(listChains, theName, "propagate")
11261             return listChains
11262
11263         # end of l3_blocks_op
11264         ## @}
11265
11266         ## @addtogroup l3_groups
11267         ## @{
11268
11269         ## Creates a new group which will store sub-shapes of theMainShape
11270         #  @param theMainShape is a GEOM object on which the group is selected
11271         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
11272         #  @param theName Object name; when specified, this parameter is used
11273         #         for result publication in the study. Otherwise, if automatic
11274         #         publication is switched on, default value is used for result name.
11275         #
11276         #  @return a newly created GEOM group (GEOM.GEOM_Object)
11277         #
11278         #  @ref tui_working_with_groups_page "Example 1"
11279         #  \n @ref swig_CreateGroup "Example 2"
11280         def CreateGroup(self, theMainShape, theShapeType, theName=None):
11281             """
11282             Creates a new group which will store sub-shapes of theMainShape
11283
11284             Parameters:
11285                theMainShape is a GEOM object on which the group is selected
11286                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
11287                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
11288                 theName Object name; when specified, this parameter is used
11289                         for result publication in the study. Otherwise, if automatic
11290                         publication is switched on, default value is used for result name.
11291
11292             Returns:
11293                a newly created GEOM group
11294
11295             Example of usage:
11296                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
11297                 
11298             """
11299             # Example: see GEOM_TestOthers.py
11300             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
11301             RaiseIfFailed("CreateGroup", self.GroupOp)
11302             self._autoPublish(anObj, theName, "group")
11303             return anObj
11304
11305         ## Adds a sub-object with ID theSubShapeId to the group
11306         #  @param theGroup is a GEOM group to which the new sub-shape is added
11307         #  @param theSubShapeID is a sub-shape ID in the main object.
11308         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11309         #
11310         #  @ref tui_working_with_groups_page "Example"
11311         def AddObject(self,theGroup, theSubShapeID):
11312             """
11313             Adds a sub-object with ID theSubShapeId to the group
11314
11315             Parameters:
11316                 theGroup       is a GEOM group to which the new sub-shape is added
11317                 theSubShapeID  is a sub-shape ID in the main object.
11318
11319             Note:
11320                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
11321             """
11322             # Example: see GEOM_TestOthers.py
11323             self.GroupOp.AddObject(theGroup, theSubShapeID)
11324             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
11325                 RaiseIfFailed("AddObject", self.GroupOp)
11326                 pass
11327             pass
11328
11329         ## Removes a sub-object with ID \a theSubShapeId from the group
11330         #  @param theGroup is a GEOM group from which the new sub-shape is removed
11331         #  @param theSubShapeID is a sub-shape ID in the main object.
11332         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11333         #
11334         #  @ref tui_working_with_groups_page "Example"
11335         def RemoveObject(self,theGroup, theSubShapeID):
11336             """
11337             Removes a sub-object with ID theSubShapeId from the group
11338
11339             Parameters:
11340                 theGroup is a GEOM group from which the new sub-shape is removed
11341                 theSubShapeID is a sub-shape ID in the main object.
11342
11343             Note:
11344                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11345             """
11346             # Example: see GEOM_TestOthers.py
11347             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
11348             RaiseIfFailed("RemoveObject", self.GroupOp)
11349             pass
11350
11351         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11352         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11353         #  @param theSubShapes is a list of sub-shapes to be added.
11354         #
11355         #  @ref tui_working_with_groups_page "Example"
11356         def UnionList (self,theGroup, theSubShapes):
11357             """
11358             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11359
11360             Parameters:
11361                 theGroup is a GEOM group to which the new sub-shapes are added.
11362                 theSubShapes is a list of sub-shapes to be added.
11363             """
11364             # Example: see GEOM_TestOthers.py
11365             self.GroupOp.UnionList(theGroup, theSubShapes)
11366             RaiseIfFailed("UnionList", self.GroupOp)
11367             pass
11368
11369         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11370         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11371         #  @param theSubShapes is a list of indices of sub-shapes to be added.
11372         #
11373         #  @ref swig_UnionIDs "Example"
11374         def UnionIDs(self,theGroup, theSubShapes):
11375             """
11376             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11377
11378             Parameters:
11379                 theGroup is a GEOM group to which the new sub-shapes are added.
11380                 theSubShapes is a list of indices of sub-shapes to be added.
11381             """
11382             # Example: see GEOM_TestOthers.py
11383             self.GroupOp.UnionIDs(theGroup, theSubShapes)
11384             RaiseIfFailed("UnionIDs", self.GroupOp)
11385             pass
11386
11387         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11388         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11389         #  @param theSubShapes is a list of sub-shapes to be removed.
11390         #
11391         #  @ref tui_working_with_groups_page "Example"
11392         def DifferenceList (self,theGroup, theSubShapes):
11393             """
11394             Removes from the group all the given shapes. No errors, if some shapes are not included.
11395
11396             Parameters:
11397                 theGroup is a GEOM group from which the sub-shapes are removed.
11398                 theSubShapes is a list of sub-shapes to be removed.
11399             """
11400             # Example: see GEOM_TestOthers.py
11401             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11402             RaiseIfFailed("DifferenceList", self.GroupOp)
11403             pass
11404
11405         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11406         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11407         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
11408         #
11409         #  @ref swig_DifferenceIDs "Example"
11410         def DifferenceIDs(self,theGroup, theSubShapes):
11411             """
11412             Removes from the group all the given shapes. No errors, if some shapes are not included.
11413
11414             Parameters:
11415                 theGroup is a GEOM group from which the sub-shapes are removed.
11416                 theSubShapes is a list of indices of sub-shapes to be removed.
11417             """            
11418             # Example: see GEOM_TestOthers.py
11419             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
11420             RaiseIfFailed("DifferenceIDs", self.GroupOp)
11421             pass
11422
11423         ## Union of two groups.
11424         #  New group is created. It will contain all entities
11425         #  which are present in groups theGroup1 and theGroup2.
11426         #  @param theGroup1, theGroup2 are the initial GEOM groups
11427         #                              to create the united group from.
11428         #  @param theName Object name; when specified, this parameter is used
11429         #         for result publication in the study. Otherwise, if automatic
11430         #         publication is switched on, default value is used for result name.
11431         #
11432         #  @return a newly created GEOM group.
11433         #
11434         #  @ref tui_union_groups_anchor "Example"
11435         def UnionGroups (self, theGroup1, theGroup2, theName=None):
11436             """
11437             Union of two groups.
11438             New group is created. It will contain all entities
11439             which are present in groups theGroup1 and theGroup2.
11440
11441             Parameters:
11442                 theGroup1, theGroup2 are the initial GEOM groups
11443                                      to create the united group from.
11444                 theName Object name; when specified, this parameter is used
11445                         for result publication in the study. Otherwise, if automatic
11446                         publication is switched on, default value is used for result name.
11447
11448             Returns:
11449                 a newly created GEOM group.
11450             """
11451             # Example: see GEOM_TestOthers.py
11452             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
11453             RaiseIfFailed("UnionGroups", self.GroupOp)
11454             self._autoPublish(aGroup, theName, "group")
11455             return aGroup
11456
11457         ## Intersection of two groups.
11458         #  New group is created. It will contain only those entities
11459         #  which are present in both groups theGroup1 and theGroup2.
11460         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11461         #  @param theName Object name; when specified, this parameter is used
11462         #         for result publication in the study. Otherwise, if automatic
11463         #         publication is switched on, default value is used for result name.
11464         #
11465         #  @return a newly created GEOM group.
11466         #
11467         #  @ref tui_intersect_groups_anchor "Example"
11468         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
11469             """
11470             Intersection of two groups.
11471             New group is created. It will contain only those entities
11472             which are present in both groups theGroup1 and theGroup2.
11473
11474             Parameters:
11475                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11476                 theName Object name; when specified, this parameter is used
11477                         for result publication in the study. Otherwise, if automatic
11478                         publication is switched on, default value is used for result name.
11479
11480             Returns:
11481                 a newly created GEOM group.
11482             """
11483             # Example: see GEOM_TestOthers.py
11484             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
11485             RaiseIfFailed("IntersectGroups", self.GroupOp)
11486             self._autoPublish(aGroup, theName, "group")
11487             return aGroup
11488
11489         ## Cut of two groups.
11490         #  New group is created. It will contain entities which are
11491         #  present in group theGroup1 but are not present in group theGroup2.
11492         #  @param theGroup1 is a GEOM group to include elements of.
11493         #  @param theGroup2 is a GEOM group to exclude elements of.
11494         #  @param theName Object name; when specified, this parameter is used
11495         #         for result publication in the study. Otherwise, if automatic
11496         #         publication is switched on, default value is used for result name.
11497         #
11498         #  @return a newly created GEOM group.
11499         #
11500         #  @ref tui_cut_groups_anchor "Example"
11501         def CutGroups (self, theGroup1, theGroup2, theName=None):
11502             """
11503             Cut of two groups.
11504             New group is created. It will contain entities which are
11505             present in group theGroup1 but are not present in group theGroup2.
11506
11507             Parameters:
11508                 theGroup1 is a GEOM group to include elements of.
11509                 theGroup2 is a GEOM group to exclude elements of.
11510                 theName Object name; when specified, this parameter is used
11511                         for result publication in the study. Otherwise, if automatic
11512                         publication is switched on, default value is used for result name.
11513
11514             Returns:
11515                 a newly created GEOM group.
11516             """
11517             # Example: see GEOM_TestOthers.py
11518             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
11519             RaiseIfFailed("CutGroups", self.GroupOp)
11520             self._autoPublish(aGroup, theName, "group")
11521             return aGroup
11522
11523         ## Union of list of groups.
11524         #  New group is created. It will contain all entities that are
11525         #  present in groups listed in theGList.
11526         #  @param theGList is a list of GEOM groups to create the united group from.
11527         #  @param theName Object name; when specified, this parameter is used
11528         #         for result publication in the study. Otherwise, if automatic
11529         #         publication is switched on, default value is used for result name.
11530         #
11531         #  @return a newly created GEOM group.
11532         #
11533         #  @ref tui_union_groups_anchor "Example"
11534         def UnionListOfGroups (self, theGList, theName=None):
11535             """
11536             Union of list of groups.
11537             New group is created. It will contain all entities that are
11538             present in groups listed in theGList.
11539
11540             Parameters:
11541                 theGList is a list of GEOM groups to create the united group from.
11542                 theName Object name; when specified, this parameter is used
11543                         for result publication in the study. Otherwise, if automatic
11544                         publication is switched on, default value is used for result name.
11545
11546             Returns:
11547                 a newly created GEOM group.
11548             """
11549             # Example: see GEOM_TestOthers.py
11550             aGroup = self.GroupOp.UnionListOfGroups(theGList)
11551             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
11552             self._autoPublish(aGroup, theName, "group")
11553             return aGroup
11554
11555         ## Cut of lists of groups.
11556         #  New group is created. It will contain only entities
11557         #  which are present in groups listed in theGList.
11558         #  @param theGList is a list of GEOM groups to include elements of.
11559         #  @param theName Object name; when specified, this parameter is used
11560         #         for result publication in the study. Otherwise, if automatic
11561         #         publication is switched on, default value is used for result name.
11562         #
11563         #  @return a newly created GEOM group.
11564         #
11565         #  @ref tui_intersect_groups_anchor "Example"
11566         def IntersectListOfGroups (self, theGList, theName=None):
11567             """
11568             Cut of lists of groups.
11569             New group is created. It will contain only entities
11570             which are present in groups listed in theGList.
11571
11572             Parameters:
11573                 theGList is a list of GEOM groups to include elements of.
11574                 theName Object name; when specified, this parameter is used
11575                         for result publication in the study. Otherwise, if automatic
11576                         publication is switched on, default value is used for result name.
11577
11578             Returns:
11579                 a newly created GEOM group.
11580             """
11581             # Example: see GEOM_TestOthers.py
11582             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
11583             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
11584             self._autoPublish(aGroup, theName, "group")
11585             return aGroup
11586
11587         ## Cut of lists of groups.
11588         #  New group is created. It will contain only entities
11589         #  which are present in groups listed in theGList1 but 
11590         #  are not present in groups from theGList2.
11591         #  @param theGList1 is a list of GEOM groups to include elements of.
11592         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11593         #  @param theName Object name; when specified, this parameter is used
11594         #         for result publication in the study. Otherwise, if automatic
11595         #         publication is switched on, default value is used for result name.
11596         #
11597         #  @return a newly created GEOM group.
11598         #
11599         #  @ref tui_cut_groups_anchor "Example"
11600         def CutListOfGroups (self, theGList1, theGList2, theName=None):
11601             """
11602             Cut of lists of groups.
11603             New group is created. It will contain only entities
11604             which are present in groups listed in theGList1 but 
11605             are not present in groups from theGList2.
11606
11607             Parameters:
11608                 theGList1 is a list of GEOM groups to include elements of.
11609                 theGList2 is a list of GEOM groups to exclude elements of.
11610                 theName Object name; when specified, this parameter is used
11611                         for result publication in the study. Otherwise, if automatic
11612                         publication is switched on, default value is used for result name.
11613
11614             Returns:
11615                 a newly created GEOM group.
11616             """
11617             # Example: see GEOM_TestOthers.py
11618             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
11619             RaiseIfFailed("CutListOfGroups", self.GroupOp)
11620             self._autoPublish(aGroup, theName, "group")
11621             return aGroup
11622
11623         ## Returns a list of sub-objects ID stored in the group
11624         #  @param theGroup is a GEOM group for which a list of IDs is requested
11625         #
11626         #  @ref swig_GetObjectIDs "Example"
11627         def GetObjectIDs(self,theGroup):
11628             """
11629             Returns a list of sub-objects ID stored in the group
11630
11631             Parameters:
11632                 theGroup is a GEOM group for which a list of IDs is requested
11633             """
11634             # Example: see GEOM_TestOthers.py
11635             ListIDs = self.GroupOp.GetObjects(theGroup)
11636             RaiseIfFailed("GetObjects", self.GroupOp)
11637             return ListIDs
11638
11639         ## Returns a type of sub-objects stored in the group
11640         #  @param theGroup is a GEOM group which type is returned.
11641         #
11642         #  @ref swig_GetType "Example"
11643         def GetType(self,theGroup):
11644             """
11645             Returns a type of sub-objects stored in the group
11646
11647             Parameters:
11648                 theGroup is a GEOM group which type is returned.
11649             """
11650             # Example: see GEOM_TestOthers.py
11651             aType = self.GroupOp.GetType(theGroup)
11652             RaiseIfFailed("GetType", self.GroupOp)
11653             return aType
11654
11655         ## Convert a type of geom object from id to string value
11656         #  @param theId is a GEOM obect type id.
11657         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11658         #  @ref swig_GetType "Example"
11659         def ShapeIdToType(self, theId):
11660             """
11661             Convert a type of geom object from id to string value
11662
11663             Parameters:
11664                 theId is a GEOM obect type id.
11665                 
11666             Returns:
11667                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11668             """
11669             if theId == 0:
11670                 return "COPY"
11671             if theId == 1:
11672                 return "IMPORT"
11673             if theId == 2:
11674                 return "POINT"
11675             if theId == 3:
11676                 return "VECTOR"
11677             if theId == 4:
11678                 return "PLANE"
11679             if theId == 5:
11680                 return "LINE"
11681             if theId == 6:
11682                 return "TORUS"
11683             if theId == 7:
11684                 return "BOX"
11685             if theId == 8:
11686                 return "CYLINDER"
11687             if theId == 9:
11688                 return "CONE"
11689             if theId == 10:
11690                 return "SPHERE"
11691             if theId == 11:
11692                 return "PRISM"
11693             if theId == 12:
11694                 return "REVOLUTION"
11695             if theId == 13:
11696                 return "BOOLEAN"
11697             if theId == 14:
11698                 return "PARTITION"
11699             if theId == 15:
11700                 return "POLYLINE"
11701             if theId == 16:
11702                 return "CIRCLE"
11703             if theId == 17:
11704                 return "SPLINE"
11705             if theId == 18:
11706                 return "ELLIPSE"
11707             if theId == 19:
11708                 return "CIRC_ARC"
11709             if theId == 20:
11710                 return "FILLET"
11711             if theId == 21:
11712                 return "CHAMFER"
11713             if theId == 22:
11714                 return "EDGE"
11715             if theId == 23:
11716                 return "WIRE"
11717             if theId == 24:
11718                 return "FACE"
11719             if theId == 25:
11720                 return "SHELL"
11721             if theId == 26:
11722                 return "SOLID"
11723             if theId == 27:
11724                 return "COMPOUND"
11725             if theId == 28:
11726                 return "SUBSHAPE"
11727             if theId == 29:
11728                 return "PIPE"
11729             if theId == 30:
11730                 return "ARCHIMEDE"
11731             if theId == 31:
11732                 return "FILLING"
11733             if theId == 32:
11734                 return "EXPLODE"
11735             if theId == 33:
11736                 return "GLUED"
11737             if theId == 34:
11738                 return "SKETCHER"
11739             if theId == 35:
11740                 return "CDG"
11741             if theId == 36:
11742                 return "FREE_BOUNDS"
11743             if theId == 37:
11744                 return "GROUP"
11745             if theId == 38:
11746                 return "BLOCK"
11747             if theId == 39:
11748                 return "MARKER"
11749             if theId == 40:
11750                 return "THRUSECTIONS"
11751             if theId == 41:
11752                 return "COMPOUNDFILTER"
11753             if theId == 42:
11754                 return "SHAPES_ON_SHAPE"
11755             if theId == 43:
11756                 return "ELLIPSE_ARC"
11757             if theId == 44:
11758                 return "3DSKETCHER"
11759             if theId == 45:
11760                 return "FILLET_2D"
11761             if theId == 46:
11762                 return "FILLET_1D"
11763             if theId == 201:
11764                 return "PIPETSHAPE"
11765             return "Shape Id not exist."
11766
11767         ## Returns a main shape associated with the group
11768         #  @param theGroup is a GEOM group for which a main shape object is requested
11769         #  @return a GEOM object which is a main shape for theGroup
11770         #
11771         #  @ref swig_GetMainShape "Example"
11772         def GetMainShape(self,theGroup):
11773             """
11774             Returns a main shape associated with the group
11775
11776             Parameters:
11777                 theGroup is a GEOM group for which a main shape object is requested
11778
11779             Returns:
11780                 a GEOM object which is a main shape for theGroup
11781
11782             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
11783             """
11784             # Example: see GEOM_TestOthers.py
11785             anObj = self.GroupOp.GetMainShape(theGroup)
11786             RaiseIfFailed("GetMainShape", self.GroupOp)
11787             return anObj
11788
11789         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
11790         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11791         #  @param theShape given shape (see GEOM.GEOM_Object)
11792         #  @param min_length minimum length of edges of theShape
11793         #  @param max_length maximum length of edges of theShape
11794         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11795         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
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 a newly created GEOM group of edges
11801         #
11802         #  @@ref swig_todo "Example"
11803         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
11804             """
11805             Create group of edges of theShape, whose length is in range [min_length, max_length].
11806             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11807
11808             Parameters:
11809                 theShape given shape
11810                 min_length minimum length of edges of theShape
11811                 max_length maximum length of edges of theShape
11812                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11813                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11814                 theName Object name; when specified, this parameter is used
11815                         for result publication in the study. Otherwise, if automatic
11816                         publication is switched on, default value is used for result name.
11817
11818              Returns:
11819                 a newly created GEOM group of edges.
11820             """
11821             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
11822             edges_in_range = []
11823             for edge in edges:
11824                 Props = self.BasicProperties(edge)
11825                 if min_length <= Props[0] and Props[0] <= max_length:
11826                     if (not include_min) and (min_length == Props[0]):
11827                         skip = 1
11828                     else:
11829                         if (not include_max) and (Props[0] == max_length):
11830                             skip = 1
11831                         else:
11832                             edges_in_range.append(edge)
11833
11834             if len(edges_in_range) <= 0:
11835                 print "No edges found by given criteria"
11836                 return None
11837
11838             # note: auto-publishing is done in self.CreateGroup()
11839             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
11840             self.UnionList(group_edges, edges_in_range)
11841
11842             return group_edges
11843
11844         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
11845         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11846         #  @param min_length minimum length of edges of selected shape
11847         #  @param max_length maximum length of edges of selected shape
11848         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11849         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11850         #  @return a newly created GEOM group of edges
11851         #  @ref swig_todo "Example"
11852         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
11853             """
11854             Create group of edges of selected shape, whose length is in range [min_length, max_length].
11855             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11856
11857             Parameters:
11858                 min_length minimum length of edges of selected shape
11859                 max_length maximum length of edges of selected shape
11860                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11861                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11862
11863              Returns:
11864                 a newly created GEOM group of edges.
11865             """
11866             nb_selected = sg.SelectedCount()
11867             if nb_selected < 1:
11868                 print "Select a shape before calling this function, please."
11869                 return 0
11870             if nb_selected > 1:
11871                 print "Only one shape must be selected"
11872                 return 0
11873
11874             id_shape = sg.getSelected(0)
11875             shape = IDToObject( id_shape )
11876
11877             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
11878
11879             left_str  = " < "
11880             right_str = " < "
11881             if include_min: left_str  = " <= "
11882             if include_max: right_str  = " <= "
11883
11884             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
11885                                     + left_str + "length" + right_str + `max_length`)
11886
11887             sg.updateObjBrowser(1)
11888
11889             return group_edges
11890
11891         # end of l3_groups
11892         ## @}
11893
11894         ## @addtogroup l4_advanced
11895         ## @{
11896
11897         ## Create a T-shape object with specified caracteristics for the main
11898         #  and the incident pipes (radius, width, half-length).
11899         #  The extremities of the main pipe are located on junctions points P1 and P2.
11900         #  The extremity of the incident pipe is located on junction point P3.
11901         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11902         #  the main plane of the T-shape is XOY.
11903         #
11904         #  @param theR1 Internal radius of main pipe
11905         #  @param theW1 Width of main pipe
11906         #  @param theL1 Half-length of main pipe
11907         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11908         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11909         #  @param theL2 Half-length of incident pipe
11910         #
11911         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11912         #  @param theP1 1st junction point of main pipe
11913         #  @param theP2 2nd junction point of main pipe
11914         #  @param theP3 Junction point of incident pipe
11915         #
11916         #  @param theRL Internal radius of left thickness reduction
11917         #  @param theWL Width of left thickness reduction
11918         #  @param theLtransL Length of left transition part
11919         #  @param theLthinL Length of left thin part
11920         #
11921         #  @param theRR Internal radius of right thickness reduction
11922         #  @param theWR Width of right thickness reduction
11923         #  @param theLtransR Length of right transition part
11924         #  @param theLthinR Length of right thin part
11925         #
11926         #  @param theRI Internal radius of incident thickness reduction
11927         #  @param theWI Width of incident thickness reduction
11928         #  @param theLtransI Length of incident transition part
11929         #  @param theLthinI Length of incident thin part
11930         #
11931         #  @param theName Object name; when specified, this parameter is used
11932         #         for result publication in the study. Otherwise, if automatic
11933         #         publication is switched on, default value is used for result name.
11934         #
11935         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11936         #
11937         #  @ref tui_creation_pipetshape "Example"
11938         def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
11939                             theHexMesh=True, theP1=None, theP2=None, theP3=None,
11940                             theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11941                             theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11942                             theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11943                             theName=None):
11944             """
11945             Create a T-shape object with specified caracteristics for the main
11946             and the incident pipes (radius, width, half-length).
11947             The extremities of the main pipe are located on junctions points P1 and P2.
11948             The extremity of the incident pipe is located on junction point P3.
11949             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11950             the main plane of the T-shape is XOY.
11951
11952             Parameters:
11953                 theR1 Internal radius of main pipe
11954                 theW1 Width of main pipe
11955                 theL1 Half-length of main pipe
11956                 theR2 Internal radius of incident pipe (R2 < R1)
11957                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11958                 theL2 Half-length of incident pipe
11959                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11960                 theP1 1st junction point of main pipe
11961                 theP2 2nd junction point of main pipe
11962                 theP3 Junction point of incident pipe
11963
11964                 theRL Internal radius of left thickness reduction
11965                 theWL Width of left thickness reduction
11966                 theLtransL Length of left transition part
11967                 theLthinL Length of left thin part
11968
11969                 theRR Internal radius of right thickness reduction
11970                 theWR Width of right thickness reduction
11971                 theLtransR Length of right transition part
11972                 theLthinR Length of right thin part
11973
11974                 theRI Internal radius of incident thickness reduction
11975                 theWI Width of incident thickness reduction
11976                 theLtransI Length of incident transition part
11977                 theLthinI Length of incident thin part
11978
11979                 theName Object name; when specified, this parameter is used
11980                         for result publication in the study. Otherwise, if automatic
11981                         publication is switched on, default value is used for result name.
11982
11983             Returns:
11984                 List of GEOM_Object, containing the created shape and propagation groups.
11985
11986             Example of usage:
11987                 # create PipeTShape object
11988                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
11989                 # create PipeTShape object with position
11990                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
11991                 # create PipeTShape object with left thickness reduction
11992                 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
11993             """
11994             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)
11995             if (theP1 and theP2 and theP3):
11996                 anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11997                                                                 theRL, theWL, theLtransL, theLthinL,
11998                                                                 theRR, theWR, theLtransR, theLthinR,
11999                                                                 theRI, theWI, theLtransI, theLthinI,
12000                                                                 theHexMesh, theP1, theP2, theP3)
12001             else:
12002                 anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
12003                                                     theRL, theWL, theLtransL, theLthinL,
12004                                                     theRR, theWR, theLtransR, theLthinR,
12005                                                     theRI, theWI, theLtransI, theLthinI,
12006                                                     theHexMesh)
12007             RaiseIfFailed("MakePipeTShape", self.AdvOp)
12008             if Parameters: anObj[0].SetParameters(Parameters)
12009             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12010             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12011             return anObj
12012
12013         ## Create a T-shape object with chamfer and with specified caracteristics for the main
12014         #  and the incident pipes (radius, width, half-length). The chamfer is
12015         #  created on the junction of the pipes.
12016         #  The extremities of the main pipe are located on junctions points P1 and P2.
12017         #  The extremity of the incident pipe is located on junction point P3.
12018         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12019         #  the main plane of the T-shape is XOY.
12020         #  @param theR1 Internal radius of main pipe
12021         #  @param theW1 Width of main pipe
12022         #  @param theL1 Half-length of main pipe
12023         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12024         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12025         #  @param theL2 Half-length of incident pipe
12026         #  @param theH Height of the chamfer.
12027         #  @param theW Width of the chamfer.
12028         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12029         #  @param theP1 1st junction point of main pipe
12030         #  @param theP2 2nd junction point of main pipe
12031         #  @param theP3 Junction point of incident pipe
12032         #
12033         #  @param theRL Internal radius of left thickness reduction
12034         #  @param theWL Width of left thickness reduction
12035         #  @param theLtransL Length of left transition part
12036         #  @param theLthinL Length of left thin part
12037         #
12038         #  @param theRR Internal radius of right thickness reduction
12039         #  @param theWR Width of right thickness reduction
12040         #  @param theLtransR Length of right transition part
12041         #  @param theLthinR Length of right thin part
12042         #
12043         #  @param theRI Internal radius of incident thickness reduction
12044         #  @param theWI Width of incident thickness reduction
12045         #  @param theLtransI Length of incident transition part
12046         #  @param theLthinI Length of incident thin part
12047         #
12048         #  @param theName Object name; when specified, this parameter is used
12049         #         for result publication in the study. Otherwise, if automatic
12050         #         publication is switched on, default value is used for result name.
12051         #
12052         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12053         #
12054         #  @ref tui_creation_pipetshape "Example"
12055         def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
12056                                    theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12057                                    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12058                                    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12059                                    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12060                                    theName=None):
12061             """
12062             Create a T-shape object with chamfer and with specified caracteristics for the main
12063             and the incident pipes (radius, width, half-length). The chamfer is
12064             created on the junction of the pipes.
12065             The extremities of the main pipe are located on junctions points P1 and P2.
12066             The extremity of the incident pipe is located on junction point P3.
12067             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12068             the main plane of the T-shape is XOY.
12069
12070             Parameters:
12071                 theR1 Internal radius of main pipe
12072                 theW1 Width of main pipe
12073                 theL1 Half-length of main pipe
12074                 theR2 Internal radius of incident pipe (R2 < R1)
12075                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12076                 theL2 Half-length of incident pipe
12077                 theH Height of the chamfer.
12078                 theW Width of the chamfer.
12079                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12080                 theP1 1st junction point of main pipe
12081                 theP2 2nd junction point of main pipe
12082                 theP3 Junction point of incident pipe
12083
12084                 theRL Internal radius of left thickness reduction
12085                 theWL Width of left thickness reduction
12086                 theLtransL Length of left transition part
12087                 theLthinL Length of left thin part
12088
12089                 theRR Internal radius of right thickness reduction
12090                 theWR Width of right thickness reduction
12091                 theLtransR Length of right transition part
12092                 theLthinR Length of right thin part
12093
12094                 theRI Internal radius of incident thickness reduction
12095                 theWI Width of incident thickness reduction
12096                 theLtransI Length of incident transition part
12097                 theLthinI Length of incident thin part
12098
12099                 theName Object name; when specified, this parameter is used
12100                         for result publication in the study. Otherwise, if automatic
12101                         publication is switched on, default value is used for result name.
12102
12103             Returns:
12104                 List of GEOM_Object, containing the created shape and propagation groups.
12105
12106             Example of usage:
12107                 # create PipeTShape with chamfer object
12108                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
12109                 # create PipeTShape with chamfer object with position
12110                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
12111                 # create PipeTShape with chamfer object with left thickness reduction
12112                 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)
12113             """
12114             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)
12115             if (theP1 and theP2 and theP3):
12116               anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12117                                                                      theRL, theWL, theLtransL, theLthinL,
12118                                                                      theRR, theWR, theLtransR, theLthinR,
12119                                                                      theRI, theWI, theLtransI, theLthinI,
12120                                                                      theH, theW, theHexMesh, theP1, theP2, theP3)
12121             else:
12122               anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
12123                                                          theRL, theWL, theLtransL, theLthinL,
12124                                                          theRR, theWR, theLtransR, theLthinR,
12125                                                          theRI, theWI, theLtransI, theLthinI,
12126                                                          theH, theW, theHexMesh)
12127             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
12128             if Parameters: anObj[0].SetParameters(Parameters)
12129             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12130             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12131             return anObj
12132
12133         ## Create a T-shape object with fillet and with specified caracteristics for the main
12134         #  and the incident pipes (radius, width, half-length). The fillet is
12135         #  created on the junction of the pipes.
12136         #  The extremities of the main pipe are located on junctions points P1 and P2.
12137         #  The extremity of the incident pipe is located on junction point P3.
12138         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12139         #  the main plane of the T-shape is XOY.
12140         #  @param theR1 Internal radius of main pipe
12141         #  @param theW1 Width of main pipe
12142         #  @param theL1 Half-length of main pipe
12143         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12144         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12145         #  @param theL2 Half-length of incident pipe
12146         #  @param theRF Radius of curvature of fillet.
12147         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12148         #  @param theP1 1st junction point of main pipe
12149         #  @param theP2 2nd junction point of main pipe
12150         #  @param theP3 Junction point of incident pipe
12151         #
12152         #  @param theRL Internal radius of left thickness reduction
12153         #  @param theWL Width of left thickness reduction
12154         #  @param theLtransL Length of left transition part
12155         #  @param theLthinL Length of left thin part
12156         #
12157         #  @param theRR Internal radius of right thickness reduction
12158         #  @param theWR Width of right thickness reduction
12159         #  @param theLtransR Length of right transition part
12160         #  @param theLthinR Length of right thin part
12161         #
12162         #  @param theRI Internal radius of incident thickness reduction
12163         #  @param theWI Width of incident thickness reduction
12164         #  @param theLtransI Length of incident transition part
12165         #  @param theLthinI Length of incident thin part
12166         #
12167         #  @param theName Object name; when specified, this parameter is used
12168         #         for result publication in the study. Otherwise, if automatic
12169         #         publication is switched on, default value is used for result name.
12170         #
12171         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12172         #
12173         #  @ref tui_creation_pipetshape "Example"
12174         def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
12175                                   theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12176                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12177                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12178                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12179                                   theName=None):
12180             """
12181             Create a T-shape object with fillet and with specified caracteristics for the main
12182             and the incident pipes (radius, width, half-length). The fillet is
12183             created on the junction of the pipes.
12184             The extremities of the main pipe are located on junctions points P1 and P2.
12185             The extremity of the incident pipe is located on junction point P3.
12186
12187             Parameters:
12188                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12189                 the main plane of the T-shape is XOY.
12190                 theR1 Internal radius of main pipe
12191                 theW1 Width of main pipe
12192                 heL1 Half-length of main pipe
12193                 theR2 Internal radius of incident pipe (R2 < R1)
12194                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12195                 theL2 Half-length of incident pipe
12196                 theRF Radius of curvature of fillet.
12197                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12198                 theP1 1st junction point of main pipe
12199                 theP2 2nd junction point of main pipe
12200                 theP3 Junction point of incident pipe
12201
12202                 theRL Internal radius of left thickness reduction
12203                 theWL Width of left thickness reduction
12204                 theLtransL Length of left transition part
12205                 theLthinL Length of left thin part
12206
12207                 theRR Internal radius of right thickness reduction
12208                 theWR Width of right thickness reduction
12209                 theLtransR Length of right transition part
12210                 theLthinR Length of right thin part
12211
12212                 theRI Internal radius of incident thickness reduction
12213                 theWI Width of incident thickness reduction
12214                 theLtransI Length of incident transition part
12215                 theLthinI Length of incident thin part
12216
12217                 theName Object name; when specified, this parameter is used
12218                         for result publication in the study. Otherwise, if automatic
12219                         publication is switched on, default value is used for result name.
12220                 
12221             Returns:
12222                 List of GEOM_Object, containing the created shape and propagation groups.
12223                 
12224             Example of usage:
12225                 # create PipeTShape with fillet object
12226                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
12227                 # create PipeTShape with fillet object with position
12228                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
12229                 # create PipeTShape with fillet object with left thickness reduction
12230                 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)
12231             """
12232             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)
12233             if (theP1 and theP2 and theP3):
12234               anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12235                                                                     theRL, theWL, theLtransL, theLthinL,
12236                                                                     theRR, theWR, theLtransR, theLthinR,
12237                                                                     theRI, theWI, theLtransI, theLthinI,
12238                                                                     theRF, theHexMesh, theP1, theP2, theP3)
12239             else:
12240               anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
12241                                                         theRL, theWL, theLtransL, theLthinL,
12242                                                         theRR, theWR, theLtransR, theLthinR,
12243                                                         theRI, theWI, theLtransI, theLthinI,
12244                                                         theRF, theHexMesh)
12245             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
12246             if Parameters: anObj[0].SetParameters(Parameters)
12247             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12248             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12249             return anObj
12250
12251         ## This function allows creating a disk already divided into blocks. It
12252         #  can be used to create divided pipes for later meshing in hexaedra.
12253         #  @param theR Radius of the disk
12254         #  @param theOrientation Orientation of the plane on which the disk will be built
12255         #         1 = XOY, 2 = OYZ, 3 = OZX
12256         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12257         #  @param theName Object name; when specified, this parameter is used
12258         #         for result publication in the study. Otherwise, if automatic
12259         #         publication is switched on, default value is used for result name.
12260         #
12261         #  @return New GEOM_Object, containing the created shape.
12262         #
12263         #  @ref tui_creation_divideddisk "Example"
12264         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
12265             """
12266             Creates a disk, divided into blocks. It can be used to create divided pipes
12267             for later meshing in hexaedra.
12268
12269             Parameters:
12270                 theR Radius of the disk
12271                 theOrientation Orientation of the plane on which the disk will be built:
12272                                1 = XOY, 2 = OYZ, 3 = OZX
12273                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12274                 theName Object name; when specified, this parameter is used
12275                         for result publication in the study. Otherwise, if automatic
12276                         publication is switched on, default value is used for result name.
12277
12278             Returns:
12279                 New GEOM_Object, containing the created shape.
12280             """
12281             theR, Parameters = ParseParameters(theR)
12282             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
12283             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
12284             if Parameters: anObj.SetParameters(Parameters)
12285             self._autoPublish(anObj, theName, "dividedDisk")
12286             return anObj
12287             
12288         ## This function allows creating a disk already divided into blocks. It
12289         #  can be used to create divided pipes for later meshing in hexaedra.
12290         #  @param theCenter Center of the disk
12291         #  @param theVector Normal vector to the plane of the created disk
12292         #  @param theRadius Radius of the disk
12293         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12294         #  @param theName Object name; when specified, this parameter is used
12295         #         for result publication in the study. Otherwise, if automatic
12296         #         publication is switched on, default value is used for result name.
12297         #
12298         #  @return New GEOM_Object, containing the created shape.
12299         #
12300         #  @ref tui_creation_divideddisk "Example"
12301         def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
12302             """
12303             Creates a disk already divided into blocks. It can be used to create divided pipes
12304             for later meshing in hexaedra.
12305
12306             Parameters:
12307                 theCenter Center of the disk
12308                 theVector Normal vector to the plane of the created disk
12309                 theRadius Radius of the disk
12310                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12311                 theName Object name; when specified, this parameter is used
12312                         for result publication in the study. Otherwise, if automatic
12313                         publication is switched on, default value is used for result name.
12314
12315             Returns:
12316                 New GEOM_Object, containing the created shape.
12317             """
12318             theRadius, Parameters = ParseParameters(theRadius)
12319             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
12320             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
12321             if Parameters: anObj.SetParameters(Parameters)
12322             self._autoPublish(anObj, theName, "dividedDisk")
12323             return anObj
12324
12325         ## Builds a cylinder prepared for hexa meshes
12326         #  @param theR Radius of the cylinder
12327         #  @param theH Height of the cylinder
12328         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12329         #  @param theName Object name; when specified, this parameter is used
12330         #         for result publication in the study. Otherwise, if automatic
12331         #         publication is switched on, default value is used for result name.
12332         #
12333         #  @return New GEOM_Object, containing the created shape.
12334         #
12335         #  @ref tui_creation_dividedcylinder "Example"
12336         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
12337             """
12338             Builds a cylinder prepared for hexa meshes
12339
12340             Parameters:
12341                 theR Radius of the cylinder
12342                 theH Height of the cylinder
12343                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12344                 theName Object name; when specified, this parameter is used
12345                         for result publication in the study. Otherwise, if automatic
12346                         publication is switched on, default value is used for result name.
12347
12348             Returns:
12349                 New GEOM_Object, containing the created shape.
12350             """
12351             theR, theH, Parameters = ParseParameters(theR, theH)
12352             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
12353             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
12354             if Parameters: anObj.SetParameters(Parameters)
12355             self._autoPublish(anObj, theName, "dividedCylinder")
12356             return anObj
12357
12358         ## Create a surface from a cloud of points
12359         #  @param thelPoints list of points
12360         #  @return New GEOM_Object, containing the created shape.
12361         #
12362         #  @ref tui_creation_smoothingsurface "Example"
12363         def MakeSmoothingSurface(self, thelPoints):
12364             anObj = self.AdvOp.MakeSmoothingSurface(thelPoints)
12365             RaiseIfFailed("MakeSmoothingSurface", self.AdvOp)
12366             return anObj
12367
12368         ## Export a shape to XAO format
12369         #  @param shape The shape to export
12370         #  @param groups The list of groups to export
12371         #  @param fields The list of fields to export
12372         #  @param author The author of the export
12373         #  @param fileName The name of the file to export
12374         #  @return boolean
12375         #
12376         #  @ref tui_exportxao "Example"
12377         def ExportXAO(self, shape, groups, fields, author, fileName):
12378             res = self.InsertOp.ExportXAO(shape, groups, fields, author, fileName)
12379             RaiseIfFailed("ExportXAO", self.InsertOp)
12380             return res
12381
12382         ## Import a shape from XAO format
12383         #  @param shape Shape to export
12384         #  @param fileName The name of the file to import
12385         #  @return tuple (res, shape, subShapes, groups, fields)
12386         #       res Flag indicating if the import was successful
12387         #       shape The imported shape
12388         #       subShapes The list of imported subShapes
12389         #       groups The list of imported groups
12390         #       fields The list of imported fields
12391         #
12392         #  @ref tui_importxao "Example"
12393         def ImportXAO(self, fileName):
12394             res = self.InsertOp.ImportXAO(fileName)
12395             RaiseIfFailed("ImportXAO", self.InsertOp)
12396             return res
12397
12398         #@@ insert new functions before this line @@ do not remove this line @@#
12399
12400         # end of l4_advanced
12401         ## @}
12402
12403         ## Create a copy of the given object
12404         #
12405         #  @param theOriginal geometry object for copy
12406         #  @param theName Object name; when specified, this parameter is used
12407         #         for result publication in the study. Otherwise, if automatic
12408         #         publication is switched on, default value is used for result name.
12409         #
12410         #  @return New GEOM_Object, containing the copied shape.
12411         #
12412         #  @ingroup l1_geomBuilder_auxiliary
12413         #  @ref swig_MakeCopy "Example"
12414         def MakeCopy(self, theOriginal, theName=None):
12415             """
12416             Create a copy of the given object
12417
12418             Parameters:
12419                 theOriginal geometry object for copy
12420                 theName Object name; when specified, this parameter is used
12421                         for result publication in the study. Otherwise, if automatic
12422                         publication is switched on, default value is used for result name.
12423
12424             Returns:
12425                 New GEOM_Object, containing the copied shape.
12426
12427             Example of usage: Copy = geompy.MakeCopy(Box)
12428             """
12429             # Example: see GEOM_TestAll.py
12430             anObj = self.InsertOp.MakeCopy(theOriginal)
12431             RaiseIfFailed("MakeCopy", self.InsertOp)
12432             self._autoPublish(anObj, theName, "copy")
12433             return anObj
12434
12435         ## Add Path to load python scripts from
12436         #  @param Path a path to load python scripts from
12437         #  @ingroup l1_geomBuilder_auxiliary
12438         def addPath(self,Path):
12439             """
12440             Add Path to load python scripts from
12441
12442             Parameters:
12443                 Path a path to load python scripts from
12444             """
12445             if (sys.path.count(Path) < 1):
12446                 sys.path.append(Path)
12447                 pass
12448             pass
12449
12450         ## Load marker texture from the file
12451         #  @param Path a path to the texture file
12452         #  @return unique texture identifier
12453         #  @ingroup l1_geomBuilder_auxiliary
12454         def LoadTexture(self, Path):
12455             """
12456             Load marker texture from the file
12457             
12458             Parameters:
12459                 Path a path to the texture file
12460                 
12461             Returns:
12462                 unique texture identifier
12463             """
12464             # Example: see GEOM_TestAll.py
12465             ID = self.InsertOp.LoadTexture(Path)
12466             RaiseIfFailed("LoadTexture", self.InsertOp)
12467             return ID
12468
12469         ## Get internal name of the object based on its study entry
12470         #  @note This method does not provide an unique identifier of the geometry object.
12471         #  @note This is internal function of GEOM component, though it can be used outside it for 
12472         #  appropriate reason (e.g. for identification of geometry object).
12473         #  @param obj geometry object
12474         #  @return unique object identifier
12475         #  @ingroup l1_geomBuilder_auxiliary
12476         def getObjectID(self, obj):
12477             """
12478             Get internal name of the object based on its study entry.
12479             Note: this method does not provide an unique identifier of the geometry object.
12480             It is an internal function of GEOM component, though it can be used outside GEOM for 
12481             appropriate reason (e.g. for identification of geometry object).
12482
12483             Parameters:
12484                 obj geometry object
12485
12486             Returns:
12487                 unique object identifier
12488             """
12489             ID = ""
12490             entry = salome.ObjectToID(obj)
12491             if entry is not None:
12492                 lst = entry.split(":")
12493                 if len(lst) > 0:
12494                     ID = lst[-1] # -1 means last item in the list            
12495                     return "GEOM_" + ID
12496             return ID
12497                 
12498             
12499
12500         ## Add marker texture. @a Width and @a Height parameters
12501         #  specify width and height of the texture in pixels.
12502         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12503         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12504         #  parameter should be unpacked string, in which '1' symbols represent opaque
12505         #  pixels and '0' represent transparent pixels of the texture bitmap.
12506         #
12507         #  @param Width texture width in pixels
12508         #  @param Height texture height in pixels
12509         #  @param Texture texture data
12510         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12511         #  @return unique texture identifier
12512         #  @ingroup l1_geomBuilder_auxiliary
12513         def AddTexture(self, Width, Height, Texture, RowData=False):
12514             """
12515             Add marker texture. Width and Height parameters
12516             specify width and height of the texture in pixels.
12517             If RowData is True, Texture parameter should represent texture data
12518             packed into the byte array. If RowData is False (default), Texture
12519             parameter should be unpacked string, in which '1' symbols represent opaque
12520             pixels and '0' represent transparent pixels of the texture bitmap.
12521
12522             Parameters:
12523                 Width texture width in pixels
12524                 Height texture height in pixels
12525                 Texture texture data
12526                 RowData if True, Texture data are packed in the byte stream
12527
12528             Returns:
12529                 return unique texture identifier
12530             """
12531             if not RowData: Texture = PackData(Texture)
12532             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12533             RaiseIfFailed("AddTexture", self.InsertOp)
12534             return ID
12535
12536         ## Creates a new folder object. It is a container for any GEOM objects.
12537         #  @param Name name of the container
12538         #  @param Father parent object. If None, 
12539         #         folder under 'Geometry' root object will be created.
12540         #  @return a new created folder
12541         def NewFolder(self, Name, Father=None):
12542             """
12543             Create a new folder object. It is an auxiliary container for any GEOM objects.
12544             
12545             Parameters:
12546                 Name name of the container
12547                 Father parent object. If None, 
12548                 folder under 'Geometry' root object will be created.
12549             
12550             Returns:
12551                 a new created folder
12552             """
12553             if not Father: Father = self.father
12554             return self.CreateFolder(Name, Father)
12555
12556         ## Move object to the specified folder
12557         #  @param Object object to move
12558         #  @param Folder target folder
12559         def PutToFolder(self, Object, Folder):
12560             """
12561             Move object to the specified folder
12562             
12563             Parameters:
12564                 Object object to move
12565                 Folder target folder
12566             """
12567             self.MoveToFolder(Object, Folder)
12568             pass
12569
12570         ## Move list of objects to the specified folder
12571         #  @param ListOfSO list of objects to move
12572         #  @param Folder target folder
12573         def PutListToFolder(self, ListOfSO, Folder):
12574             """
12575             Move list of objects to the specified folder
12576             
12577             Parameters:
12578                 ListOfSO list of objects to move
12579                 Folder target folder
12580             """
12581             self.MoveListToFolder(ListOfSO, Folder)
12582             pass
12583
12584         ## @addtogroup l2_field
12585         ## @{
12586
12587         ## Creates a field
12588         #  @param shape the shape the field lies on
12589         #  @param name the field name
12590         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
12591         #  @param dimension dimension of the shape the field lies on
12592         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12593         #  @param componentNames names of components
12594         #  @return a created field
12595         def CreateField(self, shape, name, type, dimension, componentNames):
12596             """
12597             Creates a field
12598
12599             Parameters:
12600                 shape the shape the field lies on
12601                 name  the field name
12602                 type  type of field data
12603                 dimension dimension of the shape the field lies on
12604                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12605                 componentNames names of components
12606             
12607             Returns:
12608                 a created field
12609             """
12610             if isinstance( type, int ):
12611                 if type < 0 or type > 3:
12612                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
12613                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
12614
12615             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
12616             RaiseIfFailed("CreateField", self.FieldOp)
12617             global geom
12618             geom._autoPublish( f, "", name)
12619             return f
12620
12621         ## Removes a field from the GEOM component
12622         #  @param field the field to remove
12623         def RemoveField(self, field):
12624             "Removes a field from the GEOM component"
12625             global geom
12626             if isinstance( field, GEOM._objref_GEOM_Field ):
12627                 geom.RemoveObject( field )
12628             elif isinstance( field, geomField ):
12629                 geom.RemoveObject( field.field )
12630             else:
12631                 raise RuntimeError, "RemoveField() : the object is not a field"
12632             return
12633
12634         ## Returns number of fields on a shape
12635         def CountFields(self, shape):
12636             "Returns number of fields on a shape"
12637             nb = self.FieldOp.CountFields( shape )
12638             RaiseIfFailed("CountFields", self.FieldOp)
12639             return nb
12640
12641         ## Returns all fields on a shape
12642         def GetFields(self, shape):
12643             "Returns all fields on a shape"
12644             ff = self.FieldOp.GetFields( shape )
12645             RaiseIfFailed("GetFields", self.FieldOp)
12646             return ff
12647
12648         ## Returns a field on a shape by its name
12649         def GetField(self, shape, name):
12650             "Returns a field on a shape by its name"
12651             f = self.FieldOp.GetField( shape, name )
12652             RaiseIfFailed("GetField", self.FieldOp)
12653             return f
12654
12655         # end of l2_field
12656         ## @}
12657
12658
12659 import omniORB
12660 # Register the new proxy for GEOM_Gen
12661 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
12662
12663
12664 ## Field on Geometry
12665 #  @ingroup l2_field
12666 class geomField( GEOM._objref_GEOM_Field ):
12667
12668     def __init__(self):
12669         GEOM._objref_GEOM_Field.__init__(self)
12670         self.field = GEOM._objref_GEOM_Field
12671         return
12672
12673     ## Returns the shape the field lies on
12674     def getShape(self):
12675         "Returns the shape the field lies on"
12676         return self.field.GetShape(self)
12677
12678     ## Returns the field name
12679     def getName(self):
12680         "Returns the field name"
12681         return self.field.GetName(self)
12682
12683     ## Returns type of field data as integer [0-3]
12684     def getType(self):
12685         "Returns type of field data"
12686         return self.field.GetDataType(self)._v
12687
12688     ## Returns type of field data:
12689     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
12690     def getTypeEnum(self):
12691         "Returns type of field data"
12692         return self.field.GetDataType(self)
12693
12694     ## Returns dimension of the shape the field lies on:
12695     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12696     def getDimension(self):
12697         """Returns dimension of the shape the field lies on:
12698         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
12699         return self.field.GetDimension(self)
12700
12701     ## Returns names of components
12702     def getComponents(self):
12703         "Returns names of components"
12704         return self.field.GetComponents(self)
12705
12706     ## Adds a time step to the field
12707     #  @param step the time step number futher used as the step identifier
12708     #  @param stamp the time step time
12709     #  @param values the values of the time step
12710     def addStep(self, step, stamp, values):
12711         "Adds a time step to the field"
12712         stp = self.field.AddStep( self, step, stamp )
12713         if not stp:
12714             raise RuntimeError, \
12715                   "Field.addStep() : Error: step %s already exists in this field"%step
12716         global geom
12717         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
12718         self.setValues( step, values )
12719         return stp
12720
12721     ## Remove a time step from the field
12722     def removeStep(self,step):
12723         "Remove a time step from the field"
12724         stepSO = None
12725         try:
12726             stepObj = self.field.GetStep( self, step )
12727             if stepObj:
12728                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
12729         except:
12730             #import traceback
12731             #traceback.print_exc()
12732             pass
12733         self.field.RemoveStep( self, step )
12734         if stepSO:
12735             geom.myBuilder.RemoveObjectWithChildren( stepSO )
12736         return
12737
12738     ## Returns number of time steps in the field
12739     def countSteps(self):
12740         "Returns number of time steps in the field"
12741         return self.field.CountSteps(self)
12742
12743     ## Returns a list of time step IDs in the field
12744     def getSteps(self):
12745         "Returns a list of time step IDs in the field"
12746         return self.field.GetSteps(self)
12747
12748     ## Returns a time step by its ID
12749     def getStep(self,step):
12750         "Returns a time step by its ID"
12751         stp = self.field.GetStep(self, step)
12752         if not stp:
12753             raise RuntimeError, "Step %s is missing from this field"%step
12754         return stp
12755
12756     ## Returns the time of the field step
12757     def getStamp(self,step):
12758         "Returns the time of the field step"
12759         return self.getStep(step).GetStamp()
12760
12761     ## Changes the time of the field step
12762     def setStamp(self, step, stamp):
12763         "Changes the time of the field step"
12764         return self.getStep(step).SetStamp(stamp)
12765
12766     ## Returns values of the field step
12767     def getValues(self, step):
12768         "Returns values of the field step"
12769         return self.getStep(step).GetValues()
12770
12771     ## Changes values of the field step
12772     def setValues(self, step, values):
12773         "Changes values of the field step"
12774         stp = self.getStep(step)
12775         errBeg = "Field.setValues(values) : Error: "
12776         try:
12777             ok = stp.SetValues( values )
12778         except Exception, e:
12779             excStr = str(e)
12780             if excStr.find("WrongPythonType") > 0:
12781                 raise RuntimeError, errBeg +\
12782                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
12783             raise RuntimeError, errBeg + str(e)
12784         if not ok:
12785             nbOK = self.field.GetArraySize(self)
12786             nbKO = len(values)
12787             if nbOK != nbKO:
12788                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
12789             else:
12790                 raise RuntimeError, errBeg + "failed"
12791         return
12792
12793     pass # end of class geomField
12794
12795 # Register the new proxy for GEOM_Field
12796 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
12797
12798
12799 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
12800 #  interface to GEOM operations.
12801 #
12802 #  Typical use is:
12803 #  \code
12804 #    import salome
12805 #    salome.salome_init()
12806 #    from salome.geom import geomBuilder
12807 #    geompy = geomBuilder.New(salome.myStudy)
12808 #  \endcode
12809 #  @param  study     SALOME study, generally obtained by salome.myStudy.
12810 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12811 #  @return geomBuilder instance
12812 def New( study, instance=None):
12813     """
12814     Create a new geomBuilder instance.The geomBuilder class provides the Python
12815     interface to GEOM operations.
12816
12817     Typical use is:
12818         import salome
12819         salome.salome_init()
12820         from salome.geom import geomBuilder
12821         geompy = geomBuilder.New(salome.myStudy)
12822
12823     Parameters:
12824         study     SALOME study, generally obtained by salome.myStudy.
12825         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12826     Returns:
12827         geomBuilder instance
12828     """
12829     #print "New geomBuilder ", study, instance
12830     global engine
12831     global geom
12832     global doLcc
12833     engine = instance
12834     if engine is None:
12835       doLcc = True
12836     geom = geomBuilder()
12837     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
12838     geom.init_geom(study)
12839     return geom