Salome HOME
Merge from BR_new_bop4 (porting to new OCCT BOP) 13/09/2013
[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
196 ## @}
197
198 # initialize SALOME session in try/except block
199 # to avoid problems in some cases, e.g. when generating documentation
200 try:
201     import salome
202     salome.salome_init()
203     from salome import *
204 except:
205     pass
206
207 from salome_notebook import *
208
209 import GEOM
210 import math
211 import os
212
213 from salome.geom.gsketcher import Sketcher3D, Sketcher2D
214
215 # service function
216 def _toListOfNames(_names, _size=-1):
217     l = []
218     import types
219     if type(_names) in [types.ListType, types.TupleType]:
220         for i in _names: l.append(i)
221     elif _names:
222         l.append(_names)
223     if l and len(l) < _size:
224         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
225     return l
226
227 ## Raise an Error, containing the Method_name, if Operation is Failed
228 ## @ingroup l1_geomBuilder_auxiliary
229 def RaiseIfFailed (Method_name, Operation):
230     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
231         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
232
233 ## Return list of variables value from salome notebook
234 ## @ingroup l1_geomBuilder_auxiliary
235 def ParseParameters(*parameters):
236     Result = []
237     StringResult = []
238     for parameter in parameters:
239         if isinstance(parameter, list):
240             lResults = ParseParameters(*parameter)
241             if len(lResults) > 0:
242                 Result.append(lResults[:-1])
243                 StringResult += lResults[-1].split(":")
244                 pass
245             pass
246         else:
247             if isinstance(parameter,str):
248                 if notebook.isVariable(parameter):
249                     Result.append(notebook.get(parameter))
250                 else:
251                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
252                 pass
253             else:
254                 Result.append(parameter)
255                 pass
256             StringResult.append(str(parameter))
257             pass
258         pass
259     if Result:
260         Result.append(":".join(StringResult))
261     else:
262         Result = ":".join(StringResult)
263     return Result
264
265 ## Return list of variables value from salome notebook
266 ## @ingroup l1_geomBuilder_auxiliary
267 def ParseList(list):
268     Result = []
269     StringResult = ""
270     for parameter in list:
271         if isinstance(parameter,str) and notebook.isVariable(parameter):
272             Result.append(str(notebook.get(parameter)))
273             pass
274         else:
275             Result.append(str(parameter))
276             pass
277
278         StringResult = StringResult + str(parameter)
279         StringResult = StringResult + ":"
280         pass
281     StringResult = StringResult[:len(StringResult)-1]
282     return Result, StringResult
283
284 ## Return list of variables value from salome notebook
285 ## @ingroup l1_geomBuilder_auxiliary
286 def ParseSketcherCommand(command):
287     Result = ""
288     StringResult = ""
289     sections = command.split(":")
290     for section in sections:
291         parameters = section.split(" ")
292         paramIndex = 1
293         for parameter in parameters:
294             if paramIndex > 1 and parameter.find("'") != -1:
295                 parameter = parameter.replace("'","")
296                 if notebook.isVariable(parameter):
297                     Result = Result + str(notebook.get(parameter)) + " "
298                     pass
299                 else:
300                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
301                     pass
302                 pass
303             else:
304                 Result = Result + str(parameter) + " "
305                 pass
306             if paramIndex > 1:
307                 StringResult = StringResult + parameter
308                 StringResult = StringResult + ":"
309                 pass
310             paramIndex = paramIndex + 1
311             pass
312         Result = Result[:len(Result)-1] + ":"
313         pass
314     Result = Result[:len(Result)-1]
315     return Result, StringResult
316
317 ## Helper function which can be used to pack the passed string to the byte data.
318 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
319 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
320 ## For example,
321 ## \code
322 ## val = PackData("10001110") # val = 0xAE
323 ## val = PackData("1")        # val = 0x80
324 ## \endcode
325 ## @param data unpacked data - a string containing '1' and '0' symbols
326 ## @return data packed to the byte stream
327 ## @ingroup l1_geomBuilder_auxiliary
328 def PackData(data):
329     """
330     Helper function which can be used to pack the passed string to the byte data.
331     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
332     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
333
334     Parameters:
335         data unpacked data - a string containing '1' and '0' symbols
336
337     Returns:
338         data packed to the byte stream
339         
340     Example of usage:
341         val = PackData("10001110") # val = 0xAE
342         val = PackData("1")        # val = 0x80
343     """
344     bytes = len(data)/8
345     if len(data)%8: bytes += 1
346     res = ""
347     for b in range(bytes):
348         d = data[b*8:(b+1)*8]
349         val = 0
350         for i in range(8):
351             val *= 2
352             if i < len(d):
353                 if d[i] == "1": val += 1
354                 elif d[i] != "0":
355                     raise "Invalid symbol %s" % d[i]
356                 pass
357             pass
358         res += chr(val)
359         pass
360     return res
361
362 ## Read bitmap texture from the text file.
363 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
364 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
365 ## The function returns width and height of the pixmap in pixels and byte stream representing
366 ## texture bitmap itself.
367 ##
368 ## This function can be used to read the texture to the byte stream in order to pass it to
369 ## the AddTexture() function of geomBuilder class.
370 ## For example,
371 ## \code
372 ## from salome.geom import geomBuilder
373 ## geompy = geomBuilder.New(salome.myStudy)
374 ## texture = geompy.readtexture('mytexture.dat')
375 ## texture = geompy.AddTexture(*texture)
376 ## obj.SetMarkerTexture(texture)
377 ## \endcode
378 ## @param fname texture file name
379 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
380 ## @ingroup l1_geomBuilder_auxiliary
381 def ReadTexture(fname):
382     """
383     Read bitmap texture from the text file.
384     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
385     A zero symbol ('0') represents transparent pixel of the texture bitmap.
386     The function returns width and height of the pixmap in pixels and byte stream representing
387     texture bitmap itself.
388     This function can be used to read the texture to the byte stream in order to pass it to
389     the AddTexture() function of geomBuilder class.
390     
391     Parameters:
392         fname texture file name
393
394     Returns:
395         sequence of tree values: texture's width, height in pixels and its byte stream
396     
397     Example of usage:
398         from salome.geom import geomBuilder
399         geompy = geomBuilder.New(salome.myStudy)
400         texture = geompy.readtexture('mytexture.dat')
401         texture = geompy.AddTexture(*texture)
402         obj.SetMarkerTexture(texture)
403     """
404     try:
405         f = open(fname)
406         lines = [ l.strip() for l in f.readlines()]
407         f.close()
408         maxlen = 0
409         if lines: maxlen = max([len(x) for x in lines])
410         lenbytes = maxlen/8
411         if maxlen%8: lenbytes += 1
412         bytedata=""
413         for line in lines:
414             if len(line)%8:
415                 lenline = (len(line)/8+1)*8
416                 pass
417             else:
418                 lenline = (len(line)/8)*8
419                 pass
420             for i in range(lenline/8):
421                 byte=""
422                 for j in range(8):
423                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
424                     else: byte += "0"
425                     pass
426                 bytedata += PackData(byte)
427                 pass
428             for i in range(lenline/8, lenbytes):
429                 bytedata += PackData("0")
430             pass
431         return lenbytes*8, len(lines), bytedata
432     except:
433         pass
434     return 0, 0, ""
435
436 ## Returns a long value from enumeration type
437 #  Can be used for CORBA enumerator types like GEOM.shape_type
438 #  @param theItem enumeration type
439 #  @ingroup l1_geomBuilder_auxiliary
440 def EnumToLong(theItem):
441     """
442     Returns a long value from enumeration type
443     Can be used for CORBA enumerator types like geomBuilder.ShapeType
444
445     Parameters:
446         theItem enumeration type
447     """
448     ret = theItem
449     if hasattr(theItem, "_v"): ret = theItem._v
450     return ret
451
452 ## Information about closed/unclosed state of shell or wire
453 #  @ingroup l1_geomBuilder_auxiliary
454 class info:
455     """
456     Information about closed/unclosed state of shell or wire
457     """
458     UNKNOWN  = 0
459     CLOSED   = 1
460     UNCLOSED = 2
461
462 ##! Private class used to bind calls of plugin operations to geomBuilder
463 class PluginOperation:
464   def __init__(self, operation, function):
465     self.operation = operation
466     self.function = function
467     pass
468
469   def __call__(self, *args):
470     res = self.function(self.operation, *args)
471     RaiseIfFailed(self.function.__name__, self.operation)
472     return res
473
474 # Warning: geom is a singleton
475 geom = None
476 engine = None
477 doLcc = False
478 created = False
479
480 class geomBuilder(object, GEOM._objref_GEOM_Gen):
481
482         ## Enumeration ShapeType as a dictionary. \n
483         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
484         #  @ingroup l1_geomBuilder_auxiliary
485         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
486
487         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
488         #  and a list of parameters, describing the shape.
489         #  List of parameters, describing the shape:
490         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
491         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
492         #
493         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
494         #
495         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
496         #
497         #  - SPHERE:       [xc yc zc            R]
498         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
499         #  - BOX:          [xc yc zc                      ax ay az]
500         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
501         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
502         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
503         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
504         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
505         #
506         #  - SPHERE2D:     [xc yc zc            R]
507         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
508         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
509         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
510         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
511         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
512         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
513         #  - PLANE:        [xo yo zo  dx dy dz]
514         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
515         #  - FACE:                                       [nb_edges  nb_vertices]
516         #
517         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
518         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
519         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
520         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
521         #  - LINE:         [xo yo zo  dx dy dz]
522         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
523         #  - EDGE:                                                 [nb_vertices]
524         #
525         #  - VERTEX:       [x  y  z]
526         #  @ingroup l1_geomBuilder_auxiliary
527         kind = GEOM.GEOM_IKindOfShape
528
529         def __new__(cls):
530             global engine
531             global geom
532             global doLcc
533             global created
534             #print "==== __new__ ", engine, geom, doLcc, created
535             if geom is None:
536                 # geom engine is either retrieved from engine, or created
537                 geom = engine
538                 # Following test avoids a recursive loop
539                 if doLcc:
540                     if geom is not None:
541                         # geom engine not created: existing engine found
542                         doLcc = False
543                     if doLcc and not created:
544                         doLcc = False
545                         # FindOrLoadComponent called:
546                         # 1. CORBA resolution of server
547                         # 2. the __new__ method is called again
548                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
549                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
550                         #print "====1 ",geom
551                 else:
552                     # FindOrLoadComponent not called
553                     if geom is None:
554                         # geomBuilder instance is created from lcc.FindOrLoadComponent
555                         #print "==== super ", engine, geom, doLcc, created
556                         geom = super(geomBuilder,cls).__new__(cls)
557                         #print "====2 ",geom
558                     else:
559                         # geom engine not created: existing engine found
560                         #print "==== existing ", engine, geom, doLcc, created
561                         pass
562                 #print "return geom 1 ", geom
563                 return geom
564
565             #print "return geom 2 ", geom
566             return geom
567
568         def __init__(self):
569             global created
570             #print "-------- geomBuilder __init__ --- ", created, self
571             if not created:
572               created = True
573               GEOM._objref_GEOM_Gen.__init__(self)
574               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
575               self.myBuilder = None
576               self.myStudyId = 0
577               self.father    = None
578
579               self.BasicOp  = None
580               self.CurvesOp = None
581               self.PrimOp   = None
582               self.ShapesOp = None
583               self.HealOp   = None
584               self.InsertOp = None
585               self.BoolOp   = None
586               self.TrsfOp   = None
587               self.LocalOp  = None
588               self.MeasuOp  = None
589               self.BlocksOp = None
590               self.GroupOp  = None
591               self.AdvOp    = None
592             pass
593
594         ## Process object publication in the study, as follows:
595         #  - if @a theName is specified (not None), the object is published in the study
596         #    with this name, not taking into account "auto-publishing" option;
597         #  - if @a theName is NOT specified, the object is published in the study
598         #    (using default name, which can be customized using @a theDefaultName parameter)
599         #    only if auto-publishing is switched on.
600         #
601         #  @param theObj  object, a subject for publishing
602         #  @param theName object name for study
603         #  @param theDefaultName default name for the auto-publishing
604         #
605         #  @sa addToStudyAuto()
606         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
607             # ---
608             def _item_name(_names, _defname, _idx=-1):
609                 if not _names: _names = _defname
610                 if type(_names) in [types.ListType, types.TupleType]:
611                     if _idx >= 0:
612                         if _idx >= len(_names) or not _names[_idx]:
613                             if type(_defname) not in [types.ListType, types.TupleType]:
614                                 _name = "%s_%d"%(_defname, _idx+1)
615                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
616                                 _name = _defname[_idx]
617                             else:
618                                 _name = "%noname_%d"%(dn, _idx+1)
619                             pass
620                         else:
621                             _name = _names[_idx]
622                         pass
623                     else:
624                         # must be wrong  usage
625                         _name = _names[0]
626                     pass
627                 else:
628                     if _idx >= 0:
629                         _name = "%s_%d"%(_names, _idx+1)
630                     else:
631                         _name = _names
632                     pass
633                 return _name
634             # ---
635             if not theObj:
636                 return # null object
637             if not theName and not self.myMaxNbSubShapesAllowed:
638                 return # nothing to do: auto-publishing is disabled
639             if not theName and not theDefaultName:
640                 return # neither theName nor theDefaultName is given
641             import types
642             if type(theObj) in [types.ListType, types.TupleType]:
643                 # list of objects is being published
644                 idx = 0
645                 for obj in theObj:
646                     if not obj: continue # bad object
647                     ###if obj.GetStudyEntry(): continue # already published
648                     name = _item_name(theName, theDefaultName, idx)
649                     if obj.IsMainShape() or not obj.GetMainShape().GetStudyEntry():
650                         self.addToStudy(obj, name) # "%s_%d"%(aName, idx)
651                     else:
652                         self.addToStudyInFather(obj.GetMainShape(), obj, name) # "%s_%d"%(aName, idx)
653                         pass
654                     idx = idx+1
655                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
656                     pass
657                 pass
658             else:
659                 # single object is published
660                 ###if theObj.GetStudyEntry(): return # already published
661                 name = _item_name(theName, theDefaultName)
662                 if theObj.IsMainShape():
663                     self.addToStudy(theObj, name)
664                 else:
665                     self.addToStudyInFather(theObj.GetMainShape(), theObj, name)
666                     pass
667                 pass
668             pass
669
670         ## @addtogroup l1_geomBuilder_auxiliary
671         ## @{
672         def init_geom(self,theStudy):
673             self.myStudy = theStudy
674             self.myStudyId = self.myStudy._get_StudyId()
675             self.myBuilder = self.myStudy.NewBuilder()
676             self.father = self.myStudy.FindComponent("GEOM")
677             if self.father is None:
678                 self.father = self.myBuilder.NewComponent("GEOM")
679                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
680                 FName = A1._narrow(SALOMEDS.AttributeName)
681                 FName.SetValue("Geometry")
682                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
683                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
684                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
685                 self.myBuilder.DefineComponentInstance(self.father,self)
686                 pass
687             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
688             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
689             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
690             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
691             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
692             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
693             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
694             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
695             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
696             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
697             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
698             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
699             #self.AdvOp    = self.GetIAdvancedOperations (self.myStudyId)
700             self.AdvOp    = self.GetPluginOperations (self.myStudyId, "AdvancedEngine")
701             # set GEOM as root in the use case tree
702             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
703             self.myUseCaseBuilder.SetRootCurrent()
704             self.myUseCaseBuilder.Append(self.father)
705             pass
706
707         def GetPluginOperations(self, studyID, libraryName):
708             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
709             if op:
710                 # bind methods of operations to self
711                 methods = op.__class__.__dict__['__methods__']
712                 avoid_methods = self.BasicOp.__class__.__dict__['__methods__']
713                 for meth_name in methods:
714                     if not meth_name in avoid_methods: # avoid basic methods
715                         function = getattr(op.__class__, meth_name)
716                         if callable(function):
717                             #self.__dict__[meth_name] = self.__PluginOperation(op, function)
718                             self.__dict__[meth_name] = PluginOperation(op, function)
719             return op
720
721         ## Enable / disable results auto-publishing
722         # 
723         #  The automatic publishing is managed in the following way:
724         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
725         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
726         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
727         #  value passed as parameter has the same effect.
728         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
729         #  maximum number of sub-shapes allowed for publishing is set to specified value.
730         #
731         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
732         #  @ingroup l1_publish_data
733         def addToStudyAuto(self, maxNbSubShapes=-1):
734             """
735             Enable / disable results auto-publishing
736
737             The automatic publishing is managed in the following way:
738             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
739             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
740             maximum number of sub-shapes allowed for publishing is unlimited; any negative
741             value passed as parameter has the same effect.
742             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
743             maximum number of sub-shapes allowed for publishing is set to this value.
744
745             Parameters:
746                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
747
748             Example of usage:
749                 geompy.addToStudyAuto()   # enable auto-publishing
750                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
751                 geompy.addToStudyAuto(0)  # disable auto-publishing
752             """
753             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
754             pass
755
756         ## Dump component to the Python script
757         #  This method overrides IDL function to allow default values for the parameters.
758         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
759             """
760             Dump component to the Python script
761             This method overrides IDL function to allow default values for the parameters.
762             """
763             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
764
765         ## Get name for sub-shape aSubObj of shape aMainObj
766         #
767         # @ref swig_SubShapeName "Example"
768         def SubShapeName(self,aSubObj, aMainObj):
769             """
770             Get name for sub-shape aSubObj of shape aMainObj
771             """
772             # Example: see GEOM_TestAll.py
773
774             #aSubId  = orb.object_to_string(aSubObj)
775             #aMainId = orb.object_to_string(aMainObj)
776             #index = gg.getIndexTopology(aSubId, aMainId)
777             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
778             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
779             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
780             return name
781
782         ## Publish in study aShape with name aName
783         #
784         #  \param aShape the shape to be published
785         #  \param aName  the name for the shape
786         #  \param doRestoreSubShapes if True, finds and publishes also
787         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
788         #         and published sub-shapes of arguments
789         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
790         #                                                  these arguments description
791         #  \return study entry of the published shape in form of string
792         #
793         #  @ingroup l1_publish_data
794         #  @ref swig_all_addtostudy "Example"
795         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
796                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
797             """
798             Publish in study aShape with name aName
799
800             Parameters:
801                 aShape the shape to be published
802                 aName  the name for the shape
803                 doRestoreSubShapes if True, finds and publishes also
804                                    sub-shapes of aShape, corresponding to its arguments
805                                    and published sub-shapes of arguments
806                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
807                                                          these arguments description
808
809             Returns:
810                 study entry of the published shape in form of string
811
812             Example of usage:
813                 id_block1 = geompy.addToStudy(Block1, "Block 1")
814             """
815             # Example: see GEOM_TestAll.py
816             try:
817                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
818                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
819                 if doRestoreSubShapes:
820                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
821                                             theFindMethod, theInheritFirstArg, True )
822             except:
823                 print "addToStudy() failed"
824                 return ""
825             return aShape.GetStudyEntry()
826
827         ## Publish in study aShape with name aName as sub-object of previously published aFather
828         #  \param aFather previously published object
829         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
830         #  \param aName  the name for the shape
831         #
832         #  \return study entry of the published shape in form of string
833         #
834         #  @ingroup l1_publish_data
835         #  @ref swig_all_addtostudyInFather "Example"
836         def addToStudyInFather(self, aFather, aShape, aName):
837             """
838             Publish in study aShape with name aName as sub-object of previously published aFather
839
840             Parameters:
841                 aFather previously published object
842                 aShape the shape to be published as sub-object of aFather
843                 aName  the name for the shape
844
845             Returns:
846                 study entry of the published shape in form of string
847             """
848             # Example: see GEOM_TestAll.py
849             try:
850                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
851                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
852             except:
853                 print "addToStudyInFather() failed"
854                 return ""
855             return aShape.GetStudyEntry()
856
857         ## Unpublish object in study
858         #
859         #  \param obj the object to be unpublished
860         def hideInStudy(self, obj):
861             """
862             Unpublish object in study
863
864             Parameters:
865                 obj the object to be unpublished
866             """
867             ior = salome.orb.object_to_string(obj)
868             aSObject = self.myStudy.FindObjectIOR(ior)
869             if aSObject is not None:
870                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
871                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
872                 drwAttribute.SetDrawable(False)
873                 pass
874
875         # end of l1_geomBuilder_auxiliary
876         ## @}
877
878         ## @addtogroup l3_restore_ss
879         ## @{
880
881         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
882         #  To be used from python scripts out of addToStudy() (non-default usage)
883         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
884         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
885         #                   If this list is empty, all operation arguments will be published
886         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
887         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
888         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
889         #                            Do not publish sub-shapes in place of arguments, but only
890         #                            in place of sub-shapes of the first argument,
891         #                            because the whole shape corresponds to the first argument.
892         #                            Mainly to be used after transformations, but it also can be
893         #                            usefull after partition with one object shape, and some other
894         #                            operations, where only the first argument has to be considered.
895         #                            If theObject has only one argument shape, this flag is automatically
896         #                            considered as True, not regarding really passed value.
897         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
898         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
899         #  \return list of published sub-shapes
900         #
901         #  @ref tui_restore_prs_params "Example"
902         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
903                               theInheritFirstArg=False, theAddPrefix=True):
904             """
905             Publish sub-shapes, standing for arguments and sub-shapes of arguments
906             To be used from python scripts out of geompy.addToStudy (non-default usage)
907
908             Parameters:
909                 theObject published GEOM.GEOM_Object, arguments of which will be published
910                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
911                           If this list is empty, all operation arguments will be published
912                 theFindMethod method to search sub-shapes, corresponding to arguments and
913                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
914                 theInheritFirstArg set properties of the first argument for theObject.
915                                    Do not publish sub-shapes in place of arguments, but only
916                                    in place of sub-shapes of the first argument,
917                                    because the whole shape corresponds to the first argument.
918                                    Mainly to be used after transformations, but it also can be
919                                    usefull after partition with one object shape, and some other
920                                    operations, where only the first argument has to be considered.
921                                    If theObject has only one argument shape, this flag is automatically
922                                    considered as True, not regarding really passed value.
923                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
924                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
925             Returns:
926                 list of published sub-shapes
927             """
928             # Example: see GEOM_TestAll.py
929             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
930                                           theFindMethod, theInheritFirstArg, theAddPrefix)
931
932         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
933         #  To be used from python scripts out of addToStudy() (non-default usage)
934         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
935         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
936         #                   If this list is empty, all operation arguments will be published
937         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
938         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
939         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
940         #                            Do not publish sub-shapes in place of arguments, but only
941         #                            in place of sub-shapes of the first argument,
942         #                            because the whole shape corresponds to the first argument.
943         #                            Mainly to be used after transformations, but it also can be
944         #                            usefull after partition with one object shape, and some other
945         #                            operations, where only the first argument has to be considered.
946         #                            If theObject has only one argument shape, this flag is automatically
947         #                            considered as True, not regarding really passed value.
948         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
949         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
950         #  \return list of published sub-shapes
951         #
952         #  @ref tui_restore_prs_params "Example"
953         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
954                                    theInheritFirstArg=False, theAddPrefix=True):
955             """
956             Publish sub-shapes, standing for arguments and sub-shapes of arguments
957             To be used from python scripts out of geompy.addToStudy() (non-default usage)
958
959             Parameters:
960                 theObject published GEOM.GEOM_Object, arguments of which will be published
961                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
962                           If this list is empty, all operation arguments will be published
963                 theFindMethod method to search sub-shapes, corresponding to arguments and
964                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
965                 theInheritFirstArg set properties of the first argument for theObject.
966                                    Do not publish sub-shapes in place of arguments, but only
967                                    in place of sub-shapes of the first argument,
968                                    because the whole shape corresponds to the first argument.
969                                    Mainly to be used after transformations, but it also can be
970                                    usefull after partition with one object shape, and some other
971                                    operations, where only the first argument has to be considered.
972                                    If theObject has only one argument shape, this flag is automatically
973                                    considered as True, not regarding really passed value.
974                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
975                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
976
977             Returns: 
978                 list of published sub-shapes
979             """
980             # Example: see GEOM_TestAll.py
981             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
982                                                theFindMethod, theInheritFirstArg, theAddPrefix)
983
984         # end of l3_restore_ss
985         ## @}
986
987         ## @addtogroup l3_basic_go
988         ## @{
989
990         ## Create point by three coordinates.
991         #  @param theX The X coordinate of the point.
992         #  @param theY The Y coordinate of the point.
993         #  @param theZ The Z coordinate of the point.
994         #  @param theName Object name; when specified, this parameter is used
995         #         for result publication in the study. Otherwise, if automatic
996         #         publication is switched on, default value is used for result name.
997         #
998         #  @return New GEOM.GEOM_Object, containing the created point.
999         #
1000         #  @ref tui_creation_point "Example"
1001         def MakeVertex(self, theX, theY, theZ, theName=None):
1002             """
1003             Create point by three coordinates.
1004
1005             Parameters:
1006                 theX The X coordinate of the point.
1007                 theY The Y coordinate of the point.
1008                 theZ The Z coordinate of the point.
1009                 theName Object name; when specified, this parameter is used
1010                         for result publication in the study. Otherwise, if automatic
1011                         publication is switched on, default value is used for result name.
1012                 
1013             Returns: 
1014                 New GEOM.GEOM_Object, containing the created point.
1015             """
1016             # Example: see GEOM_TestAll.py
1017             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1018             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1019             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1020             anObj.SetParameters(Parameters)
1021             self._autoPublish(anObj, theName, "vertex")
1022             return anObj
1023
1024         ## Create a point, distant from the referenced point
1025         #  on the given distances along the coordinate axes.
1026         #  @param theReference The referenced point.
1027         #  @param theX Displacement from the referenced point along OX axis.
1028         #  @param theY Displacement from the referenced point along OY axis.
1029         #  @param theZ Displacement from the referenced point along OZ axis.
1030         #  @param theName Object name; when specified, this parameter is used
1031         #         for result publication in the study. Otherwise, if automatic
1032         #         publication is switched on, default value is used for result name.
1033         #
1034         #  @return New GEOM.GEOM_Object, containing the created point.
1035         #
1036         #  @ref tui_creation_point "Example"
1037         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1038             """
1039             Create a point, distant from the referenced point
1040             on the given distances along the coordinate axes.
1041
1042             Parameters:
1043                 theReference The referenced point.
1044                 theX Displacement from the referenced point along OX axis.
1045                 theY Displacement from the referenced point along OY axis.
1046                 theZ Displacement from the referenced point along OZ axis.
1047                 theName Object name; when specified, this parameter is used
1048                         for result publication in the study. Otherwise, if automatic
1049                         publication is switched on, default value is used for result name.
1050
1051             Returns:
1052                 New GEOM.GEOM_Object, containing the created point.
1053             """
1054             # Example: see GEOM_TestAll.py
1055             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1056             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1057             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1058             anObj.SetParameters(Parameters)
1059             self._autoPublish(anObj, theName, "vertex")
1060             return anObj
1061
1062         ## Create a point, corresponding to the given parameter on the given curve.
1063         #  @param theRefCurve The referenced curve.
1064         #  @param theParameter Value of parameter on the referenced curve.
1065         #  @param theName Object name; when specified, this parameter is used
1066         #         for result publication in the study. Otherwise, if automatic
1067         #         publication is switched on, default value is used for result name.
1068         #
1069         #  @return New GEOM.GEOM_Object, containing the created point.
1070         #
1071         #  @ref tui_creation_point "Example"
1072         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1073             """
1074             Create a point, corresponding to the given parameter on the given curve.
1075
1076             Parameters:
1077                 theRefCurve The referenced curve.
1078                 theParameter Value of parameter on the referenced curve.
1079                 theName Object name; when specified, this parameter is used
1080                         for result publication in the study. Otherwise, if automatic
1081                         publication is switched on, default value is used for result name.
1082
1083             Returns:
1084                 New GEOM.GEOM_Object, containing the created point.
1085
1086             Example of usage:
1087                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1088             """
1089             # Example: see GEOM_TestAll.py
1090             theParameter, Parameters = ParseParameters(theParameter)
1091             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1092             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1093             anObj.SetParameters(Parameters)
1094             self._autoPublish(anObj, theName, "vertex")
1095             return anObj
1096
1097         ## Create a point by projection give coordinates on the given curve
1098         #  @param theRefCurve The referenced curve.
1099         #  @param theX X-coordinate in 3D space
1100         #  @param theY Y-coordinate in 3D space
1101         #  @param theZ Z-coordinate in 3D space
1102         #  @param theName Object name; when specified, this parameter is used
1103         #         for result publication in the study. Otherwise, if automatic
1104         #         publication is switched on, default value is used for result name.
1105         #
1106         #  @return New GEOM.GEOM_Object, containing the created point.
1107         #
1108         #  @ref tui_creation_point "Example"
1109         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1110             """
1111             Create a point by projection give coordinates on the given curve
1112             
1113             Parameters:
1114                 theRefCurve The referenced curve.
1115                 theX X-coordinate in 3D space
1116                 theY Y-coordinate in 3D space
1117                 theZ Z-coordinate in 3D space
1118                 theName Object name; when specified, this parameter is used
1119                         for result publication in the study. Otherwise, if automatic
1120                         publication is switched on, default value is used for result name.
1121
1122             Returns:
1123                 New GEOM.GEOM_Object, containing the created point.
1124
1125             Example of usage:
1126                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1127             """
1128             # Example: see GEOM_TestAll.py
1129             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1130             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1131             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1132             anObj.SetParameters(Parameters)
1133             self._autoPublish(anObj, theName, "vertex")
1134             return anObj
1135
1136         ## Create a point, corresponding to the given length on the given curve.
1137         #  @param theRefCurve The referenced curve.
1138         #  @param theLength Length on the referenced curve. It can be negative.
1139         #  @param theStartPoint Point allowing to choose the direction for the calculation
1140         #                       of the length. If None, start from the first point of theRefCurve.
1141         #  @param theName Object name; when specified, this parameter is used
1142         #         for result publication in the study. Otherwise, if automatic
1143         #         publication is switched on, default value is used for result name.
1144         #
1145         #  @return New GEOM.GEOM_Object, containing the created point.
1146         #
1147         #  @ref tui_creation_point "Example"
1148         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1149             """
1150             Create a point, corresponding to the given length on the given curve.
1151
1152             Parameters:
1153                 theRefCurve The referenced curve.
1154                 theLength Length on the referenced curve. It can be negative.
1155                 theStartPoint Point allowing to choose the direction for the calculation
1156                               of the length. If None, start from the first point of theRefCurve.
1157                 theName Object name; when specified, this parameter is used
1158                         for result publication in the study. Otherwise, if automatic
1159                         publication is switched on, default value is used for result name.
1160
1161             Returns:
1162                 New GEOM.GEOM_Object, containing the created point.
1163             """
1164             # Example: see GEOM_TestAll.py
1165             theLength, Parameters = ParseParameters(theLength)
1166             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1167             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1168             anObj.SetParameters(Parameters)
1169             self._autoPublish(anObj, theName, "vertex")
1170             return anObj
1171
1172         ## Create a point, corresponding to the given parameters on the
1173         #    given surface.
1174         #  @param theRefSurf The referenced surface.
1175         #  @param theUParameter Value of U-parameter on the referenced surface.
1176         #  @param theVParameter Value of V-parameter on the referenced surface.
1177         #  @param theName Object name; when specified, this parameter is used
1178         #         for result publication in the study. Otherwise, if automatic
1179         #         publication is switched on, default value is used for result name.
1180         #
1181         #  @return New GEOM.GEOM_Object, containing the created point.
1182         #
1183         #  @ref swig_MakeVertexOnSurface "Example"
1184         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1185             """
1186             Create a point, corresponding to the given parameters on the
1187             given surface.
1188
1189             Parameters:
1190                 theRefSurf The referenced surface.
1191                 theUParameter Value of U-parameter on the referenced surface.
1192                 theVParameter Value of V-parameter on the referenced surface.
1193                 theName Object name; when specified, this parameter is used
1194                         for result publication in the study. Otherwise, if automatic
1195                         publication is switched on, default value is used for result name.
1196
1197             Returns:
1198                 New GEOM.GEOM_Object, containing the created point.
1199
1200             Example of usage:
1201                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1202             """
1203             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1204             # Example: see GEOM_TestAll.py
1205             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1206             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1207             anObj.SetParameters(Parameters);
1208             self._autoPublish(anObj, theName, "vertex")
1209             return anObj
1210
1211         ## Create a point by projection give coordinates on the given surface
1212         #  @param theRefSurf The referenced surface.
1213         #  @param theX X-coordinate in 3D space
1214         #  @param theY Y-coordinate in 3D space
1215         #  @param theZ Z-coordinate in 3D space
1216         #  @param theName Object name; when specified, this parameter is used
1217         #         for result publication in the study. Otherwise, if automatic
1218         #         publication is switched on, default value is used for result name.
1219         #
1220         #  @return New GEOM.GEOM_Object, containing the created point.
1221         #
1222         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1223         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1224             """
1225             Create a point by projection give coordinates on the given surface
1226
1227             Parameters:
1228                 theRefSurf The referenced surface.
1229                 theX X-coordinate in 3D space
1230                 theY Y-coordinate in 3D space
1231                 theZ Z-coordinate in 3D space
1232                 theName Object name; when specified, this parameter is used
1233                         for result publication in the study. Otherwise, if automatic
1234                         publication is switched on, default value is used for result name.
1235
1236             Returns:
1237                 New GEOM.GEOM_Object, containing the created point.
1238
1239             Example of usage:
1240                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1241             """
1242             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1243             # Example: see GEOM_TestAll.py
1244             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1245             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1246             anObj.SetParameters(Parameters);
1247             self._autoPublish(anObj, theName, "vertex")
1248             return anObj
1249
1250         ## Create a point, which lays on the given face.
1251         #  The point will lay in arbitrary place of the face.
1252         #  The only condition on it is a non-zero distance to the face boundary.
1253         #  Such point can be used to uniquely identify the face inside any
1254         #  shape in case, when the shape does not contain overlapped faces.
1255         #  @param theFace The referenced face.
1256         #  @param theName Object name; when specified, this parameter is used
1257         #         for result publication in the study. Otherwise, if automatic
1258         #         publication is switched on, default value is used for result name.
1259         #
1260         #  @return New GEOM.GEOM_Object, containing the created point.
1261         #
1262         #  @ref swig_MakeVertexInsideFace "Example"
1263         def MakeVertexInsideFace (self, theFace, theName=None):
1264             """
1265             Create a point, which lays on the given face.
1266             The point will lay in arbitrary place of the face.
1267             The only condition on it is a non-zero distance to the face boundary.
1268             Such point can be used to uniquely identify the face inside any
1269             shape in case, when the shape does not contain overlapped faces.
1270
1271             Parameters:
1272                 theFace The referenced face.
1273                 theName Object name; when specified, this parameter is used
1274                         for result publication in the study. Otherwise, if automatic
1275                         publication is switched on, default value is used for result name.
1276
1277             Returns:
1278                 New GEOM.GEOM_Object, containing the created point.
1279
1280             Example of usage:
1281                 p_on_face = geompy.MakeVertexInsideFace(Face)
1282             """
1283             # Example: see GEOM_TestAll.py
1284             anObj = self.BasicOp.MakePointOnFace(theFace)
1285             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1286             self._autoPublish(anObj, theName, "vertex")
1287             return anObj
1288
1289         ## Create a point on intersection of two lines.
1290         #  @param theRefLine1, theRefLine2 The referenced lines.
1291         #  @param theName Object name; when specified, this parameter is used
1292         #         for result publication in the study. Otherwise, if automatic
1293         #         publication is switched on, default value is used for result name.
1294         #
1295         #  @return New GEOM.GEOM_Object, containing the created point.
1296         #
1297         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1298         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1299             """
1300             Create a point on intersection of two lines.
1301
1302             Parameters:
1303                 theRefLine1, theRefLine2 The referenced lines.
1304                 theName Object name; when specified, this parameter is used
1305                         for result publication in the study. Otherwise, if automatic
1306                         publication is switched on, default value is used for result name.
1307
1308             Returns:
1309                 New GEOM.GEOM_Object, containing the created point.
1310             """
1311             # Example: see GEOM_TestAll.py
1312             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1313             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1314             self._autoPublish(anObj, theName, "vertex")
1315             return anObj
1316
1317         ## Create a tangent, corresponding to the given parameter on the given curve.
1318         #  @param theRefCurve The referenced curve.
1319         #  @param theParameter Value of parameter on the referenced curve.
1320         #  @param theName Object name; when specified, this parameter is used
1321         #         for result publication in the study. Otherwise, if automatic
1322         #         publication is switched on, default value is used for result name.
1323         #
1324         #  @return New GEOM.GEOM_Object, containing the created tangent.
1325         #
1326         #  @ref swig_MakeTangentOnCurve "Example"
1327         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1328             """
1329             Create a tangent, corresponding to the given parameter on the given curve.
1330
1331             Parameters:
1332                 theRefCurve The referenced curve.
1333                 theParameter Value of parameter on the referenced curve.
1334                 theName Object name; when specified, this parameter is used
1335                         for result publication in the study. Otherwise, if automatic
1336                         publication is switched on, default value is used for result name.
1337
1338             Returns:
1339                 New GEOM.GEOM_Object, containing the created tangent.
1340
1341             Example of usage:
1342                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1343             """
1344             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1345             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1346             self._autoPublish(anObj, theName, "tangent")
1347             return anObj
1348
1349         ## Create a tangent plane, corresponding to the given parameter on the given face.
1350         #  @param theFace The face for which tangent plane should be built.
1351         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1352         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1353         #  @param theTrimSize the size of plane.
1354         #  @param theName Object name; when specified, this parameter is used
1355         #         for result publication in the study. Otherwise, if automatic
1356         #         publication is switched on, default value is used for result name.
1357         #
1358         #  @return New GEOM.GEOM_Object, containing the created tangent.
1359         #
1360         #  @ref swig_MakeTangentPlaneOnFace "Example"
1361         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1362             """
1363             Create a tangent plane, corresponding to the given parameter on the given face.
1364
1365             Parameters:
1366                 theFace The face for which tangent plane should be built.
1367                 theParameterV vertical value of the center point (0.0 - 1.0).
1368                 theParameterU horisontal value of the center point (0.0 - 1.0).
1369                 theTrimSize the size of plane.
1370                 theName Object name; when specified, this parameter is used
1371                         for result publication in the study. Otherwise, if automatic
1372                         publication is switched on, default value is used for result name.
1373
1374            Returns: 
1375                 New GEOM.GEOM_Object, containing the created tangent.
1376
1377            Example of usage:
1378                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1379             """
1380             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1381             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1382             self._autoPublish(anObj, theName, "tangent")
1383             return anObj
1384
1385         ## Create a vector with the given components.
1386         #  @param theDX X component of the vector.
1387         #  @param theDY Y component of the vector.
1388         #  @param theDZ Z component of the vector.
1389         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created vector.
1394         #
1395         #  @ref tui_creation_vector "Example"
1396         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1397             """
1398             Create a vector with the given components.
1399
1400             Parameters:
1401                 theDX X component of the vector.
1402                 theDY Y component of the vector.
1403                 theDZ Z component of the vector.
1404                 theName Object name; when specified, this parameter is used
1405                         for result publication in the study. Otherwise, if automatic
1406                         publication is switched on, default value is used for result name.
1407
1408             Returns:     
1409                 New GEOM.GEOM_Object, containing the created vector.
1410             """
1411             # Example: see GEOM_TestAll.py
1412             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1413             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1414             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1415             anObj.SetParameters(Parameters)
1416             self._autoPublish(anObj, theName, "vector")
1417             return anObj
1418
1419         ## Create a vector between two points.
1420         #  @param thePnt1 Start point for the vector.
1421         #  @param thePnt2 End point for the vector.
1422         #  @param theName Object name; when specified, this parameter is used
1423         #         for result publication in the study. Otherwise, if automatic
1424         #         publication is switched on, default value is used for result name.
1425         #
1426         #  @return New GEOM.GEOM_Object, containing the created vector.
1427         #
1428         #  @ref tui_creation_vector "Example"
1429         def MakeVector(self, thePnt1, thePnt2, theName=None):
1430             """
1431             Create a vector between two points.
1432
1433             Parameters:
1434                 thePnt1 Start point for the vector.
1435                 thePnt2 End point for the vector.
1436                 theName Object name; when specified, this parameter is used
1437                         for result publication in the study. Otherwise, if automatic
1438                         publication is switched on, default value is used for result name.
1439
1440             Returns:        
1441                 New GEOM.GEOM_Object, containing the created vector.
1442             """
1443             # Example: see GEOM_TestAll.py
1444             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1445             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1446             self._autoPublish(anObj, theName, "vector")
1447             return anObj
1448
1449         ## Create a line, passing through the given point
1450         #  and parrallel to the given direction
1451         #  @param thePnt Point. The resulting line will pass through it.
1452         #  @param theDir Direction. The resulting line will be parallel to it.
1453         #  @param theName Object name; when specified, this parameter is used
1454         #         for result publication in the study. Otherwise, if automatic
1455         #         publication is switched on, default value is used for result name.
1456         #
1457         #  @return New GEOM.GEOM_Object, containing the created line.
1458         #
1459         #  @ref tui_creation_line "Example"
1460         def MakeLine(self, thePnt, theDir, theName=None):
1461             """
1462             Create a line, passing through the given point
1463             and parrallel to the given direction
1464
1465             Parameters:
1466                 thePnt Point. The resulting line will pass through it.
1467                 theDir Direction. The resulting line will be parallel to it.
1468                 theName Object name; when specified, this parameter is used
1469                         for result publication in the study. Otherwise, if automatic
1470                         publication is switched on, default value is used for result name.
1471
1472             Returns:
1473                 New GEOM.GEOM_Object, containing the created line.
1474             """
1475             # Example: see GEOM_TestAll.py
1476             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1477             RaiseIfFailed("MakeLine", self.BasicOp)
1478             self._autoPublish(anObj, theName, "line")
1479             return anObj
1480
1481         ## Create a line, passing through the given points
1482         #  @param thePnt1 First of two points, defining the line.
1483         #  @param thePnt2 Second of two points, defining the line.
1484         #  @param theName Object name; when specified, this parameter is used
1485         #         for result publication in the study. Otherwise, if automatic
1486         #         publication is switched on, default value is used for result name.
1487         #
1488         #  @return New GEOM.GEOM_Object, containing the created line.
1489         #
1490         #  @ref tui_creation_line "Example"
1491         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1492             """
1493             Create a line, passing through the given points
1494
1495             Parameters:
1496                 thePnt1 First of two points, defining the line.
1497                 thePnt2 Second of two points, defining the line.
1498                 theName Object name; when specified, this parameter is used
1499                         for result publication in the study. Otherwise, if automatic
1500                         publication is switched on, default value is used for result name.
1501
1502             Returns:
1503                 New GEOM.GEOM_Object, containing the created line.
1504             """
1505             # Example: see GEOM_TestAll.py
1506             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1507             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1508             self._autoPublish(anObj, theName, "line")
1509             return anObj
1510
1511         ## Create a line on two faces intersection.
1512         #  @param theFace1 First of two faces, defining the line.
1513         #  @param theFace2 Second of two faces, defining the line.
1514         #  @param theName Object name; when specified, this parameter is used
1515         #         for result publication in the study. Otherwise, if automatic
1516         #         publication is switched on, default value is used for result name.
1517         #
1518         #  @return New GEOM.GEOM_Object, containing the created line.
1519         #
1520         #  @ref swig_MakeLineTwoFaces "Example"
1521         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1522             """
1523             Create a line on two faces intersection.
1524
1525             Parameters:
1526                 theFace1 First of two faces, defining the line.
1527                 theFace2 Second of two faces, defining the line.
1528                 theName Object name; when specified, this parameter is used
1529                         for result publication in the study. Otherwise, if automatic
1530                         publication is switched on, default value is used for result name.
1531
1532             Returns:
1533                 New GEOM.GEOM_Object, containing the created line.
1534             """
1535             # Example: see GEOM_TestAll.py
1536             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1537             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1538             self._autoPublish(anObj, theName, "line")
1539             return anObj
1540
1541         ## Create a plane, passing through the given point
1542         #  and normal to the given vector.
1543         #  @param thePnt Point, the plane has to pass through.
1544         #  @param theVec Vector, defining the plane normal direction.
1545         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1546         #  @param theName Object name; when specified, this parameter is used
1547         #         for result publication in the study. Otherwise, if automatic
1548         #         publication is switched on, default value is used for result name.
1549         #
1550         #  @return New GEOM.GEOM_Object, containing the created plane.
1551         #
1552         #  @ref tui_creation_plane "Example"
1553         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1554             """
1555             Create a plane, passing through the given point
1556             and normal to the given vector.
1557
1558             Parameters:
1559                 thePnt Point, the plane has to pass through.
1560                 theVec Vector, defining the plane normal direction.
1561                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1562                 theName Object name; when specified, this parameter is used
1563                         for result publication in the study. Otherwise, if automatic
1564                         publication is switched on, default value is used for result name.
1565
1566             Returns:    
1567                 New GEOM.GEOM_Object, containing the created plane.
1568             """
1569             # Example: see GEOM_TestAll.py
1570             theTrimSize, Parameters = ParseParameters(theTrimSize);
1571             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1572             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1573             anObj.SetParameters(Parameters)
1574             self._autoPublish(anObj, theName, "plane")
1575             return anObj
1576
1577         ## Create a plane, passing through the three given points
1578         #  @param thePnt1 First of three points, defining the plane.
1579         #  @param thePnt2 Second of three points, defining the plane.
1580         #  @param thePnt3 Fird of three points, defining the plane.
1581         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1582         #  @param theName Object name; when specified, this parameter is used
1583         #         for result publication in the study. Otherwise, if automatic
1584         #         publication is switched on, default value is used for result name.
1585         #
1586         #  @return New GEOM.GEOM_Object, containing the created plane.
1587         #
1588         #  @ref tui_creation_plane "Example"
1589         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1590             """
1591             Create a plane, passing through the three given points
1592
1593             Parameters:
1594                 thePnt1 First of three points, defining the plane.
1595                 thePnt2 Second of three points, defining the plane.
1596                 thePnt3 Fird of three points, defining the plane.
1597                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1598                 theName Object name; when specified, this parameter is used
1599                         for result publication in the study. Otherwise, if automatic
1600                         publication is switched on, default value is used for result name.
1601
1602             Returns:
1603                 New GEOM.GEOM_Object, containing the created plane.
1604             """
1605             # Example: see GEOM_TestAll.py
1606             theTrimSize, Parameters = ParseParameters(theTrimSize);
1607             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1608             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1609             anObj.SetParameters(Parameters)
1610             self._autoPublish(anObj, theName, "plane")
1611             return anObj
1612
1613         ## Create a plane, similar to the existing one, but with another size of representing face.
1614         #  @param theFace Referenced plane or LCS(Marker).
1615         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1616         #  @param theName Object name; when specified, this parameter is used
1617         #         for result publication in the study. Otherwise, if automatic
1618         #         publication is switched on, default value is used for result name.
1619         #
1620         #  @return New GEOM.GEOM_Object, containing the created plane.
1621         #
1622         #  @ref tui_creation_plane "Example"
1623         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1624             """
1625             Create a plane, similar to the existing one, but with another size of representing face.
1626
1627             Parameters:
1628                 theFace Referenced plane or LCS(Marker).
1629                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1630                 theName Object name; when specified, this parameter is used
1631                         for result publication in the study. Otherwise, if automatic
1632                         publication is switched on, default value is used for result name.
1633
1634             Returns:
1635                 New GEOM.GEOM_Object, containing the created plane.
1636             """
1637             # Example: see GEOM_TestAll.py
1638             theTrimSize, Parameters = ParseParameters(theTrimSize);
1639             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1640             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1641             anObj.SetParameters(Parameters)
1642             self._autoPublish(anObj, theName, "plane")
1643             return anObj
1644
1645         ## Create a plane, passing through the 2 vectors
1646         #  with center in a start point of the first vector.
1647         #  @param theVec1 Vector, defining center point and plane direction.
1648         #  @param theVec2 Vector, defining the plane normal direction.
1649         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1650         #  @param theName Object name; when specified, this parameter is used
1651         #         for result publication in the study. Otherwise, if automatic
1652         #         publication is switched on, default value is used for result name.
1653         #
1654         #  @return New GEOM.GEOM_Object, containing the created plane.
1655         #
1656         #  @ref tui_creation_plane "Example"
1657         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1658             """
1659             Create a plane, passing through the 2 vectors
1660             with center in a start point of the first vector.
1661
1662             Parameters:
1663                 theVec1 Vector, defining center point and plane direction.
1664                 theVec2 Vector, defining the plane normal direction.
1665                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1666                 theName Object name; when specified, this parameter is used
1667                         for result publication in the study. Otherwise, if automatic
1668                         publication is switched on, default value is used for result name.
1669
1670             Returns: 
1671                 New GEOM.GEOM_Object, containing the created plane.
1672             """
1673             # Example: see GEOM_TestAll.py
1674             theTrimSize, Parameters = ParseParameters(theTrimSize);
1675             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1676             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1677             anObj.SetParameters(Parameters)
1678             self._autoPublish(anObj, theName, "plane")
1679             return anObj
1680
1681         ## Create a plane, based on a Local coordinate system.
1682         #  @param theLCS  coordinate system, defining plane.
1683         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1684         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1685         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created plane.
1690         #
1691         #  @ref tui_creation_plane "Example"
1692         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1693             """
1694             Create a plane, based on a Local coordinate system.
1695
1696            Parameters: 
1697                 theLCS  coordinate system, defining plane.
1698                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1699                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1700                 theName Object name; when specified, this parameter is used
1701                         for result publication in the study. Otherwise, if automatic
1702                         publication is switched on, default value is used for result name.
1703
1704             Returns: 
1705                 New GEOM.GEOM_Object, containing the created plane.
1706             """
1707             # Example: see GEOM_TestAll.py
1708             theTrimSize, Parameters = ParseParameters(theTrimSize);
1709             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1710             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1711             anObj.SetParameters(Parameters)
1712             self._autoPublish(anObj, theName, "plane")
1713             return anObj
1714
1715         ## Create a local coordinate system.
1716         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1717         #  @param XDX,XDY,XDZ Three components of OX direction
1718         #  @param YDX,YDY,YDZ Three components of OY direction
1719         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1724         #
1725         #  @ref swig_MakeMarker "Example"
1726         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1727             """
1728             Create a local coordinate system.
1729
1730             Parameters: 
1731                 OX,OY,OZ Three coordinates of coordinate system origin.
1732                 XDX,XDY,XDZ Three components of OX direction
1733                 YDX,YDY,YDZ Three components of OY direction
1734                 theName Object name; when specified, this parameter is used
1735                         for result publication in the study. Otherwise, if automatic
1736                         publication is switched on, default value is used for result name.
1737
1738             Returns: 
1739                 New GEOM.GEOM_Object, containing the created coordinate system.
1740             """
1741             # Example: see GEOM_TestAll.py
1742             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1743             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1744             RaiseIfFailed("MakeMarker", self.BasicOp)
1745             anObj.SetParameters(Parameters)
1746             self._autoPublish(anObj, theName, "lcs")
1747             return anObj
1748
1749         ## Create a local coordinate system from shape.
1750         #  @param theShape The initial shape to detect the coordinate system.
1751         #  @param theName Object name; when specified, this parameter is used
1752         #         for result publication in the study. Otherwise, if automatic
1753         #         publication is switched on, default value is used for result name.
1754         #
1755         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1756         #
1757         #  @ref tui_creation_lcs "Example"
1758         def MakeMarkerFromShape(self, theShape, theName=None):
1759             """
1760             Create a local coordinate system from shape.
1761
1762             Parameters:
1763                 theShape The initial shape to detect the coordinate system.
1764                 theName Object name; when specified, this parameter is used
1765                         for result publication in the study. Otherwise, if automatic
1766                         publication is switched on, default value is used for result name.
1767                 
1768             Returns: 
1769                 New GEOM.GEOM_Object, containing the created coordinate system.
1770             """
1771             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1772             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1773             self._autoPublish(anObj, theName, "lcs")
1774             return anObj
1775
1776         ## Create a local coordinate system from point and two vectors.
1777         #  @param theOrigin Point of coordinate system origin.
1778         #  @param theXVec Vector of X direction
1779         #  @param theYVec Vector of Y direction
1780         #  @param theName Object name; when specified, this parameter is used
1781         #         for result publication in the study. Otherwise, if automatic
1782         #         publication is switched on, default value is used for result name.
1783         #
1784         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1785         #
1786         #  @ref tui_creation_lcs "Example"
1787         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1788             """
1789             Create a local coordinate system from point and two vectors.
1790
1791             Parameters:
1792                 theOrigin Point of coordinate system origin.
1793                 theXVec Vector of X direction
1794                 theYVec Vector of Y direction
1795                 theName Object name; when specified, this parameter is used
1796                         for result publication in the study. Otherwise, if automatic
1797                         publication is switched on, default value is used for result name.
1798
1799             Returns: 
1800                 New GEOM.GEOM_Object, containing the created coordinate system.
1801
1802             """
1803             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1804             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1805             self._autoPublish(anObj, theName, "lcs")
1806             return anObj
1807
1808         # end of l3_basic_go
1809         ## @}
1810
1811         ## @addtogroup l4_curves
1812         ## @{
1813
1814         ##  Create an arc of circle, passing through three given points.
1815         #  @param thePnt1 Start point of the arc.
1816         #  @param thePnt2 Middle point of the arc.
1817         #  @param thePnt3 End point of the arc.
1818         #  @param theName Object name; when specified, this parameter is used
1819         #         for result publication in the study. Otherwise, if automatic
1820         #         publication is switched on, default value is used for result name.
1821         #
1822         #  @return New GEOM.GEOM_Object, containing the created arc.
1823         #
1824         #  @ref swig_MakeArc "Example"
1825         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1826             """
1827             Create an arc of circle, passing through three given points.
1828
1829             Parameters:
1830                 thePnt1 Start point of the arc.
1831                 thePnt2 Middle point of the arc.
1832                 thePnt3 End point of the arc.
1833                 theName Object name; when specified, this parameter is used
1834                         for result publication in the study. Otherwise, if automatic
1835                         publication is switched on, default value is used for result name.
1836
1837             Returns: 
1838                 New GEOM.GEOM_Object, containing the created arc.
1839             """
1840             # Example: see GEOM_TestAll.py
1841             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1842             RaiseIfFailed("MakeArc", self.CurvesOp)
1843             self._autoPublish(anObj, theName, "arc")
1844             return anObj
1845
1846         ##  Create an arc of circle from a center and 2 points.
1847         #  @param thePnt1 Center of the arc
1848         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1849         #  @param thePnt3 End point of the arc (Gives also a direction)
1850         #  @param theSense Orientation of the arc
1851         #  @param theName Object name; when specified, this parameter is used
1852         #         for result publication in the study. Otherwise, if automatic
1853         #         publication is switched on, default value is used for result name.
1854         #
1855         #  @return New GEOM.GEOM_Object, containing the created arc.
1856         #
1857         #  @ref swig_MakeArc "Example"
1858         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1859             """
1860             Create an arc of circle from a center and 2 points.
1861
1862             Parameters:
1863                 thePnt1 Center of the arc
1864                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1865                 thePnt3 End point of the arc (Gives also a direction)
1866                 theSense Orientation of the arc
1867                 theName Object name; when specified, this parameter is used
1868                         for result publication in the study. Otherwise, if automatic
1869                         publication is switched on, default value is used for result name.
1870
1871             Returns:
1872                 New GEOM.GEOM_Object, containing the created arc.
1873             """
1874             # Example: see GEOM_TestAll.py
1875             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1876             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1877             self._autoPublish(anObj, theName, "arc")
1878             return anObj
1879
1880         ##  Create an arc of ellipse, of center and two points.
1881         #  @param theCenter Center of the arc.
1882         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1883         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1884         #  @param theName Object name; when specified, this parameter is used
1885         #         for result publication in the study. Otherwise, if automatic
1886         #         publication is switched on, default value is used for result name.
1887         #
1888         #  @return New GEOM.GEOM_Object, containing the created arc.
1889         #
1890         #  @ref swig_MakeArc "Example"
1891         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
1892             """
1893             Create an arc of ellipse, of center and two points.
1894
1895             Parameters:
1896                 theCenter Center of the arc.
1897                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1898                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1899                 theName Object name; when specified, this parameter is used
1900                         for result publication in the study. Otherwise, if automatic
1901                         publication is switched on, default value is used for result name.
1902
1903             Returns:
1904                 New GEOM.GEOM_Object, containing the created arc.
1905             """
1906             # Example: see GEOM_TestAll.py
1907             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
1908             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
1909             self._autoPublish(anObj, theName, "arc")
1910             return anObj
1911
1912         ## Create a circle with given center, normal vector and radius.
1913         #  @param thePnt Circle center.
1914         #  @param theVec Vector, normal to the plane of the circle.
1915         #  @param theR Circle radius.
1916         #  @param theName Object name; when specified, this parameter is used
1917         #         for result publication in the study. Otherwise, if automatic
1918         #         publication is switched on, default value is used for result name.
1919         #
1920         #  @return New GEOM.GEOM_Object, containing the created circle.
1921         #
1922         #  @ref tui_creation_circle "Example"
1923         def MakeCircle(self, thePnt, theVec, theR, theName=None):
1924             """
1925             Create a circle with given center, normal vector and radius.
1926
1927             Parameters:
1928                 thePnt Circle center.
1929                 theVec Vector, normal to the plane of the circle.
1930                 theR Circle radius.
1931                 theName Object name; when specified, this parameter is used
1932                         for result publication in the study. Otherwise, if automatic
1933                         publication is switched on, default value is used for result name.
1934
1935             Returns:
1936                 New GEOM.GEOM_Object, containing the created circle.
1937             """
1938             # Example: see GEOM_TestAll.py
1939             theR, Parameters = ParseParameters(theR)
1940             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
1941             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1942             anObj.SetParameters(Parameters)
1943             self._autoPublish(anObj, theName, "circle")
1944             return anObj
1945
1946         ## Create a circle with given radius.
1947         #  Center of the circle will be in the origin of global
1948         #  coordinate system and normal vector will be codirected with Z axis
1949         #  @param theR Circle radius.
1950         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created circle.
1955         def MakeCircleR(self, theR, theName=None):
1956             """
1957             Create a circle with given radius.
1958             Center of the circle will be in the origin of global
1959             coordinate system and normal vector will be codirected with Z axis
1960
1961             Parameters:
1962                 theR Circle radius.
1963                 theName Object name; when specified, this parameter is used
1964                         for result publication in the study. Otherwise, if automatic
1965                         publication is switched on, default value is used for result name.
1966
1967             Returns:
1968                 New GEOM.GEOM_Object, containing the created circle.
1969             """
1970             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
1971             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1972             self._autoPublish(anObj, theName, "circle")
1973             return anObj
1974
1975         ## Create a circle, passing through three given points
1976         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1977         #  @param theName Object name; when specified, this parameter is used
1978         #         for result publication in the study. Otherwise, if automatic
1979         #         publication is switched on, default value is used for result name.
1980         #
1981         #  @return New GEOM.GEOM_Object, containing the created circle.
1982         #
1983         #  @ref tui_creation_circle "Example"
1984         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
1985             """
1986             Create a circle, passing through three given points
1987
1988             Parameters:
1989                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1990                 theName Object name; when specified, this parameter is used
1991                         for result publication in the study. Otherwise, if automatic
1992                         publication is switched on, default value is used for result name.
1993
1994             Returns:
1995                 New GEOM.GEOM_Object, containing the created circle.
1996             """
1997             # Example: see GEOM_TestAll.py
1998             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
1999             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2000             self._autoPublish(anObj, theName, "circle")
2001             return anObj
2002
2003         ## Create a circle, with given point1 as center,
2004         #  passing through the point2 as radius and laying in the plane,
2005         #  defined by all three given points.
2006         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2007         #  @param theName Object name; when specified, this parameter is used
2008         #         for result publication in the study. Otherwise, if automatic
2009         #         publication is switched on, default value is used for result name.
2010         #
2011         #  @return New GEOM.GEOM_Object, containing the created circle.
2012         #
2013         #  @ref swig_MakeCircle "Example"
2014         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2015             """
2016             Create a circle, with given point1 as center,
2017             passing through the point2 as radius and laying in the plane,
2018             defined by all three given points.
2019
2020             Parameters:
2021                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2022                 theName Object name; when specified, this parameter is used
2023                         for result publication in the study. Otherwise, if automatic
2024                         publication is switched on, default value is used for result name.
2025
2026             Returns:
2027                 New GEOM.GEOM_Object, containing the created circle.
2028             """
2029             # Example: see GEOM_example6.py
2030             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2031             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2032             self._autoPublish(anObj, theName, "circle")
2033             return anObj
2034
2035         ## Create an ellipse with given center, normal vector and radiuses.
2036         #  @param thePnt Ellipse center.
2037         #  @param theVec Vector, normal to the plane of the ellipse.
2038         #  @param theRMajor Major ellipse radius.
2039         #  @param theRMinor Minor ellipse radius.
2040         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2041         #  @param theName Object name; when specified, this parameter is used
2042         #         for result publication in the study. Otherwise, if automatic
2043         #         publication is switched on, default value is used for result name.
2044         #
2045         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2046         #
2047         #  @ref tui_creation_ellipse "Example"
2048         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2049             """
2050             Create an ellipse with given center, normal vector and radiuses.
2051
2052             Parameters:
2053                 thePnt Ellipse center.
2054                 theVec Vector, normal to the plane of the ellipse.
2055                 theRMajor Major ellipse radius.
2056                 theRMinor Minor ellipse radius.
2057                 theVecMaj Vector, direction of the ellipse's main axis.
2058                 theName Object name; when specified, this parameter is used
2059                         for result publication in the study. Otherwise, if automatic
2060                         publication is switched on, default value is used for result name.
2061
2062             Returns:    
2063                 New GEOM.GEOM_Object, containing the created ellipse.
2064             """
2065             # Example: see GEOM_TestAll.py
2066             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2067             if theVecMaj is not None:
2068                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2069             else:
2070                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2071                 pass
2072             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2073             anObj.SetParameters(Parameters)
2074             self._autoPublish(anObj, theName, "ellipse")
2075             return anObj
2076
2077         ## Create an ellipse with given radiuses.
2078         #  Center of the ellipse will be in the origin of global
2079         #  coordinate system and normal vector will be codirected with Z axis
2080         #  @param theRMajor Major ellipse radius.
2081         #  @param theRMinor Minor ellipse radius.
2082         #  @param theName Object name; when specified, this parameter is used
2083         #         for result publication in the study. Otherwise, if automatic
2084         #         publication is switched on, default value is used for result name.
2085         #
2086         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2087         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2088             """
2089             Create an ellipse with given radiuses.
2090             Center of the ellipse will be in the origin of global
2091             coordinate system and normal vector will be codirected with Z axis
2092
2093             Parameters:
2094                 theRMajor Major ellipse radius.
2095                 theRMinor Minor ellipse radius.
2096                 theName Object name; when specified, this parameter is used
2097                         for result publication in the study. Otherwise, if automatic
2098                         publication is switched on, default value is used for result name.
2099
2100             Returns:
2101             New GEOM.GEOM_Object, containing the created ellipse.
2102             """
2103             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2104             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2105             self._autoPublish(anObj, theName, "ellipse")
2106             return anObj
2107
2108         ## Create a polyline on the set of points.
2109         #  @param thePoints Sequence of points for the polyline.
2110         #  @param theIsClosed If True, build a closed wire.
2111         #  @param theName Object name; when specified, this parameter is used
2112         #         for result publication in the study. Otherwise, if automatic
2113         #         publication is switched on, default value is used for result name.
2114         #
2115         #  @return New GEOM.GEOM_Object, containing the created polyline.
2116         #
2117         #  @ref tui_creation_curve "Example"
2118         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2119             """
2120             Create a polyline on the set of points.
2121
2122             Parameters:
2123                 thePoints Sequence of points for the polyline.
2124                 theIsClosed If True, build a closed wire.
2125                 theName Object name; when specified, this parameter is used
2126                         for result publication in the study. Otherwise, if automatic
2127                         publication is switched on, default value is used for result name.
2128
2129             Returns:
2130                 New GEOM.GEOM_Object, containing the created polyline.
2131             """
2132             # Example: see GEOM_TestAll.py
2133             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2134             RaiseIfFailed("MakePolyline", self.CurvesOp)
2135             self._autoPublish(anObj, theName, "polyline")
2136             return anObj
2137
2138         ## Create bezier curve on the set of points.
2139         #  @param thePoints Sequence of points for the bezier curve.
2140         #  @param theIsClosed If True, build a closed curve.
2141         #  @param theName Object name; when specified, this parameter is used
2142         #         for result publication in the study. Otherwise, if automatic
2143         #         publication is switched on, default value is used for result name.
2144         #
2145         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2146         #
2147         #  @ref tui_creation_curve "Example"
2148         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2149             """
2150             Create bezier curve on the set of points.
2151
2152             Parameters:
2153                 thePoints Sequence of points for the bezier curve.
2154                 theIsClosed If True, build a closed curve.
2155                 theName Object name; when specified, this parameter is used
2156                         for result publication in the study. Otherwise, if automatic
2157                         publication is switched on, default value is used for result name.
2158
2159             Returns:
2160                 New GEOM.GEOM_Object, containing the created bezier curve.
2161             """
2162             # Example: see GEOM_TestAll.py
2163             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2164             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2165             self._autoPublish(anObj, theName, "bezier")
2166             return anObj
2167
2168         ## Create B-Spline curve on the set of points.
2169         #  @param thePoints Sequence of points for the B-Spline curve.
2170         #  @param theIsClosed If True, build a closed curve.
2171         #  @param theDoReordering If TRUE, the algo does not follow the order of
2172         #                         \a thePoints but searches for the closest vertex.
2173         #  @param theName Object name; when specified, this parameter is used
2174         #         for result publication in the study. Otherwise, if automatic
2175         #         publication is switched on, default value is used for result name.
2176         #
2177         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2178         #
2179         #  @ref tui_creation_curve "Example"
2180         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2181             """
2182             Create B-Spline curve on the set of points.
2183
2184             Parameters:
2185                 thePoints Sequence of points for the B-Spline curve.
2186                 theIsClosed If True, build a closed curve.
2187                 theDoReordering If True, the algo does not follow the order of
2188                                 thePoints but searches for the closest vertex.
2189                 theName Object name; when specified, this parameter is used
2190                         for result publication in the study. Otherwise, if automatic
2191                         publication is switched on, default value is used for result name.
2192
2193             Returns:                     
2194                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2195             """
2196             # Example: see GEOM_TestAll.py
2197             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2198             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2199             self._autoPublish(anObj, theName, "bspline")
2200             return anObj
2201
2202         ## Create B-Spline curve on the set of points.
2203         #  @param thePoints Sequence of points for the B-Spline curve.
2204         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2205         #  @param theLastVec Vector object, defining the curve direction at its last point.
2206         #  @param theName Object name; when specified, this parameter is used
2207         #         for result publication in the study. Otherwise, if automatic
2208         #         publication is switched on, default value is used for result name.
2209         #
2210         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2211         #
2212         #  @ref tui_creation_curve "Example"
2213         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2214             """
2215             Create B-Spline curve on the set of points.
2216
2217             Parameters:
2218                 thePoints Sequence of points for the B-Spline curve.
2219                 theFirstVec Vector object, defining the curve direction at its first point.
2220                 theLastVec Vector object, defining the curve direction at its last point.
2221                 theName Object name; when specified, this parameter is used
2222                         for result publication in the study. Otherwise, if automatic
2223                         publication is switched on, default value is used for result name.
2224
2225             Returns:                     
2226                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2227             """
2228             # Example: see GEOM_TestAll.py
2229             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2230             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2231             self._autoPublish(anObj, theName, "bspline")
2232             return anObj
2233
2234         ## Creates a curve using the parametric definition of the basic points.
2235         #  @param thexExpr parametric equation of the coordinates X.
2236         #  @param theyExpr parametric equation of the coordinates Y.
2237         #  @param thezExpr parametric equation of the coordinates Z.
2238         #  @param theParamMin the minimal value of the parameter.
2239         #  @param theParamMax the maximum value of the parameter.
2240         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2241         #  @param theCurveType the type of the curve.
2242         #  @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.
2243         #  @param theName Object name; when specified, this parameter is used
2244         #         for result publication in the study. Otherwise, if automatic
2245         #         publication is switched on, default value is used for result name.
2246         #
2247         #  @return New GEOM.GEOM_Object, containing the created curve.
2248         #
2249         #  @ref tui_creation_curve "Example"
2250         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2251                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2252             """
2253             Creates a curve using the parametric definition of the basic points.
2254
2255             Parameters:
2256                 thexExpr parametric equation of the coordinates X.
2257                 theyExpr parametric equation of the coordinates Y.
2258                 thezExpr parametric equation of the coordinates Z.
2259                 theParamMin the minimal value of the parameter.
2260                 theParamMax the maximum value of the parameter.
2261                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2262                 theCurveType the type of the curve.
2263                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2264                              method is used which can lead to a bug.
2265                 theName Object name; when specified, this parameter is used
2266                         for result publication in the study. Otherwise, if automatic
2267                         publication is switched on, default value is used for result name.
2268
2269             Returns:
2270                 New GEOM.GEOM_Object, containing the created curve.
2271             """
2272             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2273             if theNewMethod:
2274               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2275             else:
2276               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
2277             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2278             anObj.SetParameters(Parameters)
2279             self._autoPublish(anObj, theName, "curve")
2280             return anObj
2281
2282         # end of l4_curves
2283         ## @}
2284
2285         ## @addtogroup l3_sketcher
2286         ## @{
2287
2288         ## Create a sketcher (wire or face), following the textual description,
2289         #  passed through <VAR>theCommand</VAR> argument. \n
2290         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2291         #  Format of the description string have to be the following:
2292         #
2293         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2294         #
2295         #  Where:
2296         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2297         #  - CMD is one of
2298         #     - "R angle" : Set the direction by angle
2299         #     - "D dx dy" : Set the direction by DX & DY
2300         #     .
2301         #       \n
2302         #     - "TT x y" : Create segment by point at X & Y
2303         #     - "T dx dy" : Create segment by point with DX & DY
2304         #     - "L length" : Create segment by direction & Length
2305         #     - "IX x" : Create segment by direction & Intersect. X
2306         #     - "IY y" : Create segment by direction & Intersect. Y
2307         #     .
2308         #       \n
2309         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2310         #     - "AA x y": Create arc by point at X & Y
2311         #     - "A dx dy" : Create arc by point with DX & DY
2312         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2313         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2314         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2315         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2316         #     .
2317         #       \n
2318         #     - "WW" : Close Wire (to finish)
2319         #     - "WF" : Close Wire and build face (to finish)
2320         #     .
2321         #        \n
2322         #  - Flag1 (= reverse) is 0 or 2 ...
2323         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2324         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2325         #     .
2326         #        \n
2327         #  - Flag2 (= control tolerance) is 0 or 1 ...
2328         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2329         #     - if 1 the wire is built only if the end point is on the arc
2330         #       with a tolerance of 10^-7 on the distance else the creation fails
2331         #
2332         #  @param theCommand String, defining the sketcher in local
2333         #                    coordinates of the working plane.
2334         #  @param theWorkingPlane Nine double values, defining origin,
2335         #                         OZ and OX directions of the working plane.
2336         #  @param theName Object name; when specified, this parameter is used
2337         #         for result publication in the study. Otherwise, if automatic
2338         #         publication is switched on, default value is used for result name.
2339         #
2340         #  @return New GEOM.GEOM_Object, containing the created wire.
2341         #
2342         #  @ref tui_sketcher_page "Example"
2343         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2344             """
2345             Create a sketcher (wire or face), following the textual description, passed
2346             through theCommand argument.
2347             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2348             Format of the description string have to be the following:
2349                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2350             Where:
2351             - x1, y1 are coordinates of the first sketcher point (zero by default),
2352             - CMD is one of
2353                - "R angle" : Set the direction by angle
2354                - "D dx dy" : Set the direction by DX & DY
2355                
2356                - "TT x y" : Create segment by point at X & Y
2357                - "T dx dy" : Create segment by point with DX & DY
2358                - "L length" : Create segment by direction & Length
2359                - "IX x" : Create segment by direction & Intersect. X
2360                - "IY y" : Create segment by direction & Intersect. Y
2361
2362                - "C radius length" : Create arc by direction, radius and length(in degree)
2363                - "AA x y": Create arc by point at X & Y
2364                - "A dx dy" : Create arc by point with DX & DY
2365                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2366                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2367                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2368                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2369
2370                - "WW" : Close Wire (to finish)
2371                - "WF" : Close Wire and build face (to finish)
2372             
2373             - Flag1 (= reverse) is 0 or 2 ...
2374                - if 0 the drawn arc is the one of lower angle (< Pi)
2375                - if 2 the drawn arc ius the one of greater angle (> Pi)
2376         
2377             - Flag2 (= control tolerance) is 0 or 1 ...
2378                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2379                - if 1 the wire is built only if the end point is on the arc
2380                  with a tolerance of 10^-7 on the distance else the creation fails
2381
2382             Parameters:
2383                 theCommand String, defining the sketcher in local
2384                            coordinates of the working plane.
2385                 theWorkingPlane Nine double values, defining origin,
2386                                 OZ and OX directions of the working plane.
2387                 theName Object name; when specified, this parameter is used
2388                         for result publication in the study. Otherwise, if automatic
2389                         publication is switched on, default value is used for result name.
2390
2391             Returns:
2392                 New GEOM.GEOM_Object, containing the created wire.
2393             """
2394             # Example: see GEOM_TestAll.py
2395             theCommand,Parameters = ParseSketcherCommand(theCommand)
2396             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2397             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2398             anObj.SetParameters(Parameters)
2399             self._autoPublish(anObj, theName, "wire")
2400             return anObj
2401
2402         ## Create a sketcher (wire or face), following the textual description,
2403         #  passed through <VAR>theCommand</VAR> argument. \n
2404         #  For format of the description string see MakeSketcher() method.\n
2405         #  @param theCommand String, defining the sketcher in local
2406         #                    coordinates of the working plane.
2407         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2408         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created wire.
2413         #
2414         #  @ref tui_sketcher_page "Example"
2415         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2416             """
2417             Create a sketcher (wire or face), following the textual description,
2418             passed through theCommand argument.
2419             For format of the description string see geompy.MakeSketcher() method.
2420
2421             Parameters:
2422                 theCommand String, defining the sketcher in local
2423                            coordinates of the working plane.
2424                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2425                 theName Object name; when specified, this parameter is used
2426                         for result publication in the study. Otherwise, if automatic
2427                         publication is switched on, default value is used for result name.
2428
2429             Returns:
2430                 New GEOM.GEOM_Object, containing the created wire.
2431             """
2432             theCommand,Parameters = ParseSketcherCommand(theCommand)
2433             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2434             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2435             anObj.SetParameters(Parameters)
2436             self._autoPublish(anObj, theName, "wire")
2437             return anObj
2438
2439         ## Obtain a 2D sketcher interface
2440         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface      
2441         def Sketcher2D (self):
2442             """
2443             Obtain a 2D sketcher interface.
2444
2445             Example of usage:
2446                sk = geompy.Sketcher2D()
2447                sk.addPoint(20, 20)
2448                sk.addSegmentRelative(15, 70)
2449                sk.addSegmentPerpY(50)
2450                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2451                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2452                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2453                sk.close()
2454                Sketch_1 = sk.wire(geomObj_1)
2455             """
2456             sk = Sketcher2D (self)
2457             return sk
2458         
2459         ## Create a sketcher wire, following the numerical description,
2460         #  passed through <VAR>theCoordinates</VAR> argument. \n
2461         #  @param theCoordinates double values, defining points to create a wire,
2462         #                                                      passing from it.
2463         #  @param theName Object name; when specified, this parameter is used
2464         #         for result publication in the study. Otherwise, if automatic
2465         #         publication is switched on, default value is used for result name.
2466         #
2467         #  @return New GEOM.GEOM_Object, containing the created wire.
2468         #
2469         #  @ref tui_3dsketcher_page "Example"
2470         def Make3DSketcher(self, theCoordinates, theName=None):
2471             """
2472             Create a sketcher wire, following the numerical description,
2473             passed through theCoordinates argument.
2474
2475             Parameters:
2476                 theCoordinates double values, defining points to create a wire,
2477                                passing from it.
2478                 theName Object name; when specified, this parameter is used
2479                         for result publication in the study. Otherwise, if automatic
2480                         publication is switched on, default value is used for result name.
2481
2482             Returns:
2483                 New GEOM_Object, containing the created wire.
2484             """
2485             theCoordinates,Parameters = ParseParameters(theCoordinates)
2486             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2487             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2488             anObj.SetParameters(Parameters)
2489             self._autoPublish(anObj, theName, "wire")
2490             return anObj
2491
2492         ## Obtain a 3D sketcher interface
2493         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2494         #
2495         #  @ref tui_3dsketcher_page "Example"
2496         def Sketcher3D (self):
2497             """
2498             Obtain a 3D sketcher interface.
2499
2500             Example of usage:
2501                 sk = geompy.Sketcher3D()
2502                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2503                 sk.addPointsRelative(0, 0, 130)
2504                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2505                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2506                 sk.close()
2507                 a3D_Sketcher_1 = sk.wire()
2508             """
2509             sk = Sketcher3D (self)
2510             return sk
2511
2512         # end of l3_sketcher
2513         ## @}
2514
2515         ## @addtogroup l3_3d_primitives
2516         ## @{
2517
2518         ## Create a box by coordinates of two opposite vertices.
2519         #
2520         #  @param x1,y1,z1 double values, defining first point it.
2521         #  @param x2,y2,z2 double values, defining first point it.
2522         #  @param theName Object name; when specified, this parameter is used
2523         #         for result publication in the study. Otherwise, if automatic
2524         #         publication is switched on, default value is used for result name.
2525         #
2526         #  @return New GEOM.GEOM_Object, containing the created box.
2527         #
2528         #  @ref tui_creation_box "Example"
2529         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2530             """
2531             Create a box by coordinates of two opposite vertices.
2532             
2533             Parameters:
2534                 x1,y1,z1 double values, defining first point.
2535                 x2,y2,z2 double values, defining second point.
2536                 theName Object name; when specified, this parameter is used
2537                         for result publication in the study. Otherwise, if automatic
2538                         publication is switched on, default value is used for result name.
2539                 
2540             Returns:
2541                 New GEOM.GEOM_Object, containing the created box.
2542             """
2543             # Example: see GEOM_TestAll.py
2544             pnt1 = self.MakeVertex(x1,y1,z1)
2545             pnt2 = self.MakeVertex(x2,y2,z2)
2546             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2547             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2548
2549         ## Create a box with specified dimensions along the coordinate axes
2550         #  and with edges, parallel to the coordinate axes.
2551         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2552         #  @param theDX Length of Box edges, parallel to OX axis.
2553         #  @param theDY Length of Box edges, parallel to OY axis.
2554         #  @param theDZ Length of Box edges, parallel to OZ axis.
2555         #  @param theName Object name; when specified, this parameter is used
2556         #         for result publication in the study. Otherwise, if automatic
2557         #         publication is switched on, default value is used for result name.
2558         #
2559         #  @return New GEOM.GEOM_Object, containing the created box.
2560         #
2561         #  @ref tui_creation_box "Example"
2562         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2563             """
2564             Create a box with specified dimensions along the coordinate axes
2565             and with edges, parallel to the coordinate axes.
2566             Center of the box will be at point (DX/2, DY/2, DZ/2).
2567
2568             Parameters:
2569                 theDX Length of Box edges, parallel to OX axis.
2570                 theDY Length of Box edges, parallel to OY axis.
2571                 theDZ Length of Box edges, parallel to OZ axis.
2572                 theName Object name; when specified, this parameter is used
2573                         for result publication in the study. Otherwise, if automatic
2574                         publication is switched on, default value is used for result name.
2575
2576             Returns:   
2577                 New GEOM.GEOM_Object, containing the created box.
2578             """
2579             # Example: see GEOM_TestAll.py
2580             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2581             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2582             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2583             anObj.SetParameters(Parameters)
2584             self._autoPublish(anObj, theName, "box")
2585             return anObj
2586
2587         ## Create a box with two specified opposite vertices,
2588         #  and with edges, parallel to the coordinate axes
2589         #  @param thePnt1 First of two opposite vertices.
2590         #  @param thePnt2 Second of two opposite vertices.
2591         #  @param theName Object name; when specified, this parameter is used
2592         #         for result publication in the study. Otherwise, if automatic
2593         #         publication is switched on, default value is used for result name.
2594         #
2595         #  @return New GEOM.GEOM_Object, containing the created box.
2596         #
2597         #  @ref tui_creation_box "Example"
2598         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2599             """
2600             Create a box with two specified opposite vertices,
2601             and with edges, parallel to the coordinate axes
2602
2603             Parameters:
2604                 thePnt1 First of two opposite vertices.
2605                 thePnt2 Second of two opposite vertices.
2606                 theName Object name; when specified, this parameter is used
2607                         for result publication in the study. Otherwise, if automatic
2608                         publication is switched on, default value is used for result name.
2609
2610             Returns:
2611                 New GEOM.GEOM_Object, containing the created box.
2612             """
2613             # Example: see GEOM_TestAll.py
2614             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2615             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2616             self._autoPublish(anObj, theName, "box")
2617             return anObj
2618
2619         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2620         #  @param theH height of Face.
2621         #  @param theW width of Face.
2622         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2623         #  @param theName Object name; when specified, this parameter is used
2624         #         for result publication in the study. Otherwise, if automatic
2625         #         publication is switched on, default value is used for result name.
2626         #
2627         #  @return New GEOM.GEOM_Object, containing the created face.
2628         #
2629         #  @ref tui_creation_face "Example"
2630         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2631             """
2632             Create a face with specified dimensions with edges parallel to coordinate axes.
2633
2634             Parameters:
2635                 theH height of Face.
2636                 theW width of Face.
2637                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2638                 theName Object name; when specified, this parameter is used
2639                         for result publication in the study. Otherwise, if automatic
2640                         publication is switched on, default value is used for result name.
2641
2642             Returns:
2643                 New GEOM.GEOM_Object, containing the created face.
2644             """
2645             # Example: see GEOM_TestAll.py
2646             theH,theW,Parameters = ParseParameters(theH, theW)
2647             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2648             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2649             anObj.SetParameters(Parameters)
2650             self._autoPublish(anObj, theName, "rectangle")
2651             return anObj
2652
2653         ## Create a face from another plane and two sizes,
2654         #  vertical size and horisontal size.
2655         #  @param theObj   Normale vector to the creating face or
2656         #  the face object.
2657         #  @param theH     Height (vertical size).
2658         #  @param theW     Width (horisontal size).
2659         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created face.
2664         #
2665         #  @ref tui_creation_face "Example"
2666         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2667             """
2668             Create a face from another plane and two sizes,
2669             vertical size and horisontal size.
2670
2671             Parameters:
2672                 theObj   Normale vector to the creating face or
2673                          the face object.
2674                 theH     Height (vertical size).
2675                 theW     Width (horisontal size).
2676                 theName Object name; when specified, this parameter is used
2677                         for result publication in the study. Otherwise, if automatic
2678                         publication is switched on, default value is used for result name.
2679
2680             Returns:
2681                 New GEOM_Object, containing the created face.
2682             """
2683             # Example: see GEOM_TestAll.py
2684             theH,theW,Parameters = ParseParameters(theH, theW)
2685             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2686             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2687             anObj.SetParameters(Parameters)
2688             self._autoPublish(anObj, theName, "rectangle")
2689             return anObj
2690
2691         ## Create a disk with given center, normal vector and radius.
2692         #  @param thePnt Disk center.
2693         #  @param theVec Vector, normal to the plane of the disk.
2694         #  @param theR Disk radius.
2695         #  @param theName Object name; when specified, this parameter is used
2696         #         for result publication in the study. Otherwise, if automatic
2697         #         publication is switched on, default value is used for result name.
2698         #
2699         #  @return New GEOM.GEOM_Object, containing the created disk.
2700         #
2701         #  @ref tui_creation_disk "Example"
2702         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2703             """
2704             Create a disk with given center, normal vector and radius.
2705
2706             Parameters:
2707                 thePnt Disk center.
2708                 theVec Vector, normal to the plane of the disk.
2709                 theR Disk radius.
2710                 theName Object name; when specified, this parameter is used
2711                         for result publication in the study. Otherwise, if automatic
2712                         publication is switched on, default value is used for result name.
2713
2714             Returns:    
2715                 New GEOM.GEOM_Object, containing the created disk.
2716             """
2717             # Example: see GEOM_TestAll.py
2718             theR,Parameters = ParseParameters(theR)
2719             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2720             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2721             anObj.SetParameters(Parameters)
2722             self._autoPublish(anObj, theName, "disk")
2723             return anObj
2724
2725         ## Create a disk, passing through three given points
2726         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2727         #  @param theName Object name; when specified, this parameter is used
2728         #         for result publication in the study. Otherwise, if automatic
2729         #         publication is switched on, default value is used for result name.
2730         #
2731         #  @return New GEOM.GEOM_Object, containing the created disk.
2732         #
2733         #  @ref tui_creation_disk "Example"
2734         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2735             """
2736             Create a disk, passing through three given points
2737
2738             Parameters:
2739                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2740                 theName Object name; when specified, this parameter is used
2741                         for result publication in the study. Otherwise, if automatic
2742                         publication is switched on, default value is used for result name.
2743
2744             Returns:    
2745                 New GEOM.GEOM_Object, containing the created disk.
2746             """
2747             # Example: see GEOM_TestAll.py
2748             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2749             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2750             self._autoPublish(anObj, theName, "disk")
2751             return anObj
2752
2753         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2754         #  @param theR Radius of Face.
2755         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2756         #  @param theName Object name; when specified, this parameter is used
2757         #         for result publication in the study. Otherwise, if automatic
2758         #         publication is switched on, default value is used for result name.
2759         #
2760         #  @return New GEOM.GEOM_Object, containing the created disk.
2761         #
2762         #  @ref tui_creation_face "Example"
2763         def MakeDiskR(self, theR, theOrientation, theName=None):
2764             """
2765             Create a disk with specified dimensions along OX-OY coordinate axes.
2766
2767             Parameters:
2768                 theR Radius of Face.
2769                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2770                 theName Object name; when specified, this parameter is used
2771                         for result publication in the study. Otherwise, if automatic
2772                         publication is switched on, default value is used for result name.
2773
2774             Returns: 
2775                 New GEOM.GEOM_Object, containing the created disk.
2776
2777             Example of usage:
2778                 Disk3 = geompy.MakeDiskR(100., 1)
2779             """
2780             # Example: see GEOM_TestAll.py
2781             theR,Parameters = ParseParameters(theR)
2782             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2783             RaiseIfFailed("MakeDiskR", self.PrimOp)
2784             anObj.SetParameters(Parameters)
2785             self._autoPublish(anObj, theName, "disk")
2786             return anObj
2787
2788         ## Create a cylinder with given base point, axis, radius and height.
2789         #  @param thePnt Central point of cylinder base.
2790         #  @param theAxis Cylinder axis.
2791         #  @param theR Cylinder radius.
2792         #  @param theH Cylinder height.
2793         #  @param theName Object name; when specified, this parameter is used
2794         #         for result publication in the study. Otherwise, if automatic
2795         #         publication is switched on, default value is used for result name.
2796         #
2797         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2798         #
2799         #  @ref tui_creation_cylinder "Example"
2800         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2801             """
2802             Create a cylinder with given base point, axis, radius and height.
2803
2804             Parameters:
2805                 thePnt Central point of cylinder base.
2806                 theAxis Cylinder axis.
2807                 theR Cylinder radius.
2808                 theH Cylinder height.
2809                 theName Object name; when specified, this parameter is used
2810                         for result publication in the study. Otherwise, if automatic
2811                         publication is switched on, default value is used for result name.
2812
2813             Returns: 
2814                 New GEOM.GEOM_Object, containing the created cylinder.
2815             """
2816             # Example: see GEOM_TestAll.py
2817             theR,theH,Parameters = ParseParameters(theR, theH)
2818             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
2819             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
2820             anObj.SetParameters(Parameters)
2821             self._autoPublish(anObj, theName, "cylinder")
2822             return anObj
2823
2824         ## Create a cylinder with given radius and height at
2825         #  the origin of coordinate system. Axis of the cylinder
2826         #  will be collinear to the OZ axis of the coordinate system.
2827         #  @param theR Cylinder radius.
2828         #  @param theH Cylinder height.
2829         #  @param theName Object name; when specified, this parameter is used
2830         #         for result publication in the study. Otherwise, if automatic
2831         #         publication is switched on, default value is used for result name.
2832         #
2833         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2834         #
2835         #  @ref tui_creation_cylinder "Example"
2836         def MakeCylinderRH(self, theR, theH, theName=None):
2837             """
2838             Create a cylinder with given radius and height at
2839             the origin of coordinate system. Axis of the cylinder
2840             will be collinear to the OZ axis of the coordinate system.
2841
2842             Parameters:
2843                 theR Cylinder radius.
2844                 theH Cylinder height.
2845                 theName Object name; when specified, this parameter is used
2846                         for result publication in the study. Otherwise, if automatic
2847                         publication is switched on, default value is used for result name.
2848
2849             Returns:    
2850                 New GEOM.GEOM_Object, containing the created cylinder.
2851             """
2852             # Example: see GEOM_TestAll.py
2853             theR,theH,Parameters = ParseParameters(theR, theH)
2854             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
2855             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
2856             anObj.SetParameters(Parameters)
2857             self._autoPublish(anObj, theName, "cylinder")
2858             return anObj
2859
2860         ## Create a sphere with given center and radius.
2861         #  @param thePnt Sphere center.
2862         #  @param theR Sphere radius.
2863         #  @param theName Object name; when specified, this parameter is used
2864         #         for result publication in the study. Otherwise, if automatic
2865         #         publication is switched on, default value is used for result name.
2866         #
2867         #  @return New GEOM.GEOM_Object, containing the created sphere.
2868         #
2869         #  @ref tui_creation_sphere "Example"
2870         def MakeSpherePntR(self, thePnt, theR, theName=None):
2871             """
2872             Create a sphere with given center and radius.
2873
2874             Parameters:
2875                 thePnt Sphere center.
2876                 theR Sphere radius.
2877                 theName Object name; when specified, this parameter is used
2878                         for result publication in the study. Otherwise, if automatic
2879                         publication is switched on, default value is used for result name.
2880
2881             Returns:    
2882                 New GEOM.GEOM_Object, containing the created sphere.            
2883             """
2884             # Example: see GEOM_TestAll.py
2885             theR,Parameters = ParseParameters(theR)
2886             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
2887             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
2888             anObj.SetParameters(Parameters)
2889             self._autoPublish(anObj, theName, "sphere")
2890             return anObj
2891
2892         ## Create a sphere with given center and radius.
2893         #  @param x,y,z Coordinates of sphere center.
2894         #  @param theR Sphere radius.
2895         #  @param theName Object name; when specified, this parameter is used
2896         #         for result publication in the study. Otherwise, if automatic
2897         #         publication is switched on, default value is used for result name.
2898         #
2899         #  @return New GEOM.GEOM_Object, containing the created sphere.
2900         #
2901         #  @ref tui_creation_sphere "Example"
2902         def MakeSphere(self, x, y, z, theR, theName=None):
2903             """
2904             Create a sphere with given center and radius.
2905
2906             Parameters: 
2907                 x,y,z Coordinates of sphere center.
2908                 theR Sphere radius.
2909                 theName Object name; when specified, this parameter is used
2910                         for result publication in the study. Otherwise, if automatic
2911                         publication is switched on, default value is used for result name.
2912
2913             Returns:
2914                 New GEOM.GEOM_Object, containing the created sphere.
2915             """
2916             # Example: see GEOM_TestAll.py
2917             point = self.MakeVertex(x, y, z)
2918             # note: auto-publishing is done in self.MakeSpherePntR()
2919             anObj = self.MakeSpherePntR(point, theR, theName)
2920             return anObj
2921
2922         ## Create a sphere with given radius at the origin of coordinate system.
2923         #  @param theR Sphere radius.
2924         #  @param theName Object name; when specified, this parameter is used
2925         #         for result publication in the study. Otherwise, if automatic
2926         #         publication is switched on, default value is used for result name.
2927         #
2928         #  @return New GEOM.GEOM_Object, containing the created sphere.
2929         #
2930         #  @ref tui_creation_sphere "Example"
2931         def MakeSphereR(self, theR, theName=None):
2932             """
2933             Create a sphere with given radius at the origin of coordinate system.
2934
2935             Parameters: 
2936                 theR Sphere radius.
2937                 theName Object name; when specified, this parameter is used
2938                         for result publication in the study. Otherwise, if automatic
2939                         publication is switched on, default value is used for result name.
2940
2941             Returns:
2942                 New GEOM.GEOM_Object, containing the created sphere.            
2943             """
2944             # Example: see GEOM_TestAll.py
2945             theR,Parameters = ParseParameters(theR)
2946             anObj = self.PrimOp.MakeSphereR(theR)
2947             RaiseIfFailed("MakeSphereR", self.PrimOp)
2948             anObj.SetParameters(Parameters)
2949             self._autoPublish(anObj, theName, "sphere")
2950             return anObj
2951
2952         ## Create a cone with given base point, axis, height and radiuses.
2953         #  @param thePnt Central point of the first cone base.
2954         #  @param theAxis Cone axis.
2955         #  @param theR1 Radius of the first cone base.
2956         #  @param theR2 Radius of the second cone base.
2957         #    \note If both radiuses are non-zero, the cone will be truncated.
2958         #    \note If the radiuses are equal, a cylinder will be created instead.
2959         #  @param theH Cone height.
2960         #  @param theName Object name; when specified, this parameter is used
2961         #         for result publication in the study. Otherwise, if automatic
2962         #         publication is switched on, default value is used for result name.
2963         #
2964         #  @return New GEOM.GEOM_Object, containing the created cone.
2965         #
2966         #  @ref tui_creation_cone "Example"
2967         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
2968             """
2969             Create a cone with given base point, axis, height and radiuses.
2970
2971             Parameters: 
2972                 thePnt Central point of the first cone base.
2973                 theAxis Cone axis.
2974                 theR1 Radius of the first cone base.
2975                 theR2 Radius of the second cone base.
2976                 theH Cone height.
2977                 theName Object name; when specified, this parameter is used
2978                         for result publication in the study. Otherwise, if automatic
2979                         publication is switched on, default value is used for result name.
2980
2981             Note:
2982                 If both radiuses are non-zero, the cone will be truncated.
2983                 If the radiuses are equal, a cylinder will be created instead.
2984
2985             Returns:
2986                 New GEOM.GEOM_Object, containing the created cone.
2987             """
2988             # Example: see GEOM_TestAll.py
2989             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
2990             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
2991             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
2992             anObj.SetParameters(Parameters)
2993             self._autoPublish(anObj, theName, "cone")
2994             return anObj
2995
2996         ## Create a cone with given height and radiuses at
2997         #  the origin of coordinate system. Axis of the cone will
2998         #  be collinear to the OZ axis of the coordinate system.
2999         #  @param theR1 Radius of the first cone base.
3000         #  @param theR2 Radius of the second cone base.
3001         #    \note If both radiuses are non-zero, the cone will be truncated.
3002         #    \note If the radiuses are equal, a cylinder will be created instead.
3003         #  @param theH Cone height.
3004         #  @param theName Object name; when specified, this parameter is used
3005         #         for result publication in the study. Otherwise, if automatic
3006         #         publication is switched on, default value is used for result name.
3007         #
3008         #  @return New GEOM.GEOM_Object, containing the created cone.
3009         #
3010         #  @ref tui_creation_cone "Example"
3011         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3012             """
3013             Create a cone with given height and radiuses at
3014             the origin of coordinate system. Axis of the cone will
3015             be collinear to the OZ axis of the coordinate system.
3016
3017             Parameters: 
3018                 theR1 Radius of the first cone base.
3019                 theR2 Radius of the second cone base.
3020                 theH Cone height.
3021                 theName Object name; when specified, this parameter is used
3022                         for result publication in the study. Otherwise, if automatic
3023                         publication is switched on, default value is used for result name.
3024
3025             Note:
3026                 If both radiuses are non-zero, the cone will be truncated.
3027                 If the radiuses are equal, a cylinder will be created instead.
3028
3029             Returns:
3030                 New GEOM.GEOM_Object, containing the created cone.
3031             """
3032             # Example: see GEOM_TestAll.py
3033             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3034             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3035             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3036             anObj.SetParameters(Parameters)
3037             self._autoPublish(anObj, theName, "cone")
3038             return anObj
3039
3040         ## Create a torus with given center, normal vector and radiuses.
3041         #  @param thePnt Torus central point.
3042         #  @param theVec Torus axis of symmetry.
3043         #  @param theRMajor Torus major radius.
3044         #  @param theRMinor Torus minor radius.
3045         #  @param theName Object name; when specified, this parameter is used
3046         #         for result publication in the study. Otherwise, if automatic
3047         #         publication is switched on, default value is used for result name.
3048         #
3049         #  @return New GEOM.GEOM_Object, containing the created torus.
3050         #
3051         #  @ref tui_creation_torus "Example"
3052         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3053             """
3054             Create a torus with given center, normal vector and radiuses.
3055
3056             Parameters: 
3057                 thePnt Torus central point.
3058                 theVec Torus axis of symmetry.
3059                 theRMajor Torus major radius.
3060                 theRMinor Torus minor radius.
3061                 theName Object name; when specified, this parameter is used
3062                         for result publication in the study. Otherwise, if automatic
3063                         publication is switched on, default value is used for result name.
3064
3065            Returns:
3066                 New GEOM.GEOM_Object, containing the created torus.
3067             """
3068             # Example: see GEOM_TestAll.py
3069             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3070             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3071             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3072             anObj.SetParameters(Parameters)
3073             self._autoPublish(anObj, theName, "torus")
3074             return anObj
3075
3076         ## Create a torus with given radiuses at the origin of coordinate system.
3077         #  @param theRMajor Torus major radius.
3078         #  @param theRMinor Torus minor radius.
3079         #  @param theName Object name; when specified, this parameter is used
3080         #         for result publication in the study. Otherwise, if automatic
3081         #         publication is switched on, default value is used for result name.
3082         #
3083         #  @return New GEOM.GEOM_Object, containing the created torus.
3084         #
3085         #  @ref tui_creation_torus "Example"
3086         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3087             """
3088            Create a torus with given radiuses at the origin of coordinate system.
3089
3090            Parameters: 
3091                 theRMajor Torus major radius.
3092                 theRMinor Torus minor radius.
3093                 theName Object name; when specified, this parameter is used
3094                         for result publication in the study. Otherwise, if automatic
3095                         publication is switched on, default value is used for result name.
3096
3097            Returns:
3098                 New GEOM.GEOM_Object, containing the created torus.            
3099             """
3100             # Example: see GEOM_TestAll.py
3101             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3102             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3103             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3104             anObj.SetParameters(Parameters)
3105             self._autoPublish(anObj, theName, "torus")
3106             return anObj
3107
3108         # end of l3_3d_primitives
3109         ## @}
3110
3111         ## @addtogroup l3_complex
3112         ## @{
3113
3114         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3115         #  @param theBase Base shape to be extruded.
3116         #  @param thePoint1 First end of extrusion vector.
3117         #  @param thePoint2 Second end of extrusion vector.
3118         #  @param theScaleFactor Use it to make prism with scaled second base.
3119         #                        Nagative value means not scaled second base.
3120         #  @param theName Object name; when specified, this parameter is used
3121         #         for result publication in the study. Otherwise, if automatic
3122         #         publication is switched on, default value is used for result name.
3123         #
3124         #  @return New GEOM.GEOM_Object, containing the created prism.
3125         #
3126         #  @ref tui_creation_prism "Example"
3127         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3128             """
3129             Create a shape by extrusion of the base shape along a vector, defined by two points.
3130
3131             Parameters: 
3132                 theBase Base shape to be extruded.
3133                 thePoint1 First end of extrusion vector.
3134                 thePoint2 Second end of extrusion vector.
3135                 theScaleFactor Use it to make prism with scaled second base.
3136                                Nagative value means not scaled second base.
3137                 theName Object name; when specified, this parameter is used
3138                         for result publication in the study. Otherwise, if automatic
3139                         publication is switched on, default value is used for result name.
3140
3141             Returns:
3142                 New GEOM.GEOM_Object, containing the created prism.
3143             """
3144             # Example: see GEOM_TestAll.py
3145             anObj = None
3146             Parameters = ""
3147             if theScaleFactor > 0:
3148                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3149                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3150             else:
3151                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3152             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3153             anObj.SetParameters(Parameters)
3154             self._autoPublish(anObj, theName, "prism")
3155             return anObj
3156
3157         ## Create a shape by extrusion of the base shape along a
3158         #  vector, defined by two points, in 2 Ways (forward/backward).
3159         #  @param theBase Base shape to be extruded.
3160         #  @param thePoint1 First end of extrusion vector.
3161         #  @param thePoint2 Second end of extrusion vector.
3162         #  @param theName Object name; when specified, this parameter is used
3163         #         for result publication in the study. Otherwise, if automatic
3164         #         publication is switched on, default value is used for result name.
3165         #
3166         #  @return New GEOM.GEOM_Object, containing the created prism.
3167         #
3168         #  @ref tui_creation_prism "Example"
3169         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3170             """
3171             Create a shape by extrusion of the base shape along a
3172             vector, defined by two points, in 2 Ways (forward/backward).
3173
3174             Parameters: 
3175                 theBase Base shape to be extruded.
3176                 thePoint1 First end of extrusion vector.
3177                 thePoint2 Second end of extrusion vector.
3178                 theName Object name; when specified, this parameter is used
3179                         for result publication in the study. Otherwise, if automatic
3180                         publication is switched on, default value is used for result name.
3181
3182             Returns:
3183                 New GEOM.GEOM_Object, containing the created prism.
3184             """
3185             # Example: see GEOM_TestAll.py
3186             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3187             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3188             self._autoPublish(anObj, theName, "prism")
3189             return anObj
3190
3191         ## Create a shape by extrusion of the base shape along the vector,
3192         #  i.e. all the space, transfixed by the base shape during its translation
3193         #  along the vector on the given distance.
3194         #  @param theBase Base shape to be extruded.
3195         #  @param theVec Direction of extrusion.
3196         #  @param theH Prism dimension along theVec.
3197         #  @param theScaleFactor Use it to make prism with scaled second base.
3198         #                        Negative value means not scaled second base.
3199         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created prism.
3204         #
3205         #  @ref tui_creation_prism "Example"
3206         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3207             """
3208             Create a shape by extrusion of the base shape along the vector,
3209             i.e. all the space, transfixed by the base shape during its translation
3210             along the vector on the given distance.
3211
3212             Parameters: 
3213                 theBase Base shape to be extruded.
3214                 theVec Direction of extrusion.
3215                 theH Prism dimension along theVec.
3216                 theScaleFactor Use it to make prism with scaled second base.
3217                                Negative value means not scaled second base.
3218                 theName Object name; when specified, this parameter is used
3219                         for result publication in the study. Otherwise, if automatic
3220                         publication is switched on, default value is used for result name.
3221
3222             Returns:
3223                 New GEOM.GEOM_Object, containing the created prism.
3224             """
3225             # Example: see GEOM_TestAll.py
3226             anObj = None
3227             Parameters = ""
3228             if theScaleFactor > 0:
3229                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3230                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3231             else:
3232                 theH,Parameters = ParseParameters(theH)
3233                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3234             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3235             anObj.SetParameters(Parameters)
3236             self._autoPublish(anObj, theName, "prism")
3237             return anObj
3238
3239         ## Create a shape by extrusion of the base shape along the vector,
3240         #  i.e. all the space, transfixed by the base shape during its translation
3241         #  along the vector on the given distance in 2 Ways (forward/backward).
3242         #  @param theBase Base shape to be extruded.
3243         #  @param theVec Direction of extrusion.
3244         #  @param theH Prism dimension along theVec in forward direction.
3245         #  @param theName Object name; when specified, this parameter is used
3246         #         for result publication in the study. Otherwise, if automatic
3247         #         publication is switched on, default value is used for result name.
3248         #
3249         #  @return New GEOM.GEOM_Object, containing the created prism.
3250         #
3251         #  @ref tui_creation_prism "Example"
3252         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3253             """
3254             Create a shape by extrusion of the base shape along the vector,
3255             i.e. all the space, transfixed by the base shape during its translation
3256             along the vector on the given distance in 2 Ways (forward/backward).
3257
3258             Parameters:
3259                 theBase Base shape to be extruded.
3260                 theVec Direction of extrusion.
3261                 theH Prism dimension along theVec in forward direction.
3262                 theName Object name; when specified, this parameter is used
3263                         for result publication in the study. Otherwise, if automatic
3264                         publication is switched on, default value is used for result name.
3265
3266             Returns:
3267                 New GEOM.GEOM_Object, containing the created prism.
3268             """
3269             # Example: see GEOM_TestAll.py
3270             theH,Parameters = ParseParameters(theH)
3271             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3272             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3273             anObj.SetParameters(Parameters)
3274             self._autoPublish(anObj, theName, "prism")
3275             return anObj
3276
3277         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3278         #  @param theBase Base shape to be extruded.
3279         #  @param theDX, theDY, theDZ Directions of extrusion.
3280         #  @param theScaleFactor Use it to make prism with scaled second base.
3281         #                        Nagative value means not scaled second base.
3282         #  @param theName Object name; when specified, this parameter is used
3283         #         for result publication in the study. Otherwise, if automatic
3284         #         publication is switched on, default value is used for result name.
3285         #
3286         #  @return New GEOM.GEOM_Object, containing the created prism.
3287         #
3288         #  @ref tui_creation_prism "Example"
3289         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3290             """
3291             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3292
3293             Parameters:
3294                 theBase Base shape to be extruded.
3295                 theDX, theDY, theDZ Directions of extrusion.
3296                 theScaleFactor Use it to make prism with scaled second base.
3297                                Nagative value means not scaled second base.
3298                 theName Object name; when specified, this parameter is used
3299                         for result publication in the study. Otherwise, if automatic
3300                         publication is switched on, default value is used for result name.
3301
3302             Returns: 
3303                 New GEOM.GEOM_Object, containing the created prism.
3304             """
3305             # Example: see GEOM_TestAll.py
3306             anObj = None
3307             Parameters = ""
3308             if theScaleFactor > 0:
3309                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3310                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3311             else:
3312                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3313                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3314             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3315             anObj.SetParameters(Parameters)
3316             self._autoPublish(anObj, theName, "prism")
3317             return anObj
3318
3319         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3320         #  i.e. all the space, transfixed by the base shape during its translation
3321         #  along the vector on the given distance in 2 Ways (forward/backward).
3322         #  @param theBase Base shape to be extruded.
3323         #  @param theDX, theDY, theDZ Directions of extrusion.
3324         #  @param theName Object name; when specified, this parameter is used
3325         #         for result publication in the study. Otherwise, if automatic
3326         #         publication is switched on, default value is used for result name.
3327         #
3328         #  @return New GEOM.GEOM_Object, containing the created prism.
3329         #
3330         #  @ref tui_creation_prism "Example"
3331         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3332             """
3333             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3334             i.e. all the space, transfixed by the base shape during its translation
3335             along the vector on the given distance in 2 Ways (forward/backward).
3336
3337             Parameters:
3338                 theBase Base shape to be extruded.
3339                 theDX, theDY, theDZ Directions of extrusion.
3340                 theName Object name; when specified, this parameter is used
3341                         for result publication in the study. Otherwise, if automatic
3342                         publication is switched on, default value is used for result name.
3343
3344             Returns:
3345                 New GEOM.GEOM_Object, containing the created prism.
3346             """
3347             # Example: see GEOM_TestAll.py
3348             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3349             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3350             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3351             anObj.SetParameters(Parameters)
3352             self._autoPublish(anObj, theName, "prism")
3353             return anObj
3354
3355         ## Create a shape by revolution of the base shape around the axis
3356         #  on the given angle, i.e. all the space, transfixed by the base
3357         #  shape during its rotation around the axis on the given angle.
3358         #  @param theBase Base shape to be rotated.
3359         #  @param theAxis Rotation axis.
3360         #  @param theAngle Rotation angle in radians.
3361         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created revolution.
3366         #
3367         #  @ref tui_creation_revolution "Example"
3368         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3369             """
3370             Create a shape by revolution of the base shape around the axis
3371             on the given angle, i.e. all the space, transfixed by the base
3372             shape during its rotation around the axis on the given angle.
3373
3374             Parameters:
3375                 theBase Base shape to be rotated.
3376                 theAxis Rotation axis.
3377                 theAngle Rotation angle in radians.
3378                 theName Object name; when specified, this parameter is used
3379                         for result publication in the study. Otherwise, if automatic
3380                         publication is switched on, default value is used for result name.
3381
3382             Returns: 
3383                 New GEOM.GEOM_Object, containing the created revolution.
3384             """
3385             # Example: see GEOM_TestAll.py
3386             theAngle,Parameters = ParseParameters(theAngle)
3387             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3388             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3389             anObj.SetParameters(Parameters)
3390             self._autoPublish(anObj, theName, "revolution")
3391             return anObj
3392
3393         ## Create a shape by revolution of the base shape around the axis
3394         #  on the given angle, i.e. all the space, transfixed by the base
3395         #  shape during its rotation around the axis on the given angle in
3396         #  both directions (forward/backward)
3397         #  @param theBase Base shape to be rotated.
3398         #  @param theAxis Rotation axis.
3399         #  @param theAngle Rotation angle in radians.
3400         #  @param theName Object name; when specified, this parameter is used
3401         #         for result publication in the study. Otherwise, if automatic
3402         #         publication is switched on, default value is used for result name.
3403         #
3404         #  @return New GEOM.GEOM_Object, containing the created revolution.
3405         #
3406         #  @ref tui_creation_revolution "Example"
3407         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3408             """
3409             Create a shape by revolution of the base shape around the axis
3410             on the given angle, i.e. all the space, transfixed by the base
3411             shape during its rotation around the axis on the given angle in
3412             both directions (forward/backward).
3413
3414             Parameters:
3415                 theBase Base shape to be rotated.
3416                 theAxis Rotation axis.
3417                 theAngle Rotation angle in radians.
3418                 theName Object name; when specified, this parameter is used
3419                         for result publication in the study. Otherwise, if automatic
3420                         publication is switched on, default value is used for result name.
3421
3422             Returns: 
3423                 New GEOM.GEOM_Object, containing the created revolution.
3424             """
3425             theAngle,Parameters = ParseParameters(theAngle)
3426             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3427             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3428             anObj.SetParameters(Parameters)
3429             self._autoPublish(anObj, theName, "revolution")
3430             return anObj
3431
3432         ## Create a filling from the given compound of contours.
3433         #  @param theShape the compound of contours
3434         #  @param theMinDeg a minimal degree of BSpline surface to create
3435         #  @param theMaxDeg a maximal degree of BSpline surface to create
3436         #  @param theTol2D a 2d tolerance to be reached
3437         #  @param theTol3D a 3d tolerance to be reached
3438         #  @param theNbIter a number of iteration of approximation algorithm
3439         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3440         #  @param isApprox if True, BSpline curves are generated in the process
3441         #                  of surface construction. By default it is False, that means
3442         #                  the surface is created using given curves. The usage of
3443         #                  Approximation makes the algorithm work slower, but allows
3444         #                  building the surface for rather complex cases.
3445         #  @param theName Object name; when specified, this parameter is used
3446         #         for result publication in the study. Otherwise, if automatic
3447         #         publication is switched on, default value is used for result name.
3448         #
3449         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3450         #
3451         #  @ref tui_creation_filling "Example"
3452         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3453                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3454             """
3455             Create a filling from the given compound of contours.
3456
3457             Parameters:
3458                 theShape the compound of contours
3459                 theMinDeg a minimal degree of BSpline surface to create
3460                 theMaxDeg a maximal degree of BSpline surface to create
3461                 theTol2D a 2d tolerance to be reached
3462                 theTol3D a 3d tolerance to be reached
3463                 theNbIter a number of iteration of approximation algorithm
3464                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3465                 isApprox if True, BSpline curves are generated in the process
3466                          of surface construction. By default it is False, that means
3467                          the surface is created using given curves. The usage of
3468                          Approximation makes the algorithm work slower, but allows
3469                          building the surface for rather complex cases
3470                 theName Object name; when specified, this parameter is used
3471                         for result publication in the study. Otherwise, if automatic
3472                         publication is switched on, default value is used for result name.
3473
3474             Returns: 
3475                 New GEOM.GEOM_Object, containing the created filling surface.
3476
3477             Example of usage:
3478                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3479             """
3480             # Example: see GEOM_TestAll.py
3481             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3482             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3483                                             theTol2D, theTol3D, theNbIter,
3484                                             theMethod, isApprox)
3485             RaiseIfFailed("MakeFilling", self.PrimOp)
3486             anObj.SetParameters(Parameters)
3487             self._autoPublish(anObj, theName, "filling")
3488             return anObj
3489
3490
3491         ## Create a filling from the given compound of contours.
3492         #  This method corresponds to MakeFilling with isApprox=True
3493         #  @param theShape the compound of contours
3494         #  @param theMinDeg a minimal degree of BSpline surface to create
3495         #  @param theMaxDeg a maximal degree of BSpline surface to create
3496         #  @param theTol3D a 3d tolerance to be reached
3497         #  @param theName Object name; when specified, this parameter is used
3498         #         for result publication in the study. Otherwise, if automatic
3499         #         publication is switched on, default value is used for result name.
3500         #
3501         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3502         #
3503         #  @ref tui_creation_filling "Example"
3504         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3505             """
3506             Create a filling from the given compound of contours.
3507             This method corresponds to MakeFilling with isApprox=True
3508
3509             Parameters:
3510                 theShape the compound of contours
3511                 theMinDeg a minimal degree of BSpline surface to create
3512                 theMaxDeg a maximal degree of BSpline surface to create
3513                 theTol3D a 3d tolerance to be reached
3514                 theName Object name; when specified, this parameter is used
3515                         for result publication in the study. Otherwise, if automatic
3516                         publication is switched on, default value is used for result name.
3517
3518             Returns: 
3519                 New GEOM.GEOM_Object, containing the created filling surface.
3520
3521             Example of usage:
3522                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3523             """
3524             # Example: see GEOM_TestAll.py
3525             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3526             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3527                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3528             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3529             anObj.SetParameters(Parameters)
3530             self._autoPublish(anObj, theName, "filling")
3531             return anObj
3532
3533         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3534         #  @param theSeqSections - set of specified sections.
3535         #  @param theModeSolid - mode defining building solid or shell
3536         #  @param thePreci - precision 3D used for smoothing
3537         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3538         #  @param theName Object name; when specified, this parameter is used
3539         #         for result publication in the study. Otherwise, if automatic
3540         #         publication is switched on, default value is used for result name.
3541         #
3542         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3543         #
3544         #  @ref swig_todo "Example"
3545         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3546             """
3547             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3548
3549             Parameters:
3550                 theSeqSections - set of specified sections.
3551                 theModeSolid - mode defining building solid or shell
3552                 thePreci - precision 3D used for smoothing
3553                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3554                 theName Object name; when specified, this parameter is used
3555                         for result publication in the study. Otherwise, if automatic
3556                         publication is switched on, default value is used for result name.
3557
3558             Returns:
3559                 New GEOM.GEOM_Object, containing the created shell or solid.
3560             """
3561             # Example: see GEOM_TestAll.py
3562             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3563             RaiseIfFailed("MakeThruSections", self.PrimOp)
3564             self._autoPublish(anObj, theName, "filling")
3565             return anObj
3566
3567         ## Create a shape by extrusion of the base shape along
3568         #  the path shape. The path shape can be a wire or an edge.
3569         #  @param theBase Base shape to be extruded.
3570         #  @param thePath Path shape to extrude the base shape along it.
3571         #  @param theName Object name; when specified, this parameter is used
3572         #         for result publication in the study. Otherwise, if automatic
3573         #         publication is switched on, default value is used for result name.
3574         #
3575         #  @return New GEOM.GEOM_Object, containing the created pipe.
3576         #
3577         #  @ref tui_creation_pipe "Example"
3578         def MakePipe(self, theBase, thePath, theName=None):
3579             """
3580             Create a shape by extrusion of the base shape along
3581             the path shape. The path shape can be a wire or an edge.
3582
3583             Parameters:
3584                 theBase Base shape to be extruded.
3585                 thePath Path shape to extrude the base shape along it.
3586                 theName Object name; when specified, this parameter is used
3587                         for result publication in the study. Otherwise, if automatic
3588                         publication is switched on, default value is used for result name.
3589
3590             Returns:
3591                 New GEOM.GEOM_Object, containing the created pipe.
3592             """
3593             # Example: see GEOM_TestAll.py
3594             anObj = self.PrimOp.MakePipe(theBase, thePath)
3595             RaiseIfFailed("MakePipe", self.PrimOp)
3596             self._autoPublish(anObj, theName, "pipe")
3597             return anObj
3598
3599         ## Create a shape by extrusion of the profile shape along
3600         #  the path shape. The path shape can be a wire or an edge.
3601         #  the several profiles can be specified in the several locations of path.
3602         #  @param theSeqBases - list of  Bases shape to be extruded.
3603         #  @param theLocations - list of locations on the path corresponding
3604         #                        specified list of the Bases shapes. Number of locations
3605         #                        should be equal to number of bases or list of locations can be empty.
3606         #  @param thePath - Path shape to extrude the base shape along it.
3607         #  @param theWithContact - the mode defining that the section is translated to be in
3608         #                          contact with the spine.
3609         #  @param theWithCorrection - defining that the section is rotated to be
3610         #                             orthogonal to the spine tangent in the correspondent point
3611         #  @param theName Object name; when specified, this parameter is used
3612         #         for result publication in the study. Otherwise, if automatic
3613         #         publication is switched on, default value is used for result name.
3614         #
3615         #  @return New GEOM.GEOM_Object, containing the created pipe.
3616         #
3617         #  @ref tui_creation_pipe_with_diff_sec "Example"
3618         def MakePipeWithDifferentSections(self, theSeqBases,
3619                                           theLocations, thePath,
3620                                           theWithContact, theWithCorrection, theName=None):
3621             """
3622             Create a shape by extrusion of the profile shape along
3623             the path shape. The path shape can be a wire or an edge.
3624             the several profiles can be specified in the several locations of path.
3625
3626             Parameters:
3627                 theSeqBases - list of  Bases shape to be extruded.
3628                 theLocations - list of locations on the path corresponding
3629                                specified list of the Bases shapes. Number of locations
3630                                should be equal to number of bases or list of locations can be empty.
3631                 thePath - Path shape to extrude the base shape along it.
3632                 theWithContact - the mode defining that the section is translated to be in
3633                                  contact with the spine(0/1)
3634                 theWithCorrection - defining that the section is rotated to be
3635                                     orthogonal to the spine tangent in the correspondent point (0/1)
3636                 theName Object name; when specified, this parameter is used
3637                         for result publication in the study. Otherwise, if automatic
3638                         publication is switched on, default value is used for result name.
3639
3640             Returns:
3641                 New GEOM.GEOM_Object, containing the created pipe.
3642             """
3643             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3644                                                               theLocations, thePath,
3645                                                               theWithContact, theWithCorrection)
3646             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3647             self._autoPublish(anObj, theName, "pipe")
3648             return anObj
3649
3650         ## Create a shape by extrusion of the profile shape along
3651         #  the path shape. The path shape can be a wire or a edge.
3652         #  the several profiles can be specified in the several locations of path.
3653         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3654         #                       shell or face. If number of faces in neighbour sections
3655         #                       aren't coincided result solid between such sections will
3656         #                       be created using external boundaries of this shells.
3657         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3658         #                          This list is used for searching correspondences between
3659         #                          faces in the sections. Size of this list must be equal
3660         #                          to size of list of base shapes.
3661         #  @param theLocations - list of locations on the path corresponding
3662         #                        specified list of the Bases shapes. Number of locations
3663         #                        should be equal to number of bases. First and last
3664         #                        locations must be coincided with first and last vertexes
3665         #                        of path correspondingly.
3666         #  @param thePath - Path shape to extrude the base shape along it.
3667         #  @param theWithContact - the mode defining that the section is translated to be in
3668         #                          contact with the spine.
3669         #  @param theWithCorrection - defining that the section is rotated to be
3670         #                             orthogonal to the spine tangent in the correspondent point
3671         #  @param theName Object name; when specified, this parameter is used
3672         #         for result publication in the study. Otherwise, if automatic
3673         #         publication is switched on, default value is used for result name.
3674         #
3675         #  @return New GEOM.GEOM_Object, containing the created solids.
3676         #
3677         #  @ref tui_creation_pipe_with_shell_sec "Example"
3678         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3679                                       theLocations, thePath,
3680                                       theWithContact, theWithCorrection, theName=None):
3681             """
3682             Create a shape by extrusion of the profile shape along
3683             the path shape. The path shape can be a wire or a edge.
3684             the several profiles can be specified in the several locations of path.
3685
3686             Parameters:
3687                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3688                               shell or face. If number of faces in neighbour sections
3689                               aren't coincided result solid between such sections will
3690                               be created using external boundaries of this shells.
3691                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3692                                  This list is used for searching correspondences between
3693                                  faces in the sections. Size of this list must be equal
3694                                  to size of list of base shapes.
3695                 theLocations - list of locations on the path corresponding
3696                                specified list of the Bases shapes. Number of locations
3697                                should be equal to number of bases. First and last
3698                                locations must be coincided with first and last vertexes
3699                                of path correspondingly.
3700                 thePath - Path shape to extrude the base shape along it.
3701                 theWithContact - the mode defining that the section is translated to be in
3702                                  contact with the spine (0/1)
3703                 theWithCorrection - defining that the section is rotated to be
3704                                     orthogonal to the spine tangent in the correspondent point (0/1)
3705                 theName Object name; when specified, this parameter is used
3706                         for result publication in the study. Otherwise, if automatic
3707                         publication is switched on, default value is used for result name.
3708
3709             Returns:                           
3710                 New GEOM.GEOM_Object, containing the created solids.
3711             """
3712             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
3713                                                           theLocations, thePath,
3714                                                           theWithContact, theWithCorrection)
3715             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3716             self._autoPublish(anObj, theName, "pipe")
3717             return anObj
3718
3719         ## Create a shape by extrusion of the profile shape along
3720         #  the path shape. This function is used only for debug pipe
3721         #  functionality - it is a version of function MakePipeWithShellSections()
3722         #  which give a possibility to recieve information about
3723         #  creating pipe between each pair of sections step by step.
3724         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
3725                                              theLocations, thePath,
3726                                              theWithContact, theWithCorrection, theName=None):
3727             """
3728             Create a shape by extrusion of the profile shape along
3729             the path shape. This function is used only for debug pipe
3730             functionality - it is a version of previous function
3731             geompy.MakePipeWithShellSections() which give a possibility to
3732             recieve information about creating pipe between each pair of
3733             sections step by step.
3734             """
3735             res = []
3736             nbsect = len(theSeqBases)
3737             nbsubsect = len(theSeqSubBases)
3738             #print "nbsect = ",nbsect
3739             for i in range(1,nbsect):
3740                 #print "  i = ",i
3741                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
3742                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
3743                 tmpSeqSubBases = []
3744                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
3745                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
3746                                                               tmpLocations, thePath,
3747                                                               theWithContact, theWithCorrection)
3748                 if self.PrimOp.IsDone() == 0:
3749                     print "Problems with pipe creation between ",i," and ",i+1," sections"
3750                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3751                     break
3752                 else:
3753                     print "Pipe between ",i," and ",i+1," sections is OK"
3754                     res.append(anObj)
3755                     pass
3756                 pass
3757
3758             resc = self.MakeCompound(res)
3759             #resc = self.MakeSewing(res, 0.001)
3760             #print "resc: ",resc
3761             self._autoPublish(resc, theName, "pipe")
3762             return resc
3763
3764         ## Create solids between given sections
3765         #  @param theSeqBases - list of sections (shell or face).
3766         #  @param theLocations - list of corresponding vertexes
3767         #  @param theName Object name; when specified, this parameter is used
3768         #         for result publication in the study. Otherwise, if automatic
3769         #         publication is switched on, default value is used for result name.
3770         #
3771         #  @return New GEOM.GEOM_Object, containing the created solids.
3772         #
3773         #  @ref tui_creation_pipe_without_path "Example"
3774         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
3775             """
3776             Create solids between given sections
3777
3778             Parameters:
3779                 theSeqBases - list of sections (shell or face).
3780                 theLocations - list of corresponding vertexes
3781                 theName Object name; when specified, this parameter is used
3782                         for result publication in the study. Otherwise, if automatic
3783                         publication is switched on, default value is used for result name.
3784
3785             Returns:
3786                 New GEOM.GEOM_Object, containing the created solids.
3787             """
3788             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
3789             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
3790             self._autoPublish(anObj, theName, "pipe")
3791             return anObj
3792
3793         ## Create a shape by extrusion of the base shape along
3794         #  the path shape with constant bi-normal direction along the given vector.
3795         #  The path shape can be a wire or an edge.
3796         #  @param theBase Base shape to be extruded.
3797         #  @param thePath Path shape to extrude the base shape along it.
3798         #  @param theVec Vector defines a constant binormal direction to keep the
3799         #                same angle beetween the direction and the sections
3800         #                along the sweep surface.
3801         #  @param theName Object name; when specified, this parameter is used
3802         #         for result publication in the study. Otherwise, if automatic
3803         #         publication is switched on, default value is used for result name.
3804         #
3805         #  @return New GEOM.GEOM_Object, containing the created pipe.
3806         #
3807         #  @ref tui_creation_pipe "Example"
3808         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
3809             """
3810             Create a shape by extrusion of the base shape along
3811             the path shape with constant bi-normal direction along the given vector.
3812             The path shape can be a wire or an edge.
3813
3814             Parameters:
3815                 theBase Base shape to be extruded.
3816                 thePath Path shape to extrude the base shape along it.
3817                 theVec Vector defines a constant binormal direction to keep the
3818                        same angle beetween the direction and the sections
3819                        along the sweep surface.
3820                 theName Object name; when specified, this parameter is used
3821                         for result publication in the study. Otherwise, if automatic
3822                         publication is switched on, default value is used for result name.
3823
3824             Returns:              
3825                 New GEOM.GEOM_Object, containing the created pipe.
3826             """
3827             # Example: see GEOM_TestAll.py
3828             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
3829             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
3830             self._autoPublish(anObj, theName, "pipe")
3831             return anObj
3832               
3833         ## Makes a thick solid from a face or a shell
3834         #  @param theShape Face or Shell to be thicken
3835         #  @param theThickness Thickness of the resulting solid
3836         #  @param theName Object name; when specified, this parameter is used
3837         #         for result publication in the study. Otherwise, if automatic
3838         #         publication is switched on, default value is used for result name.
3839         #
3840         #  @return New GEOM.GEOM_Object, containing the created solid
3841         #
3842         def MakeThickSolid(self, theShape, theThickness, theName=None):
3843             """
3844             Make a thick solid from a face or a shell
3845
3846             Parameters:
3847                  theShape Face or Shell to be thicken
3848                  theThickness Thickness of the resulting solid
3849                  theName Object name; when specified, this parameter is used
3850                  for result publication in the study. Otherwise, if automatic
3851                  publication is switched on, default value is used for result name.
3852                  
3853             Returns:
3854                 New GEOM.GEOM_Object, containing the created solid
3855             """
3856             # Example: see GEOM_TestAll.py
3857             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
3858             RaiseIfFailed("MakeThickening", self.PrimOp)
3859             self._autoPublish(anObj, theName, "pipe")
3860             return anObj
3861             
3862
3863         ## Modifies a face or a shell to make it a thick solid
3864         #  @param theShape Face or Shell to be thicken
3865         #  @param theThickness Thickness of the resulting solid
3866         #
3867         #  @return The modified shape
3868         #
3869         def Thicken(self, theShape, theThickness):
3870             """
3871             Modifies a face or a shell to make it a thick solid
3872
3873             Parameters:
3874                 theBase Base shape to be extruded.
3875                 thePath Path shape to extrude the base shape along it.
3876                 theName Object name; when specified, this parameter is used
3877                         for result publication in the study. Otherwise, if automatic
3878                         publication is switched on, default value is used for result name.
3879
3880             Returns:
3881                 The modified shape
3882             """
3883             # Example: see GEOM_TestAll.py
3884             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
3885             RaiseIfFailed("MakeThickening", self.PrimOp)
3886             return anObj
3887
3888         ## Build a middle path of a pipe-like shape.
3889         #  The path shape can be a wire or an edge.
3890         #  @param theShape It can be closed or unclosed pipe-like shell
3891         #                  or a pipe-like solid.
3892         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
3893         #                            should be wires or faces of theShape.
3894         #  @param theName Object name; when specified, this parameter is used
3895         #         for result publication in the study. Otherwise, if automatic
3896         #         publication is switched on, default value is used for result name.
3897         #
3898         #  @note It is not assumed that exact or approximate copy of theShape
3899         #        can be obtained by applying existing Pipe operation on the
3900         #        resulting "Path" wire taking theBase1 as the base - it is not
3901         #        always possible; though in some particular cases it might work
3902         #        it is not guaranteed. Thus, RestorePath function should not be
3903         #        considered as an exact reverse operation of the Pipe.
3904         #
3905         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3906         #                                source pipe's "path".
3907         #
3908         #  @ref tui_creation_pipe_path "Example"
3909         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
3910             """
3911             Build a middle path of a pipe-like shape.
3912             The path shape can be a wire or an edge.
3913
3914             Parameters:
3915                 theShape It can be closed or unclosed pipe-like shell
3916                          or a pipe-like solid.
3917                 theBase1, theBase2 Two bases of the supposed pipe. This
3918                                    should be wires or faces of theShape.
3919                 theName Object name; when specified, this parameter is used
3920                         for result publication in the study. Otherwise, if automatic
3921                         publication is switched on, default value is used for result name.
3922
3923             Returns:
3924                 New GEOM_Object, containing an edge or wire that represent
3925                                  source pipe's path.
3926             """
3927             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
3928             RaiseIfFailed("RestorePath", self.PrimOp)
3929             self._autoPublish(anObj, theName, "path")
3930             return anObj
3931
3932         ## Build a middle path of a pipe-like shape.
3933         #  The path shape can be a wire or an edge.
3934         #  @param theShape It can be closed or unclosed pipe-like shell
3935         #                  or a pipe-like solid.
3936         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
3937         #                                should be lists of edges of theShape.
3938         #  @param theName Object name; when specified, this parameter is used
3939         #         for result publication in the study. Otherwise, if automatic
3940         #         publication is switched on, default value is used for result name.
3941         #
3942         #  @note It is not assumed that exact or approximate copy of theShape
3943         #        can be obtained by applying existing Pipe operation on the
3944         #        resulting "Path" wire taking theBase1 as the base - it is not
3945         #        always possible; though in some particular cases it might work
3946         #        it is not guaranteed. Thus, RestorePath function should not be
3947         #        considered as an exact reverse operation of the Pipe.
3948         #
3949         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3950         #                                source pipe's "path".
3951         #
3952         #  @ref tui_creation_pipe_path "Example"
3953         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
3954             """
3955             Build a middle path of a pipe-like shape.
3956             The path shape can be a wire or an edge.
3957
3958             Parameters:
3959                 theShape It can be closed or unclosed pipe-like shell
3960                          or a pipe-like solid.
3961                 listEdges1, listEdges2 Two bases of the supposed pipe. This
3962                                        should be lists of edges of theShape.
3963                 theName Object name; when specified, this parameter is used
3964                         for result publication in the study. Otherwise, if automatic
3965                         publication is switched on, default value is used for result name.
3966
3967             Returns:
3968                 New GEOM_Object, containing an edge or wire that represent
3969                                  source pipe's path.
3970             """
3971             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
3972             RaiseIfFailed("RestorePath", self.PrimOp)
3973             self._autoPublish(anObj, theName, "path")
3974             return anObj
3975
3976         # end of l3_complex
3977         ## @}
3978
3979         ## @addtogroup l3_advanced
3980         ## @{
3981
3982         ## Create a linear edge with specified ends.
3983         #  @param thePnt1 Point for the first end of edge.
3984         #  @param thePnt2 Point for the second end of edge.
3985         #  @param theName Object name; when specified, this parameter is used
3986         #         for result publication in the study. Otherwise, if automatic
3987         #         publication is switched on, default value is used for result name.
3988         #
3989         #  @return New GEOM.GEOM_Object, containing the created edge.
3990         #
3991         #  @ref tui_creation_edge "Example"
3992         def MakeEdge(self, thePnt1, thePnt2, theName=None):
3993             """
3994             Create a linear edge with specified ends.
3995
3996             Parameters:
3997                 thePnt1 Point for the first end of edge.
3998                 thePnt2 Point for the second end of edge.
3999                 theName Object name; when specified, this parameter is used
4000                         for result publication in the study. Otherwise, if automatic
4001                         publication is switched on, default value is used for result name.
4002
4003             Returns:           
4004                 New GEOM.GEOM_Object, containing the created edge.
4005             """
4006             # Example: see GEOM_TestAll.py
4007             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4008             RaiseIfFailed("MakeEdge", self.ShapesOp)
4009             self._autoPublish(anObj, theName, "edge")
4010             return anObj
4011
4012         ## Create a new edge, corresponding to the given length on the given curve.
4013         #  @param theRefCurve The referenced curve (edge).
4014         #  @param theLength Length on the referenced curve. It can be negative.
4015         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4016         #                       at the end of \a theRefCurve, close to the selected point.
4017         #                       If None, start from the first point of \a theRefCurve.
4018         #  @param theName Object name; when specified, this parameter is used
4019         #         for result publication in the study. Otherwise, if automatic
4020         #         publication is switched on, default value is used for result name.
4021         #
4022         #  @return New GEOM.GEOM_Object, containing the created edge.
4023         #
4024         #  @ref tui_creation_edge "Example"
4025         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4026             """
4027             Create a new edge, corresponding to the given length on the given curve.
4028
4029             Parameters:
4030                 theRefCurve The referenced curve (edge).
4031                 theLength Length on the referenced curve. It can be negative.
4032                 theStartPoint Any point can be selected for it, the new edge will begin
4033                               at the end of theRefCurve, close to the selected point.
4034                               If None, start from the first point of theRefCurve.
4035                 theName Object name; when specified, this parameter is used
4036                         for result publication in the study. Otherwise, if automatic
4037                         publication is switched on, default value is used for result name.
4038
4039             Returns:              
4040                 New GEOM.GEOM_Object, containing the created edge.
4041             """
4042             # Example: see GEOM_TestAll.py
4043             theLength, Parameters = ParseParameters(theLength)
4044             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4045             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4046             anObj.SetParameters(Parameters)
4047             self._autoPublish(anObj, theName, "edge")
4048             return anObj
4049
4050         ## Create an edge from specified wire.
4051         #  @param theWire source Wire
4052         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4053         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4054         #  @param theName Object name; when specified, this parameter is used
4055         #         for result publication in the study. Otherwise, if automatic
4056         #         publication is switched on, default value is used for result name.
4057         #
4058         #  @return New GEOM.GEOM_Object, containing the created edge.
4059         #
4060         #  @ref tui_creation_edge "Example"
4061         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4062             """
4063             Create an edge from specified wire.
4064
4065             Parameters:
4066                 theWire source Wire
4067                 theLinearTolerance linear tolerance value (default = 1e-07)
4068                 theAngularTolerance angular tolerance value (default = 1e-12)
4069                 theName Object name; when specified, this parameter is used
4070                         for result publication in the study. Otherwise, if automatic
4071                         publication is switched on, default value is used for result name.
4072
4073             Returns:
4074                 New GEOM.GEOM_Object, containing the created edge.
4075             """
4076             # Example: see GEOM_TestAll.py
4077             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4078             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4079             self._autoPublish(anObj, theName, "edge")
4080             return anObj
4081
4082         ## Create a wire from the set of edges and wires.
4083         #  @param theEdgesAndWires List of edges and/or wires.
4084         #  @param theTolerance Maximum distance between vertices, that will be merged.
4085         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4086         #  @param theName Object name; when specified, this parameter is used
4087         #         for result publication in the study. Otherwise, if automatic
4088         #         publication is switched on, default value is used for result name.
4089         #
4090         #  @return New GEOM.GEOM_Object, containing the created wire.
4091         #
4092         #  @ref tui_creation_wire "Example"
4093         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4094             """
4095             Create a wire from the set of edges and wires.
4096
4097             Parameters:
4098                 theEdgesAndWires List of edges and/or wires.
4099                 theTolerance Maximum distance between vertices, that will be merged.
4100                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4101                 theName Object name; when specified, this parameter is used
4102                         for result publication in the study. Otherwise, if automatic
4103                         publication is switched on, default value is used for result name.
4104
4105             Returns:                    
4106                 New GEOM.GEOM_Object, containing the created wire.
4107             """
4108             # Example: see GEOM_TestAll.py
4109             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4110             RaiseIfFailed("MakeWire", self.ShapesOp)
4111             self._autoPublish(anObj, theName, "wire")
4112             return anObj
4113
4114         ## Create a face on the given wire.
4115         #  @param theWire closed Wire or Edge to build the face on.
4116         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4117         #                        If the tolerance of the obtained planar face is less
4118         #                        than 1e-06, this face will be returned, otherwise the
4119         #                        algorithm tries to build any suitable face on the given
4120         #                        wire and prints a warning message.
4121         #  @param theName Object name; when specified, this parameter is used
4122         #         for result publication in the study. Otherwise, if automatic
4123         #         publication is switched on, default value is used for result name.
4124         #
4125         #  @return New GEOM.GEOM_Object, containing the created face.
4126         #
4127         #  @ref tui_creation_face "Example"
4128         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4129             """
4130             Create a face on the given wire.
4131
4132             Parameters:
4133                 theWire closed Wire or Edge to build the face on.
4134                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4135                                If the tolerance of the obtained planar face is less
4136                                than 1e-06, this face will be returned, otherwise the
4137                                algorithm tries to build any suitable face on the given
4138                                wire and prints a warning message.
4139                 theName Object name; when specified, this parameter is used
4140                         for result publication in the study. Otherwise, if automatic
4141                         publication is switched on, default value is used for result name.
4142
4143             Returns:
4144                 New GEOM.GEOM_Object, containing the created face.
4145             """
4146             # Example: see GEOM_TestAll.py
4147             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4148             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4149                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4150             else:
4151                 RaiseIfFailed("MakeFace", self.ShapesOp)
4152             self._autoPublish(anObj, theName, "face")
4153             return anObj
4154
4155         ## Create a face on the given wires set.
4156         #  @param theWires List of closed wires or edges to build the face on.
4157         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4158         #                        If the tolerance of the obtained planar face is less
4159         #                        than 1e-06, this face will be returned, otherwise the
4160         #                        algorithm tries to build any suitable face on the given
4161         #                        wire and prints a warning message.
4162         #  @param theName Object name; when specified, this parameter is used
4163         #         for result publication in the study. Otherwise, if automatic
4164         #         publication is switched on, default value is used for result name.
4165         #
4166         #  @return New GEOM.GEOM_Object, containing the created face.
4167         #
4168         #  @ref tui_creation_face "Example"
4169         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4170             """
4171             Create a face on the given wires set.
4172
4173             Parameters:
4174                 theWires List of closed wires or edges to build the face on.
4175                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4176                                If the tolerance of the obtained planar face is less
4177                                than 1e-06, this face will be returned, otherwise the
4178                                algorithm tries to build any suitable face on the given
4179                                wire and prints a warning message.
4180                 theName Object name; when specified, this parameter is used
4181                         for result publication in the study. Otherwise, if automatic
4182                         publication is switched on, default value is used for result name.
4183
4184             Returns: 
4185                 New GEOM.GEOM_Object, containing the created face.
4186             """
4187             # Example: see GEOM_TestAll.py
4188             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4189             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4190                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4191             else:
4192                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4193             self._autoPublish(anObj, theName, "face")
4194             return anObj
4195
4196         ## See MakeFaceWires() method for details.
4197         #
4198         #  @ref tui_creation_face "Example 1"
4199         #  \n @ref swig_MakeFaces  "Example 2"
4200         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4201             """
4202             See geompy.MakeFaceWires() method for details.
4203             """
4204             # Example: see GEOM_TestOthers.py
4205             # note: auto-publishing is done in self.MakeFaceWires()
4206             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4207             return anObj
4208
4209         ## Create a shell from the set of faces and shells.
4210         #  @param theFacesAndShells List of faces and/or shells.
4211         #  @param theName Object name; when specified, this parameter is used
4212         #         for result publication in the study. Otherwise, if automatic
4213         #         publication is switched on, default value is used for result name.
4214         #
4215         #  @return New GEOM.GEOM_Object, containing the created shell.
4216         #
4217         #  @ref tui_creation_shell "Example"
4218         def MakeShell(self, theFacesAndShells, theName=None):
4219             """
4220             Create a shell from the set of faces and shells.
4221
4222             Parameters:
4223                 theFacesAndShells List of faces and/or shells.
4224                 theName Object name; when specified, this parameter is used
4225                         for result publication in the study. Otherwise, if automatic
4226                         publication is switched on, default value is used for result name.
4227
4228             Returns:
4229                 New GEOM.GEOM_Object, containing the created shell.
4230             """
4231             # Example: see GEOM_TestAll.py
4232             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4233             RaiseIfFailed("MakeShell", self.ShapesOp)
4234             self._autoPublish(anObj, theName, "shell")
4235             return anObj
4236
4237         ## Create a solid, bounded by the given shells.
4238         #  @param theShells Sequence of bounding shells.
4239         #  @param theName Object name; when specified, this parameter is used
4240         #         for result publication in the study. Otherwise, if automatic
4241         #         publication is switched on, default value is used for result name.
4242         #
4243         #  @return New GEOM.GEOM_Object, containing the created solid.
4244         #
4245         #  @ref tui_creation_solid "Example"
4246         def MakeSolid(self, theShells, theName=None):
4247             """
4248             Create a solid, bounded by the given shells.
4249
4250             Parameters:
4251                 theShells Sequence of bounding shells.
4252                 theName Object name; when specified, this parameter is used
4253                         for result publication in the study. Otherwise, if automatic
4254                         publication is switched on, default value is used for result name.
4255
4256             Returns:
4257                 New GEOM.GEOM_Object, containing the created solid.
4258             """
4259             # Example: see GEOM_TestAll.py
4260             if len(theShells) == 1:
4261                 descr = self.MeasuOp.IsGoodForSolid(theShells[0])
4262                 #if len(descr) > 0:
4263                 #    raise RuntimeError, "MakeSolidShells : " + descr
4264                 if descr == "WRN_SHAPE_UNCLOSED":
4265                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4266             anObj = self.ShapesOp.MakeSolidShells(theShells)
4267             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4268             self._autoPublish(anObj, theName, "solid")
4269             return anObj
4270
4271         ## Create a compound of the given shapes.
4272         #  @param theShapes List of shapes to put in compound.
4273         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created compound.
4278         #
4279         #  @ref tui_creation_compound "Example"
4280         def MakeCompound(self, theShapes, theName=None):
4281             """
4282             Create a compound of the given shapes.
4283
4284             Parameters:
4285                 theShapes List of shapes to put in compound.
4286                 theName Object name; when specified, this parameter is used
4287                         for result publication in the study. Otherwise, if automatic
4288                         publication is switched on, default value is used for result name.
4289
4290             Returns:
4291                 New GEOM.GEOM_Object, containing the created compound.
4292             """
4293             # Example: see GEOM_TestAll.py
4294             anObj = self.ShapesOp.MakeCompound(theShapes)
4295             RaiseIfFailed("MakeCompound", self.ShapesOp)
4296             self._autoPublish(anObj, theName, "compound")
4297             return anObj
4298
4299         # end of l3_advanced
4300         ## @}
4301
4302         ## @addtogroup l2_measure
4303         ## @{
4304
4305         ## Gives quantity of faces in the given shape.
4306         #  @param theShape Shape to count faces of.
4307         #  @return Quantity of faces.
4308         #
4309         #  @ref swig_NumberOf "Example"
4310         def NumberOfFaces(self, theShape):
4311             """
4312             Gives quantity of faces in the given shape.
4313
4314             Parameters:
4315                 theShape Shape to count faces of.
4316
4317             Returns:    
4318                 Quantity of faces.
4319             """
4320             # Example: see GEOM_TestOthers.py
4321             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4322             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4323             return nb_faces
4324
4325         ## Gives quantity of edges in the given shape.
4326         #  @param theShape Shape to count edges of.
4327         #  @return Quantity of edges.
4328         #
4329         #  @ref swig_NumberOf "Example"
4330         def NumberOfEdges(self, theShape):
4331             """
4332             Gives quantity of edges in the given shape.
4333
4334             Parameters:
4335                 theShape Shape to count edges of.
4336
4337             Returns:    
4338                 Quantity of edges.
4339             """
4340             # Example: see GEOM_TestOthers.py
4341             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4342             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4343             return nb_edges
4344
4345         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4346         #  @param theShape Shape to count sub-shapes of.
4347         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4348         #  @return Quantity of sub-shapes of given type.
4349         #
4350         #  @ref swig_NumberOf "Example"
4351         def NumberOfSubShapes(self, theShape, theShapeType):
4352             """
4353             Gives quantity of sub-shapes of type theShapeType in the given shape.
4354
4355             Parameters:
4356                 theShape Shape to count sub-shapes of.
4357                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4358
4359             Returns:
4360                 Quantity of sub-shapes of given type.
4361             """
4362             # Example: see GEOM_TestOthers.py
4363             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4364             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4365             return nb_ss
4366
4367         ## Gives quantity of solids in the given shape.
4368         #  @param theShape Shape to count solids in.
4369         #  @return Quantity of solids.
4370         #
4371         #  @ref swig_NumberOf "Example"
4372         def NumberOfSolids(self, theShape):
4373             """
4374             Gives quantity of solids in the given shape.
4375
4376             Parameters:
4377                 theShape Shape to count solids in.
4378
4379             Returns:
4380                 Quantity of solids.
4381             """
4382             # Example: see GEOM_TestOthers.py
4383             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4384             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4385             return nb_solids
4386
4387         # end of l2_measure
4388         ## @}
4389
4390         ## @addtogroup l3_healing
4391         ## @{
4392
4393         ## Reverses an orientation the given shape.
4394         #  @param theShape Shape to be reversed.
4395         #  @param theName Object name; when specified, this parameter is used
4396         #         for result publication in the study. Otherwise, if automatic
4397         #         publication is switched on, default value is used for result name.
4398         #
4399         #  @return The reversed copy of theShape.
4400         #
4401         #  @ref swig_ChangeOrientation "Example"
4402         def ChangeOrientation(self, theShape, theName=None):
4403             """
4404             Reverses an orientation the given shape.
4405
4406             Parameters:
4407                 theShape Shape to be reversed.
4408                 theName Object name; when specified, this parameter is used
4409                         for result publication in the study. Otherwise, if automatic
4410                         publication is switched on, default value is used for result name.
4411
4412             Returns:   
4413                 The reversed copy of theShape.
4414             """
4415             # Example: see GEOM_TestAll.py
4416             anObj = self.ShapesOp.ChangeOrientation(theShape)
4417             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4418             self._autoPublish(anObj, theName, "reversed")
4419             return anObj
4420
4421         ## See ChangeOrientation() method for details.
4422         #
4423         #  @ref swig_OrientationChange "Example"
4424         def OrientationChange(self, theShape, theName=None):
4425             """
4426             See geompy.ChangeOrientation method for details.
4427             """
4428             # Example: see GEOM_TestOthers.py
4429             # note: auto-publishing is done in self.ChangeOrientation()
4430             anObj = self.ChangeOrientation(theShape, theName)
4431             return anObj
4432
4433         # end of l3_healing
4434         ## @}
4435
4436         ## @addtogroup l4_obtain
4437         ## @{
4438
4439         ## Retrieve all free faces from the given shape.
4440         #  Free face is a face, which is not shared between two shells of the shape.
4441         #  @param theShape Shape to find free faces in.
4442         #  @return List of IDs of all free faces, contained in theShape.
4443         #
4444         #  @ref tui_measurement_tools_page "Example"
4445         def GetFreeFacesIDs(self,theShape):
4446             """
4447             Retrieve all free faces from the given shape.
4448             Free face is a face, which is not shared between two shells of the shape.
4449
4450             Parameters:
4451                 theShape Shape to find free faces in.
4452
4453             Returns:
4454                 List of IDs of all free faces, contained in theShape.
4455             """
4456             # Example: see GEOM_TestOthers.py
4457             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4458             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4459             return anIDs
4460
4461         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4462         #  @param theShape1 Shape to find sub-shapes in.
4463         #  @param theShape2 Shape to find shared sub-shapes with.
4464         #  @param theShapeType Type of sub-shapes to be retrieved.
4465         #  @param theName Object name; when specified, this parameter is used
4466         #         for result publication in the study. Otherwise, if automatic
4467         #         publication is switched on, default value is used for result name.
4468         #
4469         #  @return List of sub-shapes of theShape1, shared with theShape2.
4470         #
4471         #  @ref swig_GetSharedShapes "Example"
4472         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4473             """
4474             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4475
4476             Parameters:
4477                 theShape1 Shape to find sub-shapes in.
4478                 theShape2 Shape to find shared sub-shapes with.
4479                 theShapeType Type of sub-shapes to be retrieved.
4480                 theName Object name; when specified, this parameter is used
4481                         for result publication in the study. Otherwise, if automatic
4482                         publication is switched on, default value is used for result name.
4483
4484             Returns:
4485                 List of sub-shapes of theShape1, shared with theShape2.
4486             """
4487             # Example: see GEOM_TestOthers.py
4488             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4489             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4490             self._autoPublish(aList, theName, "shared")
4491             return aList
4492
4493         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4494         #  @param theShapes Shapes to find common sub-shapes of.
4495         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4496         #  @param theName Object name; when specified, this parameter is used
4497         #         for result publication in the study. Otherwise, if automatic
4498         #         publication is switched on, default value is used for result name.
4499         #
4500         #  @return List of objects, that are sub-shapes of all given shapes.
4501         #
4502         #  @ref swig_GetSharedShapes "Example"
4503         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4504             """
4505             Get all sub-shapes, shared by all shapes in the list theShapes.
4506
4507             Parameters:
4508                 theShapes Shapes to find common sub-shapes of.
4509                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4510                 theName Object name; when specified, this parameter is used
4511                         for result publication in the study. Otherwise, if automatic
4512                         publication is switched on, default value is used for result name.
4513
4514             Returns:    
4515                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4516             """
4517             # Example: see GEOM_TestOthers.py
4518             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4519             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4520             self._autoPublish(aList, theName, "shared")
4521             return aList
4522
4523         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4524         #  situated relatively the specified plane by the certain way,
4525         #  defined through <VAR>theState</VAR> parameter.
4526         #  @param theShape Shape to find sub-shapes of.
4527         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4528         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4529         #                direction and location of the plane to find shapes on.
4530         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4531         #  @param theName Object name; when specified, this parameter is used
4532         #         for result publication in the study. Otherwise, if automatic
4533         #         publication is switched on, default value is used for result name.
4534         #
4535         #  @return List of all found sub-shapes.
4536         #
4537         #  @ref swig_GetShapesOnPlane "Example"
4538         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4539             """
4540             Find in theShape all sub-shapes of type theShapeType,
4541             situated relatively the specified plane by the certain way,
4542             defined through theState parameter.
4543
4544             Parameters:
4545                 theShape Shape to find sub-shapes of.
4546                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4547                 theAx1 Vector (or line, or linear edge), specifying normal
4548                        direction and location of the plane to find shapes on.
4549                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4550                 theName Object name; when specified, this parameter is used
4551                         for result publication in the study. Otherwise, if automatic
4552                         publication is switched on, default value is used for result name.
4553
4554             Returns:
4555                 List of all found sub-shapes.
4556             """
4557             # Example: see GEOM_TestOthers.py
4558             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4559             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4560             self._autoPublish(aList, theName, "shapeOnPlane")
4561             return aList
4562
4563         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4564         #  situated relatively the specified plane by the certain way,
4565         #  defined through <VAR>theState</VAR> parameter.
4566         #  @param theShape Shape to find sub-shapes of.
4567         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4568         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4569         #                direction and location of the plane to find shapes on.
4570         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4571         #
4572         #  @return List of all found sub-shapes indices.
4573         #
4574         #  @ref swig_GetShapesOnPlaneIDs "Example"
4575         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4576             """
4577             Find in theShape all sub-shapes of type theShapeType,
4578             situated relatively the specified plane by the certain way,
4579             defined through theState parameter.
4580
4581             Parameters:
4582                 theShape Shape to find sub-shapes of.
4583                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4584                 theAx1 Vector (or line, or linear edge), specifying normal
4585                        direction and location of the plane to find shapes on.
4586                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4587
4588             Returns:
4589                 List of all found sub-shapes indices.
4590             """
4591             # Example: see GEOM_TestOthers.py
4592             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4593             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4594             return aList
4595
4596         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4597         #  situated relatively the specified plane by the certain way,
4598         #  defined through <VAR>theState</VAR> parameter.
4599         #  @param theShape Shape to find sub-shapes of.
4600         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4601         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4602         #                direction of the plane to find shapes on.
4603         #  @param thePnt Point specifying location of the plane to find shapes on.
4604         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4605         #  @param theName Object name; when specified, this parameter is used
4606         #         for result publication in the study. Otherwise, if automatic
4607         #         publication is switched on, default value is used for result name.
4608         #
4609         #  @return List of all found sub-shapes.
4610         #
4611         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4612         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4613             """
4614             Find in theShape all sub-shapes of type theShapeType,
4615             situated relatively the specified plane by the certain way,
4616             defined through theState parameter.
4617
4618             Parameters:
4619                 theShape Shape to find sub-shapes of.
4620                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4621                 theAx1 Vector (or line, or linear edge), specifying normal
4622                        direction and location of the plane to find shapes on.
4623                 thePnt Point specifying location of the plane to find shapes on.
4624                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4625                 theName Object name; when specified, this parameter is used
4626                         for result publication in the study. Otherwise, if automatic
4627                         publication is switched on, default value is used for result name.
4628
4629             Returns:
4630                 List of all found sub-shapes.
4631             """
4632             # Example: see GEOM_TestOthers.py
4633             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4634                                                                theAx1, thePnt, theState)
4635             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4636             self._autoPublish(aList, theName, "shapeOnPlane")
4637             return aList
4638
4639         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4640         #  situated relatively the specified plane by the certain way,
4641         #  defined through <VAR>theState</VAR> parameter.
4642         #  @param theShape Shape to find sub-shapes of.
4643         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4644         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4645         #                direction of the plane to find shapes on.
4646         #  @param thePnt Point specifying location of the plane to find shapes on.
4647         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4648         #
4649         #  @return List of all found sub-shapes indices.
4650         #
4651         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4652         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4653             """
4654             Find in theShape all sub-shapes of type theShapeType,
4655             situated relatively the specified plane by the certain way,
4656             defined through theState parameter.
4657
4658             Parameters:
4659                 theShape Shape to find sub-shapes of.
4660                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4661                 theAx1 Vector (or line, or linear edge), specifying normal
4662                        direction and location of the plane to find shapes on.
4663                 thePnt Point specifying location of the plane to find shapes on.
4664                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4665
4666             Returns:
4667                 List of all found sub-shapes indices.
4668             """
4669             # Example: see GEOM_TestOthers.py
4670             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4671                                                                   theAx1, thePnt, theState)
4672             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4673             return aList
4674
4675         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4676         #  the specified cylinder by the certain way, defined through \a theState parameter.
4677         #  @param theShape Shape to find sub-shapes of.
4678         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4679         #  @param theAxis Vector (or line, or linear edge), specifying
4680         #                 axis of the cylinder to find shapes on.
4681         #  @param theRadius Radius of the cylinder to find shapes on.
4682         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4683         #  @param theName Object name; when specified, this parameter is used
4684         #         for result publication in the study. Otherwise, if automatic
4685         #         publication is switched on, default value is used for result name.
4686         #
4687         #  @return List of all found sub-shapes.
4688         #
4689         #  @ref swig_GetShapesOnCylinder "Example"
4690         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
4691             """
4692             Find in theShape all sub-shapes of type theShapeType, situated relatively
4693             the specified cylinder by the certain way, defined through theState parameter.
4694
4695             Parameters:
4696                 theShape Shape to find sub-shapes of.
4697                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4698                 theAxis Vector (or line, or linear edge), specifying
4699                         axis of the cylinder to find shapes on.
4700                 theRadius Radius of the cylinder to find shapes on.
4701                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4702                 theName Object name; when specified, this parameter is used
4703                         for result publication in the study. Otherwise, if automatic
4704                         publication is switched on, default value is used for result name.
4705
4706             Returns:
4707                 List of all found sub-shapes.
4708             """
4709             # Example: see GEOM_TestOthers.py
4710             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
4711             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
4712             self._autoPublish(aList, theName, "shapeOnCylinder")
4713             return aList
4714
4715         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4716         #  the specified cylinder by the certain way, defined through \a theState parameter.
4717         #  @param theShape Shape to find sub-shapes of.
4718         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4719         #  @param theAxis Vector (or line, or linear edge), specifying
4720         #                 axis of the cylinder to find shapes on.
4721         #  @param theRadius Radius of the cylinder to find shapes on.
4722         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4723         #
4724         #  @return List of all found sub-shapes indices.
4725         #
4726         #  @ref swig_GetShapesOnCylinderIDs "Example"
4727         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
4728             """
4729             Find in theShape all sub-shapes of type theShapeType, situated relatively
4730             the specified cylinder by the certain way, defined through theState parameter.
4731
4732             Parameters:
4733                 theShape Shape to find sub-shapes of.
4734                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4735                 theAxis Vector (or line, or linear edge), specifying
4736                         axis of the cylinder to find shapes on.
4737                 theRadius Radius of the cylinder to find shapes on.
4738                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4739
4740             Returns:
4741                 List of all found sub-shapes indices.
4742             """
4743             # Example: see GEOM_TestOthers.py
4744             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
4745             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
4746             return aList
4747
4748         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4749         #  the specified cylinder by the certain way, defined through \a theState parameter.
4750         #  @param theShape Shape to find sub-shapes of.
4751         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4752         #  @param theAxis Vector (or line, or linear edge), specifying
4753         #                 axis of the cylinder to find shapes on.
4754         #  @param thePnt Point specifying location of the bottom of the cylinder.
4755         #  @param theRadius Radius of the cylinder to find shapes on.
4756         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4757         #  @param theName Object name; when specified, this parameter is used
4758         #         for result publication in the study. Otherwise, if automatic
4759         #         publication is switched on, default value is used for result name.
4760         #
4761         #  @return List of all found sub-shapes.
4762         #
4763         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
4764         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
4765             """
4766             Find in theShape all sub-shapes of type theShapeType, situated relatively
4767             the specified cylinder by the certain way, defined through theState parameter.
4768
4769             Parameters:
4770                 theShape Shape to find sub-shapes of.
4771                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4772                 theAxis Vector (or line, or linear edge), specifying
4773                         axis of the cylinder to find shapes on.
4774                 theRadius Radius of the cylinder to find shapes on.
4775                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4776                 theName Object name; when specified, this parameter is used
4777                         for result publication in the study. Otherwise, if automatic
4778                         publication is switched on, default value is used for result name.
4779
4780             Returns:
4781                 List of all found sub-shapes.
4782             """
4783             # Example: see GEOM_TestOthers.py
4784             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4785             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
4786             self._autoPublish(aList, theName, "shapeOnCylinder")
4787             return aList
4788
4789         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4790         #  the specified cylinder by the certain way, defined through \a theState parameter.
4791         #  @param theShape Shape to find sub-shapes of.
4792         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4793         #  @param theAxis Vector (or line, or linear edge), specifying
4794         #                 axis of the cylinder to find shapes on.
4795         #  @param thePnt Point specifying location of the bottom of the cylinder.
4796         #  @param theRadius Radius of the cylinder to find shapes on.
4797         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4798         #
4799         #  @return List of all found sub-shapes indices
4800         #
4801         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
4802         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
4803             """
4804             Find in theShape all sub-shapes of type theShapeType, situated relatively
4805             the specified cylinder by the certain way, defined through theState parameter.
4806
4807             Parameters:
4808                 theShape Shape to find sub-shapes of.
4809                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4810                 theAxis Vector (or line, or linear edge), specifying
4811                         axis of the cylinder to find shapes on.
4812                 theRadius Radius of the cylinder to find shapes on.
4813                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4814
4815             Returns:
4816                 List of all found sub-shapes indices.            
4817             """
4818             # Example: see GEOM_TestOthers.py
4819             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4820             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
4821             return aList
4822
4823         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4824         #  the specified sphere by the certain way, defined through \a theState parameter.
4825         #  @param theShape Shape to find sub-shapes of.
4826         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4827         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4828         #  @param theRadius Radius of the sphere to find shapes on.
4829         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4830         #  @param theName Object name; when specified, this parameter is used
4831         #         for result publication in the study. Otherwise, if automatic
4832         #         publication is switched on, default value is used for result name.
4833         #
4834         #  @return List of all found sub-shapes.
4835         #
4836         #  @ref swig_GetShapesOnSphere "Example"
4837         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
4838             """
4839             Find in theShape all sub-shapes of type theShapeType, situated relatively
4840             the specified sphere by the certain way, defined through theState parameter.
4841
4842             Parameters:
4843                 theShape Shape to find sub-shapes of.
4844                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4845                 theCenter Point, specifying center of the sphere to find shapes on.
4846                 theRadius Radius of the sphere to find shapes on.
4847                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4848                 theName Object name; when specified, this parameter is used
4849                         for result publication in the study. Otherwise, if automatic
4850                         publication is switched on, default value is used for result name.
4851
4852             Returns:
4853                 List of all found sub-shapes.
4854             """
4855             # Example: see GEOM_TestOthers.py
4856             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
4857             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
4858             self._autoPublish(aList, theName, "shapeOnSphere")
4859             return aList
4860
4861         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4862         #  the specified sphere by the certain way, defined through \a theState parameter.
4863         #  @param theShape Shape to find sub-shapes of.
4864         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4865         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4866         #  @param theRadius Radius of the sphere to find shapes on.
4867         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4868         #
4869         #  @return List of all found sub-shapes indices.
4870         #
4871         #  @ref swig_GetShapesOnSphereIDs "Example"
4872         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
4873             """
4874             Find in theShape all sub-shapes of type theShapeType, situated relatively
4875             the specified sphere by the certain way, defined through theState parameter.
4876
4877             Parameters:
4878                 theShape Shape to find sub-shapes of.
4879                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4880                 theCenter Point, specifying center of the sphere to find shapes on.
4881                 theRadius Radius of the sphere to find shapes on.
4882                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4883
4884             Returns:
4885                 List of all found sub-shapes indices.
4886             """
4887             # Example: see GEOM_TestOthers.py
4888             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
4889             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
4890             return aList
4891
4892         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4893         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4894         #  @param theShape Shape to find sub-shapes of.
4895         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4896         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4897         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4898         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4899         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4900         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4901         #  @param theName Object name; when specified, this parameter is used
4902         #         for result publication in the study. Otherwise, if automatic
4903         #         publication is switched on, default value is used for result name.
4904         #
4905         #  @return List of all found sub-shapes.
4906         #
4907         #  @ref swig_GetShapesOnQuadrangle "Example"
4908         def GetShapesOnQuadrangle(self, theShape, theShapeType,
4909                                   theTopLeftPoint, theTopRigthPoint,
4910                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
4911             """
4912             Find in theShape all sub-shapes of type theShapeType, situated relatively
4913             the specified quadrangle by the certain way, defined through theState parameter.
4914
4915             Parameters:
4916                 theShape Shape to find sub-shapes of.
4917                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4918                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4919                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4920                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4921                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4922                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4923                 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             Returns:
4928                 List of all found sub-shapes.
4929             """
4930             # Example: see GEOM_TestOthers.py
4931             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
4932                                                         theTopLeftPoint, theTopRigthPoint,
4933                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
4934             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
4935             self._autoPublish(aList, theName, "shapeOnQuadrangle")
4936             return aList
4937
4938         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4939         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4940         #  @param theShape Shape to find sub-shapes of.
4941         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4942         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4943         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4944         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4945         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4946         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4947         #
4948         #  @return List of all found sub-shapes indices.
4949         #
4950         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
4951         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
4952                                      theTopLeftPoint, theTopRigthPoint,
4953                                      theBottomLeftPoint, theBottomRigthPoint, theState):
4954             """
4955             Find in theShape all sub-shapes of type theShapeType, situated relatively
4956             the specified quadrangle by the certain way, defined through theState parameter.
4957
4958             Parameters:
4959                 theShape Shape to find sub-shapes of.
4960                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4961                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4962                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4963                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4964                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4965                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4966
4967             Returns:
4968                 List of all found sub-shapes indices.
4969             """
4970
4971             # Example: see GEOM_TestOthers.py
4972             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
4973                                                            theTopLeftPoint, theTopRigthPoint,
4974                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
4975             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
4976             return aList
4977
4978         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4979         #  the specified \a theBox by the certain way, defined through \a theState parameter.
4980         #  @param theBox Shape for relative comparing.
4981         #  @param theShape Shape to find sub-shapes of.
4982         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4983         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4984         #  @param theName Object name; when specified, this parameter is used
4985         #         for result publication in the study. Otherwise, if automatic
4986         #         publication is switched on, default value is used for result name.
4987         #
4988         #  @return List of all found sub-shapes.
4989         #
4990         #  @ref swig_GetShapesOnBox "Example"
4991         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
4992             """
4993             Find in theShape all sub-shapes of type theShapeType, situated relatively
4994             the specified theBox by the certain way, defined through theState parameter.
4995
4996             Parameters:
4997                 theBox Shape for relative comparing.
4998                 theShape Shape to find sub-shapes of.
4999                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5000                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5001                 theName Object name; when specified, this parameter is used
5002                         for result publication in the study. Otherwise, if automatic
5003                         publication is switched on, default value is used for result name.
5004
5005             Returns:
5006                 List of all found sub-shapes.
5007             """
5008             # Example: see GEOM_TestOthers.py
5009             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5010             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5011             self._autoPublish(aList, theName, "shapeOnBox")
5012             return aList
5013
5014         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5015         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5016         #  @param theBox Shape for relative comparing.
5017         #  @param theShape Shape to find sub-shapes of.
5018         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5019         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5020         #
5021         #  @return List of all found sub-shapes indices.
5022         #
5023         #  @ref swig_GetShapesOnBoxIDs "Example"
5024         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5025             """
5026             Find in theShape all sub-shapes of type theShapeType, situated relatively
5027             the specified theBox by the certain way, defined through theState parameter.
5028
5029             Parameters:
5030                 theBox Shape for relative comparing.
5031                 theShape Shape to find sub-shapes of.
5032                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5033                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5034
5035             Returns:
5036                 List of all found sub-shapes indices.
5037             """
5038             # Example: see GEOM_TestOthers.py
5039             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5040             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5041             return aList
5042
5043         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5044         #  situated relatively the specified \a theCheckShape by the
5045         #  certain way, defined through \a theState parameter.
5046         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5047         #  @param theShape Shape to find sub-shapes of.
5048         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
5049         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5050         #  @param theName Object name; when specified, this parameter is used
5051         #         for result publication in the study. Otherwise, if automatic
5052         #         publication is switched on, default value is used for result name.
5053         #
5054         #  @return List of all found sub-shapes.
5055         #
5056         #  @ref swig_GetShapesOnShape "Example"
5057         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5058             """
5059             Find in theShape all sub-shapes of type theShapeType,
5060             situated relatively the specified theCheckShape by the
5061             certain way, defined through theState parameter.
5062
5063             Parameters:
5064                 theCheckShape Shape for relative comparing. It must be a solid.
5065                 theShape Shape to find sub-shapes of.
5066                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5067                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5068                 theName Object name; when specified, this parameter is used
5069                         for result publication in the study. Otherwise, if automatic
5070                         publication is switched on, default value is used for result name.
5071
5072             Returns:
5073                 List of all found sub-shapes.
5074             """
5075             # Example: see GEOM_TestOthers.py
5076             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5077                                                    theShapeType, theState)
5078             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5079             self._autoPublish(aList, theName, "shapeOnShape")
5080             return aList
5081
5082         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5083         #  situated relatively the specified \a theCheckShape by the
5084         #  certain way, defined through \a theState parameter.
5085         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5086         #  @param theShape Shape to find sub-shapes of.
5087         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5088         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5089         #  @param theName Object name; when specified, this parameter is used
5090         #         for result publication in the study. Otherwise, if automatic
5091         #         publication is switched on, default value is used for result name.
5092         #
5093         #  @return All found sub-shapes as compound.
5094         #
5095         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5096         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5097             """
5098             Find in theShape all sub-shapes of type theShapeType,
5099             situated relatively the specified theCheckShape by the
5100             certain way, defined through theState parameter.
5101
5102             Parameters:
5103                 theCheckShape Shape for relative comparing. It must be a solid.
5104                 theShape Shape to find sub-shapes of.
5105                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5106                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5107                 theName Object name; when specified, this parameter is used
5108                         for result publication in the study. Otherwise, if automatic
5109                         publication is switched on, default value is used for result name.
5110
5111             Returns:
5112                 All found sub-shapes as compound.
5113             """
5114             # Example: see GEOM_TestOthers.py
5115             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5116                                                              theShapeType, theState)
5117             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5118             self._autoPublish(anObj, theName, "shapeOnShape")
5119             return anObj
5120
5121         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5122         #  situated relatively the specified \a theCheckShape by the
5123         #  certain way, defined through \a theState parameter.
5124         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5125         #  @param theShape Shape to find sub-shapes of.
5126         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5127         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5128         #
5129         #  @return List of all found sub-shapes indices.
5130         #
5131         #  @ref swig_GetShapesOnShapeIDs "Example"
5132         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5133             """
5134             Find in theShape all sub-shapes of type theShapeType,
5135             situated relatively the specified theCheckShape by the
5136             certain way, defined through theState parameter.
5137
5138             Parameters:
5139                 theCheckShape Shape for relative comparing. It must be a solid.
5140                 theShape Shape to find sub-shapes of.
5141                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5142                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5143
5144             Returns:
5145                 List of all found sub-shapes indices.
5146             """
5147             # Example: see GEOM_TestOthers.py
5148             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5149                                                       theShapeType, theState)
5150             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5151             return aList
5152
5153         ## Get sub-shape(s) of theShapeWhere, which are
5154         #  coincident with \a theShapeWhat or could be a part of it.
5155         #  @param theShapeWhere Shape to find sub-shapes of.
5156         #  @param theShapeWhat Shape, specifying what to find.
5157         #  @param isNewImplementation implementation of GetInPlace functionality
5158         #             (default = False, old alghorithm based on shape properties)
5159         #  @param theName Object name; when specified, this parameter is used
5160         #         for result publication in the study. Otherwise, if automatic
5161         #         publication is switched on, default value is used for result name.
5162         #
5163         #  @return Group of all found sub-shapes or a single found sub-shape.
5164         #
5165         #  @note This function has a restriction on argument shapes.
5166         #        If \a theShapeWhere has curved parts with significantly
5167         #        outstanding centres (i.e. the mass centre of a part is closer to
5168         #        \a theShapeWhat than to the part), such parts will not be found.
5169         #        @image html get_in_place_lost_part.png
5170         #
5171         #  @ref swig_GetInPlace "Example"
5172         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5173             """
5174             Get sub-shape(s) of theShapeWhere, which are
5175             coincident with  theShapeWhat or could be a part of it.
5176
5177             Parameters:
5178                 theShapeWhere Shape to find sub-shapes of.
5179                 theShapeWhat Shape, specifying what to find.
5180                 isNewImplementation Implementation of GetInPlace functionality
5181                                     (default = False, old alghorithm based on shape properties)
5182                 theName Object name; when specified, this parameter is used
5183                         for result publication in the study. Otherwise, if automatic
5184                         publication is switched on, default value is used for result name.
5185
5186             Returns:
5187                 Group of all found sub-shapes or a single found sub-shape.
5188
5189                 
5190             Note:
5191                 This function has a restriction on argument shapes.
5192                 If theShapeWhere has curved parts with significantly
5193                 outstanding centres (i.e. the mass centre of a part is closer to
5194                 theShapeWhat than to the part), such parts will not be found.
5195             """
5196             # Example: see GEOM_TestOthers.py
5197             anObj = None
5198             if isNewImplementation:
5199                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5200             else:
5201                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5202                 pass
5203             RaiseIfFailed("GetInPlace", self.ShapesOp)
5204             self._autoPublish(anObj, theName, "inplace")
5205             return anObj
5206
5207         ## Get sub-shape(s) of \a theShapeWhere, which are
5208         #  coincident with \a theShapeWhat or could be a part of it.
5209         #
5210         #  Implementation of this method is based on a saved history of an operation,
5211         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5212         #  arguments (an argument shape or a sub-shape of an argument shape).
5213         #  The operation could be the Partition or one of boolean operations,
5214         #  performed on simple shapes (not on compounds).
5215         #
5216         #  @param theShapeWhere Shape to find sub-shapes of.
5217         #  @param theShapeWhat Shape, specifying what to find (must be in the
5218         #                      building history of the ShapeWhere).
5219         #  @param theName Object name; when specified, this parameter is used
5220         #         for result publication in the study. Otherwise, if automatic
5221         #         publication is switched on, default value is used for result name.
5222         #
5223         #  @return Group of all found sub-shapes or a single found sub-shape.
5224         #
5225         #  @ref swig_GetInPlace "Example"
5226         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5227             """
5228             Implementation of this method is based on a saved history of an operation,
5229             produced theShapeWhere. The theShapeWhat must be among this operation's
5230             arguments (an argument shape or a sub-shape of an argument shape).
5231             The operation could be the Partition or one of boolean operations,
5232             performed on simple shapes (not on compounds).
5233
5234             Parameters:
5235                 theShapeWhere Shape to find sub-shapes of.
5236                 theShapeWhat Shape, specifying what to find (must be in the
5237                                 building history of the ShapeWhere).
5238                 theName Object name; when specified, this parameter is used
5239                         for result publication in the study. Otherwise, if automatic
5240                         publication is switched on, default value is used for result name.
5241
5242             Returns:
5243                 Group of all found sub-shapes or a single found sub-shape.
5244             """
5245             # Example: see GEOM_TestOthers.py
5246             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5247             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5248             self._autoPublish(anObj, theName, "inplace")
5249             return anObj
5250
5251         ## Get sub-shape of theShapeWhere, which is
5252         #  equal to \a theShapeWhat.
5253         #  @param theShapeWhere Shape to find sub-shape of.
5254         #  @param theShapeWhat Shape, specifying what to find.
5255         #  @param theName Object name; when specified, this parameter is used
5256         #         for result publication in the study. Otherwise, if automatic
5257         #         publication is switched on, default value is used for result name.
5258         #
5259         #  @return New GEOM.GEOM_Object for found sub-shape.
5260         #
5261         #  @ref swig_GetSame "Example"
5262         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5263             """
5264             Get sub-shape of theShapeWhere, which is
5265             equal to theShapeWhat.
5266
5267             Parameters:
5268                 theShapeWhere Shape to find sub-shape of.
5269                 theShapeWhat Shape, specifying what to find.
5270                 theName Object name; when specified, this parameter is used
5271                         for result publication in the study. Otherwise, if automatic
5272                         publication is switched on, default value is used for result name.
5273
5274             Returns:
5275                 New GEOM.GEOM_Object for found sub-shape.
5276             """
5277             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5278             RaiseIfFailed("GetSame", self.ShapesOp)
5279             self._autoPublish(anObj, theName, "sameShape")
5280             return anObj
5281
5282
5283         ## Get sub-shape indices of theShapeWhere, which is
5284         #  equal to \a theShapeWhat.
5285         #  @param theShapeWhere Shape to find sub-shape of.
5286         #  @param theShapeWhat Shape, specifying what to find.
5287         #  @return List of all found sub-shapes indices. 
5288         #
5289         #  @ref swig_GetSame "Example"
5290         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5291             """
5292             Get sub-shape indices of theShapeWhere, which is
5293             equal to theShapeWhat.
5294
5295             Parameters:
5296                 theShapeWhere Shape to find sub-shape of.
5297                 theShapeWhat Shape, specifying what to find.
5298
5299             Returns:
5300                 List of all found sub-shapes indices.
5301             """
5302             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5303             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5304             return anObj
5305
5306
5307         # end of l4_obtain
5308         ## @}
5309
5310         ## @addtogroup l4_access
5311         ## @{
5312
5313         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5314         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5315         #  @param aShape Shape to get sub-shape of.
5316         #  @param ListOfID List of sub-shapes indices.
5317         #  @param theName Object name; when specified, this parameter is used
5318         #         for result publication in the study. Otherwise, if automatic
5319         #         publication is switched on, default value is used for result name.
5320         #
5321         #  @return Found sub-shape.
5322         #
5323         #  @ref swig_all_decompose "Example"
5324         def GetSubShape(self, aShape, ListOfID, theName=None):
5325             """
5326             Obtain a composite sub-shape of aShape, composed from sub-shapes
5327             of aShape, selected by their unique IDs inside aShape
5328
5329             Parameters:
5330                 aShape Shape to get sub-shape of.
5331                 ListOfID List of sub-shapes indices.
5332                 theName Object name; when specified, this parameter is used
5333                         for result publication in the study. Otherwise, if automatic
5334                         publication is switched on, default value is used for result name.
5335
5336             Returns:
5337                 Found sub-shape.
5338             """
5339             # Example: see GEOM_TestAll.py
5340             anObj = self.AddSubShape(aShape,ListOfID)
5341             self._autoPublish(anObj, theName, "subshape")
5342             return anObj
5343
5344         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5345         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5346         #  @param aShape Shape to get sub-shape of.
5347         #  @param aSubShape Sub-shapes of aShape.
5348         #  @return ID of found sub-shape.
5349         #
5350         #  @ref swig_all_decompose "Example"
5351         def GetSubShapeID(self, aShape, aSubShape):
5352             """
5353             Obtain unique ID of sub-shape aSubShape inside aShape
5354             of aShape, selected by their unique IDs inside aShape
5355
5356             Parameters:
5357                aShape Shape to get sub-shape of.
5358                aSubShape Sub-shapes of aShape.
5359
5360             Returns:
5361                ID of found sub-shape.
5362             """
5363             # Example: see GEOM_TestAll.py
5364             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5365             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5366             return anID
5367             
5368         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5369         #  This function is provided for performance purpose. The complexity is O(n) with n
5370         #  the number of subobjects of aShape
5371         #  @param aShape Shape to get sub-shape of.
5372         #  @param aSubShapes Sub-shapes of aShape.
5373         #  @return list of IDs of found sub-shapes.
5374         #
5375         #  @ref swig_all_decompose "Example"
5376         def GetSubShapesIDs(self, aShape, aSubShapes):
5377             """
5378             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5379             This function is provided for performance purpose. The complexity is O(n) with n
5380             the number of subobjects of aShape
5381
5382             Parameters:
5383                aShape Shape to get sub-shape of.
5384                aSubShapes Sub-shapes of aShape.
5385
5386             Returns:
5387                List of IDs of found sub-shape.
5388             """
5389             # Example: see GEOM_TestAll.py
5390             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5391             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5392             return anIDs
5393
5394         # end of l4_access
5395         ## @}
5396
5397         ## @addtogroup l4_decompose
5398         ## @{
5399
5400         ## Get all sub-shapes and groups of \a theShape,
5401         #  that were created already by any other methods.
5402         #  @param theShape Any shape.
5403         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5404         #                       returned, else all found sub-shapes and groups.
5405         #  @return List of existing sub-objects of \a theShape.
5406         #
5407         #  @ref swig_all_decompose "Example"
5408         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5409             """
5410             Get all sub-shapes and groups of theShape,
5411             that were created already by any other methods.
5412
5413             Parameters:
5414                 theShape Any shape.
5415                 theGroupsOnly If this parameter is TRUE, only groups will be
5416                                  returned, else all found sub-shapes and groups.
5417
5418             Returns:
5419                 List of existing sub-objects of theShape.
5420             """
5421             # Example: see GEOM_TestAll.py
5422             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5423             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5424             return ListObj
5425
5426         ## Get all groups of \a theShape,
5427         #  that were created already by any other methods.
5428         #  @param theShape Any shape.
5429         #  @return List of existing groups of \a theShape.
5430         #
5431         #  @ref swig_all_decompose "Example"
5432         def GetGroups(self, theShape):
5433             """
5434             Get all groups of theShape,
5435             that were created already by any other methods.
5436
5437             Parameters:
5438                 theShape Any shape.
5439
5440             Returns:
5441                 List of existing groups of theShape.
5442             """
5443             # Example: see GEOM_TestAll.py
5444             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5445             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5446             return ListObj
5447
5448         ## Explode a shape on sub-shapes of a given type.
5449         #  If the shape itself matches the type, it is also returned.
5450         #  @param aShape Shape to be exploded.
5451         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
5452         #  @param theName Object name; when specified, this parameter is used
5453         #         for result publication in the study. Otherwise, if automatic
5454         #         publication is switched on, default value is used for result name.
5455         #
5456         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5457         #
5458         #  @ref swig_all_decompose "Example"
5459         def SubShapeAll(self, aShape, aType, theName=None):
5460             """
5461             Explode a shape on sub-shapes of a given type.
5462             If the shape itself matches the type, it is also returned.
5463
5464             Parameters:
5465                 aShape Shape to be exploded.
5466                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
5467                 theName Object name; when specified, this parameter is used
5468                         for result publication in the study. Otherwise, if automatic
5469                         publication is switched on, default value is used for result name.
5470
5471             Returns:
5472                 List of sub-shapes of type theShapeType, contained in theShape.
5473             """
5474             # Example: see GEOM_TestAll.py
5475             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5476             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5477             self._autoPublish(ListObj, theName, "subshape")
5478             return ListObj
5479
5480         ## Explode a shape on sub-shapes of a given type.
5481         #  @param aShape Shape to be exploded.
5482         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5483         #  @return List of IDs of sub-shapes.
5484         #
5485         #  @ref swig_all_decompose "Example"
5486         def SubShapeAllIDs(self, aShape, aType):
5487             """
5488             Explode a shape on sub-shapes of a given type.
5489
5490             Parameters:
5491                 aShape Shape to be exploded (see geompy.ShapeType)
5492                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5493
5494             Returns:
5495                 List of IDs of sub-shapes.
5496             """
5497             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5498             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5499             return ListObj
5500
5501         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5502         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
5503         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5504         #  @param aShape Shape to get sub-shape of.
5505         #  @param ListOfInd List of sub-shapes indices.
5506         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5507         #  @param theName Object name; when specified, this parameter is used
5508         #         for result publication in the study. Otherwise, if automatic
5509         #         publication is switched on, default value is used for result name.
5510         #
5511         #  @return A compound of sub-shapes of aShape.
5512         #
5513         #  @ref swig_all_decompose "Example"
5514         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5515             """
5516             Obtain a compound of sub-shapes of aShape,
5517             selected by their indices in list of all sub-shapes of type aType.
5518             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5519             
5520             Parameters:
5521                 aShape Shape to get sub-shape of.
5522                 ListOfID List of sub-shapes indices.
5523                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5524                 theName Object name; when specified, this parameter is used
5525                         for result publication in the study. Otherwise, if automatic
5526                         publication is switched on, default value is used for result name.
5527
5528             Returns:
5529                 A compound of sub-shapes of aShape.
5530             """
5531             # Example: see GEOM_TestAll.py
5532             ListOfIDs = []
5533             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5534             for ind in ListOfInd:
5535                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5536             # note: auto-publishing is done in self.GetSubShape()
5537             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5538             return anObj
5539
5540         ## Explode a shape on sub-shapes of a given type.
5541         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5542         #  If the shape itself matches the type, it is also returned.
5543         #  @param aShape Shape to be exploded.
5544         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5545         #  @param theName Object name; when specified, this parameter is used
5546         #         for result publication in the study. Otherwise, if automatic
5547         #         publication is switched on, default value is used for result name.
5548         #
5549         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5550         #
5551         #  @ref swig_SubShapeAllSorted "Example"
5552         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5553             """
5554             Explode a shape on sub-shapes of a given type.
5555             Sub-shapes will be sorted by coordinates of their gravity centers.
5556             If the shape itself matches the type, it is also returned.
5557
5558             Parameters: 
5559                 aShape Shape to be exploded.
5560                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5561                 theName Object name; when specified, this parameter is used
5562                         for result publication in the study. Otherwise, if automatic
5563                         publication is switched on, default value is used for result name.
5564
5565             Returns: 
5566                 List of sub-shapes of type theShapeType, contained in theShape.
5567             """
5568             # Example: see GEOM_TestAll.py
5569             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5570             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5571             self._autoPublish(ListObj, theName, "subshape")
5572             return ListObj
5573
5574         ## Explode a shape on sub-shapes of a given type.
5575         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5576         #  @param aShape Shape to be exploded.
5577         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5578         #  @return List of IDs of sub-shapes.
5579         #
5580         #  @ref swig_all_decompose "Example"
5581         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5582             """
5583             Explode a shape on sub-shapes of a given type.
5584             Sub-shapes will be sorted by coordinates of their gravity centers.
5585
5586             Parameters: 
5587                 aShape Shape to be exploded.
5588                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5589
5590             Returns: 
5591                 List of IDs of sub-shapes.
5592             """
5593             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5594             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5595             return ListIDs
5596
5597         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5598         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5599         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5600         #  @param aShape Shape to get sub-shape of.
5601         #  @param ListOfInd List of sub-shapes indices.
5602         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5603         #  @param theName Object name; when specified, this parameter is used
5604         #         for result publication in the study. Otherwise, if automatic
5605         #         publication is switched on, default value is used for result name.
5606         #
5607         #  @return A compound of sub-shapes of aShape.
5608         #
5609         #  @ref swig_all_decompose "Example"
5610         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5611             """
5612             Obtain a compound of sub-shapes of aShape,
5613             selected by they indices in sorted list of all sub-shapes of type aType.
5614             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5615
5616             Parameters:
5617                 aShape Shape to get sub-shape of.
5618                 ListOfID List of sub-shapes indices.
5619                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5620                 theName Object name; when specified, this parameter is used
5621                         for result publication in the study. Otherwise, if automatic
5622                         publication is switched on, default value is used for result name.
5623
5624             Returns:
5625                 A compound of sub-shapes of aShape.
5626             """
5627             # Example: see GEOM_TestAll.py
5628             ListOfIDs = []
5629             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5630             for ind in ListOfInd:
5631                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5632             # note: auto-publishing is done in self.GetSubShape()
5633             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5634             return anObj
5635
5636         ## Extract shapes (excluding the main shape) of given type.
5637         #  @param aShape The shape.
5638         #  @param aType  The shape type (see ShapeType())
5639         #  @param isSorted Boolean flag to switch sorting on/off.
5640         #  @param theName Object name; when specified, this parameter is used
5641         #         for result publication in the study. Otherwise, if automatic
5642         #         publication is switched on, default value is used for result name.
5643         #
5644         #  @return List of sub-shapes of type aType, contained in aShape.
5645         #
5646         #  @ref swig_FilletChamfer "Example"
5647         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
5648             """
5649             Extract shapes (excluding the main shape) of given type.
5650
5651             Parameters:
5652                 aShape The shape.
5653                 aType  The shape type (see geompy.ShapeType)
5654                 isSorted Boolean flag to switch sorting on/off.
5655                 theName Object name; when specified, this parameter is used
5656                         for result publication in the study. Otherwise, if automatic
5657                         publication is switched on, default value is used for result name.
5658
5659             Returns:     
5660                 List of sub-shapes of type aType, contained in aShape.
5661             """
5662             # Example: see GEOM_TestAll.py
5663             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
5664             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
5665             self._autoPublish(ListObj, theName, "subshape")
5666             return ListObj
5667
5668         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
5669         #  @param aShape Main shape.
5670         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
5671         #  @param theName Object name; when specified, this parameter is used
5672         #         for result publication in the study. Otherwise, if automatic
5673         #         publication is switched on, default value is used for result name.
5674         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5675         #
5676         #  @ref swig_all_decompose "Example"
5677         def SubShapes(self, aShape, anIDs, theName=None):
5678             """
5679             Get a set of sub-shapes defined by their unique IDs inside theMainShape
5680
5681             Parameters:
5682                 aShape Main shape.
5683                 anIDs List of unique IDs of sub-shapes inside theMainShape.
5684                 theName Object name; when specified, this parameter is used
5685                         for result publication in the study. Otherwise, if automatic
5686                         publication is switched on, default value is used for result name.
5687
5688             Returns:      
5689                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5690             """
5691             # Example: see GEOM_TestAll.py
5692             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
5693             RaiseIfFailed("SubShapes", self.ShapesOp)
5694             self._autoPublish(ListObj, theName, "subshape")
5695             return ListObj
5696
5697         # end of l4_decompose
5698         ## @}
5699
5700         ## @addtogroup l4_decompose_d
5701         ## @{
5702
5703         ## Deprecated method
5704         #  It works like SubShapeAllSortedCentres(), but wrongly
5705         #  defines centres of faces, shells and solids.
5706         def SubShapeAllSorted(self, aShape, aType, theName=None):
5707             """
5708             Deprecated method
5709             It works like geompy.SubShapeAllSortedCentres, but wrongly
5710             defines centres of faces, shells and solids.
5711             """
5712             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
5713             RaiseIfFailed("MakeExplode", self.ShapesOp)
5714             self._autoPublish(ListObj, theName, "subshape")
5715             return ListObj
5716
5717         ## Deprecated method
5718         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
5719         #  defines centres of faces, shells and solids.
5720         def SubShapeAllSortedIDs(self, aShape, aType):
5721             """
5722             Deprecated method
5723             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
5724             defines centres of faces, shells and solids.
5725             """
5726             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
5727             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5728             return ListIDs
5729
5730         ## Deprecated method
5731         #  It works like SubShapeSortedCentres(), but has a bug
5732         #  (wrongly defines centres of faces, shells and solids).
5733         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
5734             """
5735             Deprecated method
5736             It works like geompy.SubShapeSortedCentres, but has a bug
5737             (wrongly defines centres of faces, shells and solids).
5738             """
5739             ListOfIDs = []
5740             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
5741             for ind in ListOfInd:
5742                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5743             # note: auto-publishing is done in self.GetSubShape()
5744             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5745             return anObj
5746
5747         # end of l4_decompose_d
5748         ## @}
5749
5750         ## @addtogroup l3_healing
5751         ## @{
5752
5753         ## Apply a sequence of Shape Healing operators to the given object.
5754         #  @param theShape Shape to be processed.
5755         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5756         #  @param theParameters List of names of parameters
5757         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5758         #  @param theValues List of values of parameters, in the same order
5759         #                    as parameters are listed in <VAR>theParameters</VAR> list.
5760         #  @param theName Object name; when specified, this parameter is used
5761         #         for result publication in the study. Otherwise, if automatic
5762         #         publication is switched on, default value is used for result name.
5763         #
5764         #  <b> Operators and Parameters: </b> \n
5765         #
5766         #  * \b FixShape - corrects invalid shapes. \n
5767         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
5768         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
5769         #
5770         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
5771         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
5772         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
5773         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
5774         #
5775         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
5776         #    surfaces in segments using a certain angle. \n
5777         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5778         #    if Angle=180, four if Angle=90, etc). \n
5779         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
5780         #
5781         #  * \b SplitClosedFaces - splits closed faces in segments.
5782         #    The number of segments depends on the number of splitting points.\n
5783         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
5784         #
5785         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
5786         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
5787         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
5788         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
5789         #   This and the previous parameters can take the following values:\n
5790         #   \b Parametric \b Continuity \n
5791         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
5792         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
5793         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
5794         #    ruling out sharp edges).\n
5795         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
5796         #       are of the same magnitude).\n
5797         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
5798         #    or surfaces (d/du C(u)) are the same at junction. \n
5799         #   \b Geometric \b Continuity \n
5800         #   \b G1: first derivatives are proportional at junction.\n
5801         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
5802         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
5803         #   \b G2: first and second derivatives are proportional at junction.
5804         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
5805         #    continuity requires that the underlying parameterization was continuous as well.
5806         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
5807         #
5808         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
5809         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
5810         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
5811         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
5812         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
5813         #       with the specified parameters.\n
5814         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
5815         #       with the specified parameters.\n
5816         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
5817         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
5818         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
5819         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
5820         #
5821         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
5822         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
5823         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
5824         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
5825         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
5826         #
5827         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
5828         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
5829         #
5830         #
5831         #  @return New GEOM.GEOM_Object, containing processed shape.
5832         #
5833         #  \n @ref tui_shape_processing "Example"
5834         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
5835             """
5836             Apply a sequence of Shape Healing operators to the given object.
5837
5838             Parameters:
5839                 theShape Shape to be processed.
5840                 theValues List of values of parameters, in the same order
5841                           as parameters are listed in theParameters list.
5842                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5843                 theParameters List of names of parameters
5844                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5845                 theName Object name; when specified, this parameter is used
5846                         for result publication in the study. Otherwise, if automatic
5847                         publication is switched on, default value is used for result name.
5848
5849                 Operators and Parameters:
5850
5851                  * FixShape - corrects invalid shapes.
5852                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
5853                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
5854                  * FixFaceSize - removes small faces, such as spots and strips.
5855                      * FixFaceSize.Tolerance - defines minimum possible face size.
5856                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
5857                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
5858                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
5859                                 in segments using a certain angle.
5860                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5861                                           if Angle=180, four if Angle=90, etc).
5862                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
5863                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
5864                                       splitting points.
5865                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
5866                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
5867                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
5868                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
5869                      * SplitContinuity.CurveContinuity - required continuity for curves.
5870                        This and the previous parameters can take the following values:
5871                        
5872                        Parametric Continuity:
5873                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
5874                                                    coincidental. The curves or surfaces may still meet at an angle,
5875                                                    giving rise to a sharp corner or edge).
5876                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
5877                                                    are parallel, ruling out sharp edges).
5878                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
5879                                                   or surfaces are of the same magnitude).
5880                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
5881                           curves or surfaces (d/du C(u)) are the same at junction.
5882                           
5883                        Geometric Continuity:
5884                        G1: first derivatives are proportional at junction.
5885                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
5886                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
5887                        G2: first and second derivatives are proportional at junction. As the names imply,
5888                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
5889                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
5890                            geometric continuity of order n, but not vice-versa.
5891                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
5892                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
5893                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
5894                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
5895                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
5896                                                         the specified parameters.
5897                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
5898                                                         the specified parameters.
5899                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
5900                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
5901                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
5902                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
5903                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
5904                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
5905                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
5906                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
5907                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
5908                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
5909                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
5910
5911             Returns:
5912                 New GEOM.GEOM_Object, containing processed shape.
5913
5914             Note: For more information look through SALOME Geometry User's Guide->
5915                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
5916             """
5917             # Example: see GEOM_TestHealing.py
5918             theValues,Parameters = ParseList(theValues)
5919             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
5920             # To avoid script failure in case of good argument shape
5921             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
5922                 return theShape
5923             RaiseIfFailed("ProcessShape", self.HealOp)
5924             for string in (theOperators + theParameters):
5925                 Parameters = ":" + Parameters
5926                 pass
5927             anObj.SetParameters(Parameters)
5928             self._autoPublish(anObj, theName, "healed")
5929             return anObj
5930
5931         ## Remove faces from the given object (shape).
5932         #  @param theObject Shape to be processed.
5933         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
5934         #                  removes ALL faces of the given object.
5935         #  @param theName Object name; when specified, this parameter is used
5936         #         for result publication in the study. Otherwise, if automatic
5937         #         publication is switched on, default value is used for result name.
5938         #
5939         #  @return New GEOM.GEOM_Object, containing processed shape.
5940         #
5941         #  @ref tui_suppress_faces "Example"
5942         def SuppressFaces(self, theObject, theFaces, theName=None):
5943             """
5944             Remove faces from the given object (shape).
5945
5946             Parameters:
5947                 theObject Shape to be processed.
5948                 theFaces Indices of faces to be removed, if EMPTY then the method
5949                          removes ALL faces of the given object.
5950                 theName Object name; when specified, this parameter is used
5951                         for result publication in the study. Otherwise, if automatic
5952                         publication is switched on, default value is used for result name.
5953
5954             Returns:
5955                 New GEOM.GEOM_Object, containing processed shape.
5956             """
5957             # Example: see GEOM_TestHealing.py
5958             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
5959             RaiseIfFailed("SuppressFaces", self.HealOp)
5960             self._autoPublish(anObj, theName, "suppressFaces")
5961             return anObj
5962
5963         ## Sewing of some shapes into single shape.
5964         #  @param ListShape Shapes to be processed.
5965         #  @param theTolerance Required tolerance value.
5966         #  @param AllowNonManifold Flag that allows non-manifold sewing.
5967         #  @param theName Object name; when specified, this parameter is used
5968         #         for result publication in the study. Otherwise, if automatic
5969         #         publication is switched on, default value is used for result name.
5970         #
5971         #  @return New GEOM.GEOM_Object, containing processed shape.
5972         #
5973         #  @ref tui_sewing "Example"
5974         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
5975             """
5976             Sewing of some shapes into single shape.
5977
5978             Parameters:
5979                 ListShape Shapes to be processed.
5980                 theTolerance Required tolerance value.
5981                 AllowNonManifold Flag that allows non-manifold sewing.
5982                 theName Object name; when specified, this parameter is used
5983                         for result publication in the study. Otherwise, if automatic
5984                         publication is switched on, default value is used for result name.
5985
5986             Returns:
5987                 New GEOM.GEOM_Object, containing processed shape.
5988             """
5989             # Example: see GEOM_TestHealing.py
5990             comp = self.MakeCompound(ListShape)
5991             # note: auto-publishing is done in self.Sew()
5992             anObj = self.Sew(comp, theTolerance, AllowNonManifold, theName)
5993             return anObj
5994
5995         ## Sewing of the given object.
5996         #  @param theObject Shape to be processed.
5997         #  @param theTolerance Required tolerance value.
5998         #  @param AllowNonManifold Flag that allows non-manifold sewing.
5999         #  @param theName Object name; when specified, this parameter is used
6000         #         for result publication in the study. Otherwise, if automatic
6001         #         publication is switched on, default value is used for result name.
6002         #
6003         #  @return New GEOM.GEOM_Object, containing processed shape.
6004         def Sew(self, theObject, theTolerance, AllowNonManifold=False, theName=None):
6005             """
6006             Sewing of the given object.
6007
6008             Parameters:
6009                 theObject Shape to be processed.
6010                 theTolerance Required tolerance value.
6011                 AllowNonManifold Flag that allows non-manifold sewing.
6012                 theName Object name; when specified, this parameter is used
6013                         for result publication in the study. Otherwise, if automatic
6014                         publication is switched on, default value is used for result name.
6015
6016             Returns:
6017                 New GEOM.GEOM_Object, containing processed shape.
6018             """
6019             # Example: see MakeSewing() above
6020             theTolerance,Parameters = ParseParameters(theTolerance)
6021             if AllowNonManifold:
6022                 anObj = self.HealOp.SewAllowNonManifold(theObject, theTolerance)
6023             else:
6024                 anObj = self.HealOp.Sew(theObject, theTolerance)
6025             # To avoid script failure in case of good argument shape
6026             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6027                 return theObject
6028             RaiseIfFailed("Sew", self.HealOp)
6029             anObj.SetParameters(Parameters)
6030             self._autoPublish(anObj, theName, "sewed")
6031             return anObj
6032
6033         ## Rebuild the topology of theCompound of solids by removing
6034         #  of the faces that are shared by several solids.
6035         #  @param theCompound Shape to be processed.
6036         #  @param theName Object name; when specified, this parameter is used
6037         #         for result publication in the study. Otherwise, if automatic
6038         #         publication is switched on, default value is used for result name.
6039         #
6040         #  @return New GEOM.GEOM_Object, containing processed shape.
6041         #
6042         #  @ref tui_remove_webs "Example"
6043         def RemoveInternalFaces (self, theCompound, theName=None):
6044             """
6045             Rebuild the topology of theCompound of solids by removing
6046             of the faces that are shared by several solids.
6047
6048             Parameters:
6049                 theCompound Shape to be processed.
6050                 theName Object name; when specified, this parameter is used
6051                         for result publication in the study. Otherwise, if automatic
6052                         publication is switched on, default value is used for result name.
6053
6054             Returns:
6055                 New GEOM.GEOM_Object, containing processed shape.
6056             """
6057             # Example: see GEOM_TestHealing.py
6058             anObj = self.HealOp.RemoveInternalFaces(theCompound)
6059             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6060             self._autoPublish(anObj, theName, "removeWebs")
6061             return anObj
6062
6063         ## Remove internal wires and edges from the given object (face).
6064         #  @param theObject Shape to be processed.
6065         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6066         #                  removes ALL internal wires of the given object.
6067         #  @param theName Object name; when specified, this parameter is used
6068         #         for result publication in the study. Otherwise, if automatic
6069         #         publication is switched on, default value is used for result name.
6070         #
6071         #  @return New GEOM.GEOM_Object, containing processed shape.
6072         #
6073         #  @ref tui_suppress_internal_wires "Example"
6074         def SuppressInternalWires(self, theObject, theWires, theName=None):
6075             """
6076             Remove internal wires and edges from the given object (face).
6077
6078             Parameters:
6079                 theObject Shape to be processed.
6080                 theWires Indices of wires to be removed, if EMPTY then the method
6081                          removes ALL internal wires of the given object.
6082                 theName Object name; when specified, this parameter is used
6083                         for result publication in the study. Otherwise, if automatic
6084                         publication is switched on, default value is used for result name.
6085
6086             Returns:                
6087                 New GEOM.GEOM_Object, containing processed shape.
6088             """
6089             # Example: see GEOM_TestHealing.py
6090             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6091             RaiseIfFailed("RemoveIntWires", self.HealOp)
6092             self._autoPublish(anObj, theName, "suppressWires")
6093             return anObj
6094
6095         ## Remove internal closed contours (holes) from the given object.
6096         #  @param theObject Shape to be processed.
6097         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6098         #                  removes ALL internal holes of the given object
6099         #  @param theName Object name; when specified, this parameter is used
6100         #         for result publication in the study. Otherwise, if automatic
6101         #         publication is switched on, default value is used for result name.
6102         #
6103         #  @return New GEOM.GEOM_Object, containing processed shape.
6104         #
6105         #  @ref tui_suppress_holes "Example"
6106         def SuppressHoles(self, theObject, theWires, theName=None):
6107             """
6108             Remove internal closed contours (holes) from the given object.
6109
6110             Parameters:
6111                 theObject Shape to be processed.
6112                 theWires Indices of wires to be removed, if EMPTY then the method
6113                          removes ALL internal holes of the given object
6114                 theName Object name; when specified, this parameter is used
6115                         for result publication in the study. Otherwise, if automatic
6116                         publication is switched on, default value is used for result name.
6117
6118             Returns:    
6119                 New GEOM.GEOM_Object, containing processed shape.
6120             """
6121             # Example: see GEOM_TestHealing.py
6122             anObj = self.HealOp.FillHoles(theObject, theWires)
6123             RaiseIfFailed("FillHoles", self.HealOp)
6124             self._autoPublish(anObj, theName, "suppressHoles")
6125             return anObj
6126
6127         ## Close an open wire.
6128         #  @param theObject Shape to be processed.
6129         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6130         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6131         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6132         #                        If False : closure by creation of an edge between ends.
6133         #  @param theName Object name; when specified, this parameter is used
6134         #         for result publication in the study. Otherwise, if automatic
6135         #         publication is switched on, default value is used for result name.
6136         #
6137         #  @return New GEOM.GEOM_Object, containing processed shape.
6138         #
6139         #  @ref tui_close_contour "Example"
6140         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6141             """
6142             Close an open wire.
6143
6144             Parameters: 
6145                 theObject Shape to be processed.
6146                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6147                          if [ ], then theObject itself is a wire.
6148                 isCommonVertex If True  : closure by creation of a common vertex,
6149                                If False : closure by creation of an edge between ends.
6150                 theName Object name; when specified, this parameter is used
6151                         for result publication in the study. Otherwise, if automatic
6152                         publication is switched on, default value is used for result name.
6153
6154             Returns:                      
6155                 New GEOM.GEOM_Object, containing processed shape. 
6156             """
6157             # Example: see GEOM_TestHealing.py
6158             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6159             RaiseIfFailed("CloseContour", self.HealOp)
6160             self._autoPublish(anObj, theName, "closeContour")
6161             return anObj
6162
6163         ## Addition of a point to a given edge object.
6164         #  @param theObject Shape to be processed.
6165         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6166         #                      if -1, then theObject itself is the edge.
6167         #  @param theValue Value of parameter on edge or length parameter,
6168         #                  depending on \a isByParameter.
6169         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6170         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6171         #  @param theName Object name; when specified, this parameter is used
6172         #         for result publication in the study. Otherwise, if automatic
6173         #         publication is switched on, default value is used for result name.
6174         #
6175         #  @return New GEOM.GEOM_Object, containing processed shape.
6176         #
6177         #  @ref tui_add_point_on_edge "Example"
6178         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6179             """
6180             Addition of a point to a given edge object.
6181
6182             Parameters: 
6183                 theObject Shape to be processed.
6184                 theEdgeIndex Index of edge to be divided within theObject's shape,
6185                              if -1, then theObject itself is the edge.
6186                 theValue Value of parameter on edge or length parameter,
6187                          depending on isByParameter.
6188                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6189                               if FALSE : theValue is treated as a length parameter [0..1]
6190                 theName Object name; when specified, this parameter is used
6191                         for result publication in the study. Otherwise, if automatic
6192                         publication is switched on, default value is used for result name.
6193
6194             Returns:  
6195                 New GEOM.GEOM_Object, containing processed shape.
6196             """
6197             # Example: see GEOM_TestHealing.py
6198             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6199             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6200             RaiseIfFailed("DivideEdge", self.HealOp)
6201             anObj.SetParameters(Parameters)
6202             self._autoPublish(anObj, theName, "divideEdge")
6203             return anObj
6204
6205         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6206         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6207         #  @param theVertices A list of vertices to suppress. If the list
6208         #                     is empty, all vertices in a wire will be assumed.
6209         #  @param theName Object name; when specified, this parameter is used
6210         #         for result publication in the study. Otherwise, if automatic
6211         #         publication is switched on, default value is used for result name.
6212         #
6213         #  @return New GEOM.GEOM_Object with modified wire.
6214         #
6215         #  @ref tui_fuse_collinear_edges "Example"
6216         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6217             """
6218             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6219
6220             Parameters: 
6221                 theWire Wire to minimize the number of C1 continuous edges in.
6222                 theVertices A list of vertices to suppress. If the list
6223                             is empty, all vertices in a wire will be assumed.
6224                 theName Object name; when specified, this parameter is used
6225                         for result publication in the study. Otherwise, if automatic
6226                         publication is switched on, default value is used for result name.
6227
6228             Returns:  
6229                 New GEOM.GEOM_Object with modified wire.
6230             """
6231             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6232             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6233             self._autoPublish(anObj, theName, "fuseEdges")
6234             return anObj
6235
6236         ## Change orientation of the given object. Updates given shape.
6237         #  @param theObject Shape to be processed.
6238         #  @return Updated <var>theObject</var>
6239         #
6240         #  @ref swig_todo "Example"
6241         def ChangeOrientationShell(self,theObject):
6242             """
6243             Change orientation of the given object. Updates given shape.
6244
6245             Parameters: 
6246                 theObject Shape to be processed.
6247
6248             Returns:  
6249                 Updated theObject
6250             """
6251             theObject = self.HealOp.ChangeOrientation(theObject)
6252             RaiseIfFailed("ChangeOrientation", self.HealOp)
6253             pass
6254
6255         ## Change orientation of the given object.
6256         #  @param theObject Shape to be processed.
6257         #  @param theName Object name; when specified, this parameter is used
6258         #         for result publication in the study. Otherwise, if automatic
6259         #         publication is switched on, default value is used for result name.
6260         #
6261         #  @return New GEOM.GEOM_Object, containing processed shape.
6262         #
6263         #  @ref swig_todo "Example"
6264         def ChangeOrientationShellCopy(self, theObject, theName=None):
6265             """
6266             Change orientation of the given object.
6267
6268             Parameters:
6269                 theObject Shape to be processed.
6270                 theName Object name; when specified, this parameter is used
6271                         for result publication in the study. Otherwise, if automatic
6272                         publication is switched on, default value is used for result name.
6273
6274             Returns:   
6275                 New GEOM.GEOM_Object, containing processed shape.
6276             """
6277             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6278             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6279             self._autoPublish(anObj, theName, "reversed")
6280             return anObj
6281
6282         ## Try to limit tolerance of the given object by value \a theTolerance.
6283         #  @param theObject Shape to be processed.
6284         #  @param theTolerance Required tolerance value.
6285         #  @param theName Object name; when specified, this parameter is used
6286         #         for result publication in the study. Otherwise, if automatic
6287         #         publication is switched on, default value is used for result name.
6288         #
6289         #  @return New GEOM.GEOM_Object, containing processed shape.
6290         #
6291         #  @ref tui_limit_tolerance "Example"
6292         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6293             """
6294             Try to limit tolerance of the given object by value theTolerance.
6295
6296             Parameters:
6297                 theObject Shape to be processed.
6298                 theTolerance Required tolerance value.
6299                 theName Object name; when specified, this parameter is used
6300                         for result publication in the study. Otherwise, if automatic
6301                         publication is switched on, default value is used for result name.
6302
6303             Returns:   
6304                 New GEOM.GEOM_Object, containing processed shape.
6305             """
6306             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6307             RaiseIfFailed("LimitTolerance", self.HealOp)
6308             self._autoPublish(anObj, theName, "limitTolerance")
6309             return anObj
6310
6311         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6312         #  that constitute a free boundary of the given shape.
6313         #  @param theObject Shape to get free boundary of.
6314         #  @param theName Object name; when specified, this parameter is used
6315         #         for result publication in the study. Otherwise, if automatic
6316         #         publication is switched on, default value is used for result name.
6317         #
6318         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6319         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6320         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6321         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6322         #
6323         #  @ref tui_measurement_tools_page "Example"
6324         def GetFreeBoundary(self, theObject, theName=None):
6325             """
6326             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6327             that constitute a free boundary of the given shape.
6328
6329             Parameters:
6330                 theObject Shape to get free boundary of.
6331                 theName Object name; when specified, this parameter is used
6332                         for result publication in the study. Otherwise, if automatic
6333                         publication is switched on, default value is used for result name.
6334
6335             Returns: 
6336                 [status, theClosedWires, theOpenWires]
6337                  status: FALSE, if an error(s) occured during the method execution.
6338                  theClosedWires: Closed wires on the free boundary of the given shape.
6339                  theOpenWires: Open wires on the free boundary of the given shape.
6340             """
6341             # Example: see GEOM_TestHealing.py
6342             anObj = self.HealOp.GetFreeBoundary(theObject)
6343             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6344             self._autoPublish(anObj[1], theName, "closedWire")
6345             self._autoPublish(anObj[2], theName, "openWire")
6346             return anObj
6347
6348         ## Replace coincident faces in theShape by one face.
6349         #  @param theShape Initial shape.
6350         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6351         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6352         #                         otherwise all initial shapes.
6353         #  @param 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         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6358         #
6359         #  @ref tui_glue_faces "Example"
6360         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6361             """
6362             Replace coincident faces in theShape by one face.
6363
6364             Parameters:
6365                 theShape Initial shape.
6366                 theTolerance Maximum distance between faces, which can be considered as coincident.
6367                 doKeepNonSolids If FALSE, only solids will present in the result,
6368                                 otherwise all initial shapes.
6369                 theName Object name; when specified, this parameter is used
6370                         for result publication in the study. Otherwise, if automatic
6371                         publication is switched on, default value is used for result name.
6372
6373             Returns:
6374                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6375             """
6376             # Example: see GEOM_Spanner.py
6377             theTolerance,Parameters = ParseParameters(theTolerance)
6378             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6379             if anObj is None:
6380                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6381             anObj.SetParameters(Parameters)
6382             self._autoPublish(anObj, theName, "glueFaces")
6383             return anObj
6384
6385         ## Find coincident faces in theShape for possible gluing.
6386         #  @param theShape Initial shape.
6387         #  @param theTolerance Maximum distance between faces,
6388         #                      which can be considered as coincident.
6389         #  @param theName Object name; when specified, this parameter is used
6390         #         for result publication in the study. Otherwise, if automatic
6391         #         publication is switched on, default value is used for result name.
6392         #
6393         #  @return GEOM.ListOfGO
6394         #
6395         #  @ref tui_glue_faces "Example"
6396         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6397             """
6398             Find coincident faces in theShape for possible gluing.
6399
6400             Parameters:
6401                 theShape Initial shape.
6402                 theTolerance Maximum distance between faces,
6403                              which can be considered as coincident.
6404                 theName Object name; when specified, this parameter is used
6405                         for result publication in the study. Otherwise, if automatic
6406                         publication is switched on, default value is used for result name.
6407
6408             Returns:                    
6409                 GEOM.ListOfGO
6410             """
6411             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6412             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6413             self._autoPublish(anObj, theName, "facesToGlue")
6414             return anObj
6415
6416         ## Replace coincident faces in theShape by one face
6417         #  in compliance with given list of faces
6418         #  @param theShape Initial shape.
6419         #  @param theTolerance Maximum distance between faces,
6420         #                      which can be considered as coincident.
6421         #  @param theFaces List of faces for gluing.
6422         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6423         #                         otherwise all initial shapes.
6424         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6425         #                        will be glued, otherwise only the edges,
6426         #                        belonging to <VAR>theFaces</VAR>.
6427         #  @param theName Object name; when specified, this parameter is used
6428         #         for result publication in the study. Otherwise, if automatic
6429         #         publication is switched on, default value is used for result name.
6430         #
6431         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6432         #          without some faces.
6433         #
6434         #  @ref tui_glue_faces "Example"
6435         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6436                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6437             """
6438             Replace coincident faces in theShape by one face
6439             in compliance with given list of faces
6440
6441             Parameters:
6442                 theShape Initial shape.
6443                 theTolerance Maximum distance between faces,
6444                              which can be considered as coincident.
6445                 theFaces List of faces for gluing.
6446                 doKeepNonSolids If FALSE, only solids will present in the result,
6447                                 otherwise all initial shapes.
6448                 doGlueAllEdges If TRUE, all coincident edges of theShape
6449                                will be glued, otherwise only the edges,
6450                                belonging to theFaces.
6451                 theName Object name; when specified, this parameter is used
6452                         for result publication in the study. Otherwise, if automatic
6453                         publication is switched on, default value is used for result name.
6454
6455             Returns:
6456                 New GEOM.GEOM_Object, containing a copy of theShape
6457                     without some faces.
6458             """
6459             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6460                                                       doKeepNonSolids, doGlueAllEdges)
6461             if anObj is None:
6462                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6463             self._autoPublish(anObj, theName, "glueFaces")
6464             return anObj
6465
6466         ## Replace coincident edges in theShape by one edge.
6467         #  @param theShape Initial shape.
6468         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6469         #  @param theName Object name; when specified, this parameter is used
6470         #         for result publication in the study. Otherwise, if automatic
6471         #         publication is switched on, default value is used for result name.
6472         #
6473         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6474         #
6475         #  @ref tui_glue_edges "Example"
6476         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6477             """
6478             Replace coincident edges in theShape by one edge.
6479
6480             Parameters:
6481                 theShape Initial shape.
6482                 theTolerance Maximum distance between edges, which can be considered as coincident.
6483                 theName Object name; when specified, this parameter is used
6484                         for result publication in the study. Otherwise, if automatic
6485                         publication is switched on, default value is used for result name.
6486
6487             Returns:    
6488                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6489             """
6490             theTolerance,Parameters = ParseParameters(theTolerance)
6491             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6492             if anObj is None:
6493                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6494             anObj.SetParameters(Parameters)
6495             self._autoPublish(anObj, theName, "glueEdges")
6496             return anObj
6497
6498         ## Find coincident edges in theShape for possible gluing.
6499         #  @param theShape Initial shape.
6500         #  @param theTolerance Maximum distance between edges,
6501         #                      which can be considered as coincident.
6502         #  @param theName Object name; when specified, this parameter is used
6503         #         for result publication in the study. Otherwise, if automatic
6504         #         publication is switched on, default value is used for result name.
6505         #
6506         #  @return GEOM.ListOfGO
6507         #
6508         #  @ref tui_glue_edges "Example"
6509         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6510             """
6511             Find coincident edges in theShape for possible gluing.
6512
6513             Parameters:
6514                 theShape Initial shape.
6515                 theTolerance Maximum distance between edges,
6516                              which can be considered as coincident.
6517                 theName Object name; when specified, this parameter is used
6518                         for result publication in the study. Otherwise, if automatic
6519                         publication is switched on, default value is used for result name.
6520
6521             Returns:                         
6522                 GEOM.ListOfGO
6523             """
6524             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6525             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6526             self._autoPublish(anObj, theName, "edgesToGlue")
6527             return anObj
6528
6529         ## Replace coincident edges in theShape by one edge
6530         #  in compliance with given list of edges.
6531         #  @param theShape Initial shape.
6532         #  @param theTolerance Maximum distance between edges,
6533         #                      which can be considered as coincident.
6534         #  @param theEdges List of edges for gluing.
6535         #  @param theName Object name; when specified, this parameter is used
6536         #         for result publication in the study. Otherwise, if automatic
6537         #         publication is switched on, default value is used for result name.
6538         #
6539         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6540         #          without some edges.
6541         #
6542         #  @ref tui_glue_edges "Example"
6543         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6544             """
6545             Replace coincident edges in theShape by one edge
6546             in compliance with given list of edges.
6547
6548             Parameters:
6549                 theShape Initial shape.
6550                 theTolerance Maximum distance between edges,
6551                              which can be considered as coincident.
6552                 theEdges List of edges for gluing.
6553                 theName Object name; when specified, this parameter is used
6554                         for result publication in the study. Otherwise, if automatic
6555                         publication is switched on, default value is used for result name.
6556
6557             Returns:  
6558                 New GEOM.GEOM_Object, containing a copy of theShape
6559                 without some edges.
6560             """
6561             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6562             if anObj is None:
6563                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6564             self._autoPublish(anObj, theName, "glueEdges")
6565             return anObj
6566
6567         # end of l3_healing
6568         ## @}
6569
6570         ## @addtogroup l3_boolean Boolean Operations
6571         ## @{
6572
6573         # -----------------------------------------------------------------------------
6574         # Boolean (Common, Cut, Fuse, Section)
6575         # -----------------------------------------------------------------------------
6576
6577         ## Perform one of boolean operations on two given shapes.
6578         #  @param theShape1 First argument for boolean operation.
6579         #  @param theShape2 Second argument for boolean operation.
6580         #  @param theOperation Indicates the operation to be done:\n
6581         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6582         #  @param theName Object name; when specified, this parameter is used
6583         #         for result publication in the study. Otherwise, if automatic
6584         #         publication is switched on, default value is used for result name.
6585         #
6586         #  @return New GEOM.GEOM_Object, containing the result shape.
6587         #
6588         #  @ref tui_fuse "Example"
6589         def MakeBoolean(self, theShape1, theShape2, theOperation, theName=None):
6590             """
6591             Perform one of boolean operations on two given shapes.
6592
6593             Parameters: 
6594                 theShape1 First argument for boolean operation.
6595                 theShape2 Second argument for boolean operation.
6596                 theOperation Indicates the operation to be done:
6597                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6598                 theName Object name; when specified, this parameter is used
6599                         for result publication in the study. Otherwise, if automatic
6600                         publication is switched on, default value is used for result name.
6601
6602             Returns:   
6603                 New GEOM.GEOM_Object, containing the result shape.
6604             """
6605             # Example: see GEOM_TestAll.py
6606             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation)
6607             RaiseIfFailed("MakeBoolean", self.BoolOp)
6608             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
6609             self._autoPublish(anObj, theName, def_names[theOperation])
6610             return anObj
6611
6612         ## Perform Common boolean operation on two given shapes.
6613         #  @param theShape1 First argument for boolean operation.
6614         #  @param theShape2 Second argument for boolean operation.
6615         #  @param theName Object name; when specified, this parameter is used
6616         #         for result publication in the study. Otherwise, if automatic
6617         #         publication is switched on, default value is used for result name.
6618         #
6619         #  @return New GEOM.GEOM_Object, containing the result shape.
6620         #
6621         #  @ref tui_common "Example 1"
6622         #  \n @ref swig_MakeCommon "Example 2"
6623         def MakeCommon(self, theShape1, theShape2, theName=None):
6624             """
6625             Perform Common boolean operation on two given shapes.
6626
6627             Parameters: 
6628                 theShape1 First argument for boolean operation.
6629                 theShape2 Second argument for boolean operation.
6630                 theName Object name; when specified, this parameter is used
6631                         for result publication in the study. Otherwise, if automatic
6632                         publication is switched on, default value is used for result name.
6633
6634             Returns:   
6635                 New GEOM.GEOM_Object, containing the result shape.
6636             """
6637             # Example: see GEOM_TestOthers.py
6638             # note: auto-publishing is done in self.MakeBoolean()
6639             return self.MakeBoolean(theShape1, theShape2, 1, theName)
6640
6641         ## Perform Cut boolean operation on two given shapes.
6642         #  @param theShape1 First argument for boolean operation.
6643         #  @param theShape2 Second argument for boolean 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_cut "Example 1"
6651         #  \n @ref swig_MakeCommon "Example 2"
6652         def MakeCut(self, theShape1, theShape2, theName=None):
6653             """
6654             Perform Cut boolean operation on two given shapes.
6655
6656             Parameters: 
6657                 theShape1 First argument for boolean operation.
6658                 theShape2 Second argument for boolean operation.
6659                 theName Object name; when specified, this parameter is used
6660                         for result publication in the study. Otherwise, if automatic
6661                         publication is switched on, default value is used for result name.
6662
6663             Returns:   
6664                 New GEOM.GEOM_Object, containing the result shape.
6665             
6666             """
6667             # Example: see GEOM_TestOthers.py
6668             # note: auto-publishing is done in self.MakeBoolean()
6669             return self.MakeBoolean(theShape1, theShape2, 2, theName)
6670
6671         ## Perform Fuse boolean operation on two given shapes.
6672         #  @param theShape1 First argument for boolean operation.
6673         #  @param theShape2 Second argument for boolean operation.
6674         #  @param theName Object name; when specified, this parameter is used
6675         #         for result publication in the study. Otherwise, if automatic
6676         #         publication is switched on, default value is used for result name.
6677         #
6678         #  @return New GEOM.GEOM_Object, containing the result shape.
6679         #
6680         #  @ref tui_fuse "Example 1"
6681         #  \n @ref swig_MakeCommon "Example 2"
6682         def MakeFuse(self, theShape1, theShape2, theName=None):
6683             """
6684             Perform Fuse boolean operation on two given shapes.
6685
6686             Parameters: 
6687                 theShape1 First argument for boolean operation.
6688                 theShape2 Second argument for boolean operation.
6689                 theName Object name; when specified, this parameter is used
6690                         for result publication in the study. Otherwise, if automatic
6691                         publication is switched on, default value is used for result name.
6692
6693             Returns:   
6694                 New GEOM.GEOM_Object, containing the result shape.
6695             
6696             """
6697             # Example: see GEOM_TestOthers.py
6698             # note: auto-publishing is done in self.MakeBoolean()
6699             return self.MakeBoolean(theShape1, theShape2, 3, theName)
6700
6701         ## Perform Section boolean operation on two given shapes.
6702         #  @param theShape1 First argument for boolean operation.
6703         #  @param theShape2 Second argument for boolean operation.
6704         #  @param theName Object name; when specified, this parameter is used
6705         #         for result publication in the study. Otherwise, if automatic
6706         #         publication is switched on, default value is used for result name.
6707         #
6708         #  @return New GEOM.GEOM_Object, containing the result shape.
6709         #
6710         #  @ref tui_section "Example 1"
6711         #  \n @ref swig_MakeCommon "Example 2"
6712         def MakeSection(self, theShape1, theShape2, theName=None):
6713             """
6714             Perform Section boolean operation on two given shapes.
6715
6716             Parameters: 
6717                 theShape1 First argument for boolean operation.
6718                 theShape2 Second argument for boolean operation.
6719                 theName Object name; when specified, this parameter is used
6720                         for result publication in the study. Otherwise, if automatic
6721                         publication is switched on, default value is used for result name.
6722
6723             Returns:   
6724                 New GEOM.GEOM_Object, containing the result shape.
6725             
6726             """
6727             # Example: see GEOM_TestOthers.py
6728             # note: auto-publishing is done in self.MakeBoolean()
6729             return self.MakeBoolean(theShape1, theShape2, 4, theName)
6730
6731         ## Perform Fuse boolean operation on the list of shapes.
6732         #  @param theShapesList Shapes to be fused.
6733         #  @param theName Object name; when specified, this parameter is used
6734         #         for result publication in the study. Otherwise, if automatic
6735         #         publication is switched on, default value is used for result name.
6736         #
6737         #  @return New GEOM.GEOM_Object, containing the result shape.
6738         #
6739         #  @ref tui_fuse "Example 1"
6740         #  \n @ref swig_MakeCommon "Example 2"
6741         def MakeFuseList(self, theShapesList, theName=None):
6742             """
6743             Perform Fuse boolean operation on the list of shapes.
6744
6745             Parameters: 
6746                 theShapesList Shapes to be fused.
6747                 theName Object name; when specified, this parameter is used
6748                         for result publication in the study. Otherwise, if automatic
6749                         publication is switched on, default value is used for result name.
6750
6751             Returns:   
6752                 New GEOM.GEOM_Object, containing the result shape.
6753             
6754             """
6755             # Example: see GEOM_TestOthers.py
6756             anObj = self.BoolOp.MakeFuseList(theShapesList)
6757             RaiseIfFailed("MakeFuseList", self.BoolOp)
6758             self._autoPublish(anObj, theName, "fuse")
6759             return anObj
6760
6761         ## Perform Common boolean operation on the list of shapes.
6762         #  @param theShapesList Shapes for Common operation.
6763         #  @param theName Object name; when specified, this parameter is used
6764         #         for result publication in the study. Otherwise, if automatic
6765         #         publication is switched on, default value is used for result name.
6766         #
6767         #  @return New GEOM.GEOM_Object, containing the result shape.
6768         #
6769         #  @ref tui_common "Example 1"
6770         #  \n @ref swig_MakeCommon "Example 2"
6771         def MakeCommonList(self, theShapesList, theName=None):
6772             """
6773             Perform Common boolean operation on the list of shapes.
6774
6775             Parameters: 
6776                 theShapesList Shapes for Common operation.
6777                 theName Object name; when specified, this parameter is used
6778                         for result publication in the study. Otherwise, if automatic
6779                         publication is switched on, default value is used for result name.
6780
6781             Returns:   
6782                 New GEOM.GEOM_Object, containing the result shape.
6783             
6784             """
6785             # Example: see GEOM_TestOthers.py
6786             anObj = self.BoolOp.MakeCommonList(theShapesList)
6787             RaiseIfFailed("MakeCommonList", self.BoolOp)
6788             self._autoPublish(anObj, theName, "common")
6789             return anObj
6790
6791         ## Perform Cut boolean operation on one object and the list of tools.
6792         #  @param theMainShape The object of the operation.
6793         #  @param theShapesList The list of tools of the operation.
6794         #  @param theName Object name; when specified, this parameter is used
6795         #         for result publication in the study. Otherwise, if automatic
6796         #         publication is switched on, default value is used for result name.
6797         #
6798         #  @return New GEOM.GEOM_Object, containing the result shape.
6799         #
6800         #  @ref tui_cut "Example 1"
6801         #  \n @ref swig_MakeCommon "Example 2"
6802         def MakeCutList(self, theMainShape, theShapesList, theName=None):
6803             """
6804             Perform Cut boolean operation on one object and the list of tools.
6805
6806             Parameters: 
6807                 theMainShape The object of the operation.
6808                 theShapesList The list of tools of the operation.
6809                 theName Object name; when specified, this parameter is used
6810                         for result publication in the study. Otherwise, if automatic
6811                         publication is switched on, default value is used for result name.
6812
6813             Returns:   
6814                 New GEOM.GEOM_Object, containing the result shape.
6815             
6816             """
6817             # Example: see GEOM_TestOthers.py
6818             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList)
6819             RaiseIfFailed("MakeCutList", self.BoolOp)
6820             self._autoPublish(anObj, theName, "cut")
6821             return anObj
6822
6823         # end of l3_boolean
6824         ## @}
6825
6826         ## @addtogroup l3_basic_op
6827         ## @{
6828
6829         ## Perform partition operation.
6830         #  @param ListShapes Shapes to be intersected.
6831         #  @param ListTools Shapes to intersect theShapes.
6832         #  @param Limit Type of resulting shapes (see ShapeType()).\n
6833         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
6834         #         type will be detected automatically.
6835         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
6836         #                             target type (equal to Limit) are kept in the result,
6837         #                             else standalone shapes of lower dimension
6838         #                             are kept also (if they exist).
6839         #  @param theName Object name; when specified, this parameter is used
6840         #         for result publication in the study. Otherwise, if automatic
6841         #         publication is switched on, default value is used for result name.
6842         #
6843         #  @note Each compound from ListShapes and ListTools will be exploded
6844         #        in order to avoid possible intersection between shapes from this compound.
6845         #
6846         #  After implementation new version of PartitionAlgo (October 2006)
6847         #  other parameters are ignored by current functionality. They are kept
6848         #  in this function only for support old versions.
6849         #      @param ListKeepInside Shapes, outside which the results will be deleted.
6850         #         Each shape from theKeepInside must belong to theShapes also.
6851         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
6852         #         Each shape from theRemoveInside must belong to theShapes also.
6853         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
6854         #      @param ListMaterials Material indices for each shape. Make sence,
6855         #         only if theRemoveWebs is TRUE.
6856         #
6857         #  @return New GEOM.GEOM_Object, containing the result shapes.
6858         #
6859         #  @ref tui_partition "Example"
6860         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6861                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6862                           KeepNonlimitShapes=0, theName=None):
6863             """
6864             Perform partition operation.
6865
6866             Parameters: 
6867                 ListShapes Shapes to be intersected.
6868                 ListTools Shapes to intersect theShapes.
6869                 Limit Type of resulting shapes (see geompy.ShapeType)
6870                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
6871                       type will be detected automatically.
6872                 KeepNonlimitShapes if this parameter == 0, then only shapes of
6873                                     target type (equal to Limit) are kept in the result,
6874                                     else standalone shapes of lower dimension
6875                                     are kept also (if they exist).
6876                 theName Object name; when specified, this parameter is used
6877                         for result publication in the study. Otherwise, if automatic
6878                         publication is switched on, default value is used for result name.
6879             Note:
6880                     Each compound from ListShapes and ListTools will be exploded
6881                     in order to avoid possible intersection between shapes from
6882                     this compound.
6883                     
6884             After implementation new version of PartitionAlgo (October 2006) other
6885             parameters are ignored by current functionality. They are kept in this
6886             function only for support old versions.
6887             
6888             Ignored parameters:
6889                 ListKeepInside Shapes, outside which the results will be deleted.
6890                                Each shape from theKeepInside must belong to theShapes also.
6891                 ListRemoveInside Shapes, inside which the results will be deleted.
6892                                  Each shape from theRemoveInside must belong to theShapes also.
6893                 RemoveWebs If TRUE, perform Glue 3D algorithm.
6894                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
6895
6896             Returns:   
6897                 New GEOM.GEOM_Object, containing the result shapes.
6898             """
6899             # Example: see GEOM_TestAll.py
6900             if Limit == self.ShapeType["AUTO"]:
6901                 # automatic detection of the most appropriate shape limit type
6902                 lim = GEOM.SHAPE
6903                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6904                 Limit = EnumToLong(lim)
6905                 pass
6906             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
6907                                               ListKeepInside, ListRemoveInside,
6908                                               Limit, RemoveWebs, ListMaterials,
6909                                               KeepNonlimitShapes);
6910             RaiseIfFailed("MakePartition", self.BoolOp)
6911             self._autoPublish(anObj, theName, "partition")
6912             return anObj
6913
6914         ## Perform partition operation.
6915         #  This method may be useful if it is needed to make a partition for
6916         #  compound contains nonintersected shapes. Performance will be better
6917         #  since intersection between shapes from compound is not performed.
6918         #
6919         #  Description of all parameters as in previous method MakePartition()
6920         #
6921         #  @note Passed compounds (via ListShapes or via ListTools)
6922         #           have to consist of nonintersecting shapes.
6923         #
6924         #  @return New GEOM.GEOM_Object, containing the result shapes.
6925         #
6926         #  @ref swig_todo "Example"
6927         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
6928                                                  ListKeepInside=[], ListRemoveInside=[],
6929                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
6930                                                  ListMaterials=[], KeepNonlimitShapes=0,
6931                                                  theName=None):
6932             """
6933             Perform partition operation.
6934             This method may be useful if it is needed to make a partition for
6935             compound contains nonintersected shapes. Performance will be better
6936             since intersection between shapes from compound is not performed.
6937
6938             Parameters: 
6939                 Description of all parameters as in method geompy.MakePartition
6940         
6941             NOTE:
6942                 Passed compounds (via ListShapes or via ListTools)
6943                 have to consist of nonintersecting shapes.
6944
6945             Returns:   
6946                 New GEOM.GEOM_Object, containing the result shapes.
6947             """
6948             if Limit == self.ShapeType["AUTO"]:
6949                 # automatic detection of the most appropriate shape limit type
6950                 lim = GEOM.SHAPE
6951                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6952                 Limit = EnumToLong(lim)
6953                 pass
6954             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
6955                                                                      ListKeepInside, ListRemoveInside,
6956                                                                      Limit, RemoveWebs, ListMaterials,
6957                                                                      KeepNonlimitShapes);
6958             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
6959             self._autoPublish(anObj, theName, "partition")
6960             return anObj
6961
6962         ## See method MakePartition() for more information.
6963         #
6964         #  @ref tui_partition "Example 1"
6965         #  \n @ref swig_Partition "Example 2"
6966         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6967                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6968                       KeepNonlimitShapes=0, theName=None):
6969             """
6970             See method geompy.MakePartition for more information.
6971             """
6972             # Example: see GEOM_TestOthers.py
6973             # note: auto-publishing is done in self.MakePartition()
6974             anObj = self.MakePartition(ListShapes, ListTools,
6975                                        ListKeepInside, ListRemoveInside,
6976                                        Limit, RemoveWebs, ListMaterials,
6977                                        KeepNonlimitShapes, theName);
6978             return anObj
6979
6980         ## Perform partition of the Shape with the Plane
6981         #  @param theShape Shape to be intersected.
6982         #  @param thePlane Tool shape, to intersect theShape.
6983         #  @param theName Object name; when specified, this parameter is used
6984         #         for result publication in the study. Otherwise, if automatic
6985         #         publication is switched on, default value is used for result name.
6986         #
6987         #  @return New GEOM.GEOM_Object, containing the result shape.
6988         #
6989         #  @ref tui_partition "Example"
6990         def MakeHalfPartition(self, theShape, thePlane, theName=None):
6991             """
6992             Perform partition of the Shape with the Plane
6993
6994             Parameters: 
6995                 theShape Shape to be intersected.
6996                 thePlane Tool shape, to intersect theShape.
6997                 theName Object name; when specified, this parameter is used
6998                         for result publication in the study. Otherwise, if automatic
6999                         publication is switched on, default value is used for result name.
7000
7001             Returns:  
7002                 New GEOM.GEOM_Object, containing the result shape.
7003             """
7004             # Example: see GEOM_TestAll.py
7005             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
7006             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7007             self._autoPublish(anObj, theName, "partition")
7008             return anObj
7009
7010         # end of l3_basic_op
7011         ## @}
7012
7013         ## @addtogroup l3_transform
7014         ## @{
7015
7016         ## Translate the given object along the vector, specified
7017         #  by its end points.
7018         #  @param theObject The object to be translated.
7019         #  @param thePoint1 Start point of translation vector.
7020         #  @param thePoint2 End point of translation vector.
7021         #  @param theCopy Flag used to translate object itself or create a copy.
7022         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7023         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7024         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7025             """
7026             Translate the given object along the vector, specified by its end points.
7027
7028             Parameters: 
7029                 theObject The object to be translated.
7030                 thePoint1 Start point of translation vector.
7031                 thePoint2 End point of translation vector.
7032                 theCopy Flag used to translate object itself or create a copy.
7033
7034             Returns: 
7035                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7036                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7037             """
7038             if theCopy:
7039                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7040             else:
7041                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7042             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7043             return anObj
7044
7045         ## Translate the given object along the vector, specified
7046         #  by its end points, creating its copy before the translation.
7047         #  @param theObject The object to be translated.
7048         #  @param thePoint1 Start point of translation vector.
7049         #  @param thePoint2 End point of translation vector.
7050         #  @param theName Object name; when specified, this parameter is used
7051         #         for result publication in the study. Otherwise, if automatic
7052         #         publication is switched on, default value is used for result name.
7053         #
7054         #  @return New GEOM.GEOM_Object, containing the translated object.
7055         #
7056         #  @ref tui_translation "Example 1"
7057         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7058         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7059             """
7060             Translate the given object along the vector, specified
7061             by its end points, creating its copy before the translation.
7062
7063             Parameters: 
7064                 theObject The object to be translated.
7065                 thePoint1 Start point of translation vector.
7066                 thePoint2 End point of translation vector.
7067                 theName Object name; when specified, this parameter is used
7068                         for result publication in the study. Otherwise, if automatic
7069                         publication is switched on, default value is used for result name.
7070
7071             Returns:  
7072                 New GEOM.GEOM_Object, containing the translated object.
7073             """
7074             # Example: see GEOM_TestAll.py
7075             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7076             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7077             self._autoPublish(anObj, theName, "translated")
7078             return anObj
7079
7080         ## Translate the given object along the vector, specified by its components.
7081         #  @param theObject The object to be translated.
7082         #  @param theDX,theDY,theDZ Components 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         #
7087         #  @ref tui_translation "Example"
7088         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7089             """
7090             Translate the given object along the vector, specified by its components.
7091
7092             Parameters: 
7093                 theObject The object to be translated.
7094                 theDX,theDY,theDZ Components of translation vector.
7095                 theCopy Flag used to translate object itself or create a copy.
7096
7097             Returns: 
7098                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7099                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7100             """
7101             # Example: see GEOM_TestAll.py
7102             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7103             if theCopy:
7104                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7105             else:
7106                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7107             anObj.SetParameters(Parameters)
7108             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7109             return anObj
7110
7111         ## Translate the given object along the vector, specified
7112         #  by its components, creating its copy before the translation.
7113         #  @param theObject The object to be translated.
7114         #  @param theDX,theDY,theDZ Components of translation vector.
7115         #  @param theName Object name; when specified, this parameter is used
7116         #         for result publication in the study. Otherwise, if automatic
7117         #         publication is switched on, default value is used for result name.
7118         #
7119         #  @return New GEOM.GEOM_Object, containing the translated object.
7120         #
7121         #  @ref tui_translation "Example"
7122         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7123             """
7124             Translate the given object along the vector, specified
7125             by its components, creating its copy before the translation.
7126
7127             Parameters: 
7128                 theObject The object to be translated.
7129                 theDX,theDY,theDZ Components of translation vector.
7130                 theName Object name; when specified, this parameter is used
7131                         for result publication in the study. Otherwise, if automatic
7132                         publication is switched on, default value is used for result name.
7133
7134             Returns: 
7135                 New GEOM.GEOM_Object, containing the translated object.
7136             """
7137             # Example: see GEOM_TestAll.py
7138             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7139             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7140             anObj.SetParameters(Parameters)
7141             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7142             self._autoPublish(anObj, theName, "translated")
7143             return anObj
7144
7145         ## Translate the given object along the given vector.
7146         #  @param theObject The object to be translated.
7147         #  @param theVector The translation vector.
7148         #  @param theCopy Flag used to translate object itself or create a copy.
7149         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7150         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7151         def TranslateVector(self, theObject, theVector, theCopy=False):
7152             """
7153             Translate the given object along the given vector.
7154
7155             Parameters: 
7156                 theObject The object to be translated.
7157                 theVector The translation vector.
7158                 theCopy Flag used to translate object itself or create a copy.
7159
7160             Returns: 
7161                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7162                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7163             """
7164             if theCopy:
7165                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7166             else:
7167                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7168             RaiseIfFailed("TranslateVector", self.TrsfOp)
7169             return anObj
7170
7171         ## Translate the given object along the given vector,
7172         #  creating its copy before the translation.
7173         #  @param theObject The object to be translated.
7174         #  @param theVector The translation vector.
7175         #  @param theName Object name; when specified, this parameter is used
7176         #         for result publication in the study. Otherwise, if automatic
7177         #         publication is switched on, default value is used for result name.
7178         #
7179         #  @return New GEOM.GEOM_Object, containing the translated object.
7180         #
7181         #  @ref tui_translation "Example"
7182         def MakeTranslationVector(self, theObject, theVector, theName=None):
7183             """
7184             Translate the given object along the given vector,
7185             creating its copy before the translation.
7186
7187             Parameters: 
7188                 theObject The object to be translated.
7189                 theVector The translation vector.
7190                 theName Object name; when specified, this parameter is used
7191                         for result publication in the study. Otherwise, if automatic
7192                         publication is switched on, default value is used for result name.
7193
7194             Returns: 
7195                 New GEOM.GEOM_Object, containing the translated object.
7196             """
7197             # Example: see GEOM_TestAll.py
7198             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7199             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7200             self._autoPublish(anObj, theName, "translated")
7201             return anObj
7202
7203         ## Translate the given object along the given vector on given distance.
7204         #  @param theObject The object to be translated.
7205         #  @param theVector The translation vector.
7206         #  @param theDistance The translation distance.
7207         #  @param theCopy Flag used to translate object itself or create a copy.
7208         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7209         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7210         #
7211         #  @ref tui_translation "Example"
7212         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7213             """
7214             Translate the given object along the given vector on given distance.
7215
7216             Parameters: 
7217                 theObject The object to be translated.
7218                 theVector The translation vector.
7219                 theDistance The translation distance.
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             # Example: see GEOM_TestAll.py
7227             theDistance,Parameters = ParseParameters(theDistance)
7228             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7229             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7230             anObj.SetParameters(Parameters)
7231             return anObj
7232
7233         ## Translate the given object along the given vector on given distance,
7234         #  creating its copy before the translation.
7235         #  @param theObject The object to be translated.
7236         #  @param theVector The translation vector.
7237         #  @param theDistance The translation distance.
7238         #  @param theName Object name; when specified, this parameter is used
7239         #         for result publication in the study. Otherwise, if automatic
7240         #         publication is switched on, default value is used for result name.
7241         #
7242         #  @return New GEOM.GEOM_Object, containing the translated object.
7243         #
7244         #  @ref tui_translation "Example"
7245         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7246             """
7247             Translate the given object along the given vector on given distance,
7248             creating its copy before the translation.
7249
7250             Parameters:
7251                 theObject The object to be translated.
7252                 theVector The translation vector.
7253                 theDistance The translation distance.
7254                 theName Object name; when specified, this parameter is used
7255                         for result publication in the study. Otherwise, if automatic
7256                         publication is switched on, default value is used for result name.
7257
7258             Returns: 
7259                 New GEOM.GEOM_Object, containing the translated object.
7260             """
7261             # Example: see GEOM_TestAll.py
7262             theDistance,Parameters = ParseParameters(theDistance)
7263             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7264             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7265             anObj.SetParameters(Parameters)
7266             self._autoPublish(anObj, theName, "translated")
7267             return anObj
7268
7269         ## Rotate the given object around the given axis on the given angle.
7270         #  @param theObject The object to be rotated.
7271         #  @param theAxis Rotation axis.
7272         #  @param theAngle Rotation angle in radians.
7273         #  @param theCopy Flag used to rotate object itself or create a copy.
7274         #
7275         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7276         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7277         #
7278         #  @ref tui_rotation "Example"
7279         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7280             """
7281             Rotate the given object around the given axis on the given angle.
7282
7283             Parameters:
7284                 theObject The object to be rotated.
7285                 theAxis Rotation axis.
7286                 theAngle Rotation angle in radians.
7287                 theCopy Flag used to rotate object itself or create a copy.
7288
7289             Returns:
7290                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7291                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7292             """
7293             # Example: see GEOM_TestAll.py
7294             flag = False
7295             if isinstance(theAngle,str):
7296                 flag = True
7297             theAngle, Parameters = ParseParameters(theAngle)
7298             if flag:
7299                 theAngle = theAngle*math.pi/180.0
7300             if theCopy:
7301                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7302             else:
7303                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7304             RaiseIfFailed("Rotate", self.TrsfOp)
7305             anObj.SetParameters(Parameters)
7306             return anObj
7307
7308         ## Rotate the given object around the given axis
7309         #  on the given angle, creating its copy before the rotatation.
7310         #  @param theObject The object to be rotated.
7311         #  @param theAxis Rotation axis.
7312         #  @param theAngle Rotation angle in radians.
7313         #  @param theName Object name; when specified, this parameter is used
7314         #         for result publication in the study. Otherwise, if automatic
7315         #         publication is switched on, default value is used for result name.
7316         #
7317         #  @return New GEOM.GEOM_Object, containing the rotated object.
7318         #
7319         #  @ref tui_rotation "Example"
7320         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7321             """
7322             Rotate the given object around the given axis
7323             on the given angle, creating its copy before the rotatation.
7324
7325             Parameters:
7326                 theObject The object to be rotated.
7327                 theAxis Rotation axis.
7328                 theAngle Rotation angle in radians.
7329                 theName Object name; when specified, this parameter is used
7330                         for result publication in the study. Otherwise, if automatic
7331                         publication is switched on, default value is used for result name.
7332
7333             Returns:
7334                 New GEOM.GEOM_Object, containing the rotated object.
7335             """
7336             # Example: see GEOM_TestAll.py
7337             flag = False
7338             if isinstance(theAngle,str):
7339                 flag = True
7340             theAngle, Parameters = ParseParameters(theAngle)
7341             if flag:
7342                 theAngle = theAngle*math.pi/180.0
7343             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7344             RaiseIfFailed("RotateCopy", self.TrsfOp)
7345             anObj.SetParameters(Parameters)
7346             self._autoPublish(anObj, theName, "rotated")
7347             return anObj
7348
7349         ## Rotate given object around vector perpendicular to plane
7350         #  containing three points.
7351         #  @param theObject The object to be rotated.
7352         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7353         #  containing the three points.
7354         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7355         #  @param theCopy Flag used to rotate object itself or create a copy.
7356         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7357         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7358         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7359             """
7360             Rotate given object around vector perpendicular to plane
7361             containing three points.
7362
7363             Parameters:
7364                 theObject The object to be rotated.
7365                 theCentPoint central point  the axis is the vector perpendicular to the plane
7366                              containing the three points.
7367                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7368                 theCopy Flag used to rotate object itself or create a copy.
7369
7370             Returns:
7371                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7372                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7373             """
7374             if theCopy:
7375                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7376             else:
7377                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7378             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7379             return anObj
7380
7381         ## Rotate given object around vector perpendicular to plane
7382         #  containing three points, creating its copy before the rotatation.
7383         #  @param theObject The object to be rotated.
7384         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7385         #  containing the three points.
7386         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7387         #  @param theName Object name; when specified, this parameter is used
7388         #         for result publication in the study. Otherwise, if automatic
7389         #         publication is switched on, default value is used for result name.
7390         #
7391         #  @return New GEOM.GEOM_Object, containing the rotated object.
7392         #
7393         #  @ref tui_rotation "Example"
7394         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
7395             """
7396             Rotate given object around vector perpendicular to plane
7397             containing three points, creating its copy before the rotatation.
7398
7399             Parameters:
7400                 theObject The object to be rotated.
7401                 theCentPoint central point  the axis is the vector perpendicular to the plane
7402                              containing the three points.
7403                 thePoint1,thePoint2  in a perpendicular plane of the axis.
7404                 theName Object name; when specified, this parameter is used
7405                         for result publication in the study. Otherwise, if automatic
7406                         publication is switched on, default value is used for result name.
7407
7408             Returns:
7409                 New GEOM.GEOM_Object, containing the rotated object.
7410             """
7411             # Example: see GEOM_TestAll.py
7412             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7413             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
7414             self._autoPublish(anObj, theName, "rotated")
7415             return anObj
7416
7417         ## Scale the given object by the specified factor.
7418         #  @param theObject The object to be scaled.
7419         #  @param thePoint Center point for scaling.
7420         #                  Passing None for it means scaling relatively the origin of global CS.
7421         #  @param theFactor Scaling factor value.
7422         #  @param theCopy Flag used to scale object itself or create a copy.
7423         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7424         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7425         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
7426             """
7427             Scale the given object by the specified factor.
7428
7429             Parameters:
7430                 theObject The object to be scaled.
7431                 thePoint Center point for scaling.
7432                          Passing None for it means scaling relatively the origin of global CS.
7433                 theFactor Scaling factor value.
7434                 theCopy Flag used to scale object itself or create a copy.
7435
7436             Returns:    
7437                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7438                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7439             """
7440             # Example: see GEOM_TestAll.py
7441             theFactor, Parameters = ParseParameters(theFactor)
7442             if theCopy:
7443                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7444             else:
7445                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
7446             RaiseIfFailed("Scale", self.TrsfOp)
7447             anObj.SetParameters(Parameters)
7448             return anObj
7449
7450         ## Scale the given object by the factor, creating its copy before the scaling.
7451         #  @param theObject The object to be scaled.
7452         #  @param thePoint Center point for scaling.
7453         #                  Passing None for it means scaling relatively the origin of global CS.
7454         #  @param theFactor Scaling factor value.
7455         #  @param theName Object name; when specified, this parameter is used
7456         #         for result publication in the study. Otherwise, if automatic
7457         #         publication is switched on, default value is used for result name.
7458         #
7459         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7460         #
7461         #  @ref tui_scale "Example"
7462         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
7463             """
7464             Scale the given object by the factor, creating its copy before the scaling.
7465
7466             Parameters:
7467                 theObject The object to be scaled.
7468                 thePoint Center point for scaling.
7469                          Passing None for it means scaling relatively the origin of global CS.
7470                 theFactor Scaling factor value.
7471                 theName Object name; when specified, this parameter is used
7472                         for result publication in the study. Otherwise, if automatic
7473                         publication is switched on, default value is used for result name.
7474
7475             Returns:    
7476                 New GEOM.GEOM_Object, containing the scaled shape.
7477             """
7478             # Example: see GEOM_TestAll.py
7479             theFactor, Parameters = ParseParameters(theFactor)
7480             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7481             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
7482             anObj.SetParameters(Parameters)
7483             self._autoPublish(anObj, theName, "scaled")
7484             return anObj
7485
7486         ## Scale the given object by different factors along coordinate axes.
7487         #  @param theObject The object to be scaled.
7488         #  @param thePoint Center point for scaling.
7489         #                  Passing None for it means scaling relatively the origin of global CS.
7490         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7491         #  @param theCopy Flag used to scale object itself or create a copy.
7492         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7493         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7494         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
7495             """
7496             Scale the given object by different factors along coordinate axes.
7497
7498             Parameters:
7499                 theObject The object to be scaled.
7500                 thePoint Center point for scaling.
7501                             Passing None for it means scaling relatively the origin of global CS.
7502                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7503                 theCopy Flag used to scale object itself or create a copy.
7504
7505             Returns:    
7506                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7507                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7508             """
7509             # Example: see GEOM_TestAll.py
7510             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7511             if theCopy:
7512                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7513                                                             theFactorX, theFactorY, theFactorZ)
7514             else:
7515                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
7516                                                         theFactorX, theFactorY, theFactorZ)
7517             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
7518             anObj.SetParameters(Parameters)
7519             return anObj
7520
7521         ## Scale the given object by different factors along coordinate axes,
7522         #  creating its copy before the scaling.
7523         #  @param theObject The object to be scaled.
7524         #  @param thePoint Center point for scaling.
7525         #                  Passing None for it means scaling relatively the origin of global CS.
7526         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7527         #  @param theName Object name; when specified, this parameter is used
7528         #         for result publication in the study. Otherwise, if automatic
7529         #         publication is switched on, default value is used for result name.
7530         #
7531         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7532         #
7533         #  @ref swig_scale "Example"
7534         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
7535             """
7536             Scale the given object by different factors along coordinate axes,
7537             creating its copy before the scaling.
7538
7539             Parameters:
7540                 theObject The object to be scaled.
7541                 thePoint Center point for scaling.
7542                             Passing None for it means scaling relatively the origin of global CS.
7543                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7544                 theName Object name; when specified, this parameter is used
7545                         for result publication in the study. Otherwise, if automatic
7546                         publication is switched on, default value is used for result name.
7547
7548             Returns:
7549                 New GEOM.GEOM_Object, containing the scaled shape.
7550             """
7551             # Example: see GEOM_TestAll.py
7552             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7553             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7554                                                         theFactorX, theFactorY, theFactorZ)
7555             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
7556             anObj.SetParameters(Parameters)
7557             self._autoPublish(anObj, theName, "scaled")
7558             return anObj
7559
7560         ## Mirror an object relatively the given plane.
7561         #  @param theObject The object to be mirrored.
7562         #  @param thePlane Plane of symmetry.
7563         #  @param theCopy Flag used to mirror object itself or create a copy.
7564         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7565         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7566         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
7567             """
7568             Mirror an object relatively the given plane.
7569
7570             Parameters:
7571                 theObject The object to be mirrored.
7572                 thePlane Plane of symmetry.
7573                 theCopy Flag used to mirror object itself or create a copy.
7574
7575             Returns:
7576                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7577                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7578             """
7579             if theCopy:
7580                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7581             else:
7582                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
7583             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
7584             return anObj
7585
7586         ## Create an object, symmetrical
7587         #  to the given one relatively the given plane.
7588         #  @param theObject The object to be mirrored.
7589         #  @param thePlane Plane of symmetry.
7590         #  @param theName Object name; when specified, this parameter is used
7591         #         for result publication in the study. Otherwise, if automatic
7592         #         publication is switched on, default value is used for result name.
7593         #
7594         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7595         #
7596         #  @ref tui_mirror "Example"
7597         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
7598             """
7599             Create an object, symmetrical to the given one relatively the given plane.
7600
7601             Parameters:
7602                 theObject The object to be mirrored.
7603                 thePlane Plane of symmetry.
7604                 theName Object name; when specified, this parameter is used
7605                         for result publication in the study. Otherwise, if automatic
7606                         publication is switched on, default value is used for result name.
7607
7608             Returns:
7609                 New GEOM.GEOM_Object, containing the mirrored shape.
7610             """
7611             # Example: see GEOM_TestAll.py
7612             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7613             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
7614             self._autoPublish(anObj, theName, "mirrored")
7615             return anObj
7616
7617         ## Mirror an object relatively the given axis.
7618         #  @param theObject The object to be mirrored.
7619         #  @param theAxis Axis of symmetry.
7620         #  @param theCopy Flag used to mirror object itself or create a copy.
7621         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7622         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7623         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
7624             """
7625             Mirror an object relatively the given axis.
7626
7627             Parameters:
7628                 theObject The object to be mirrored.
7629                 theAxis Axis of symmetry.
7630                 theCopy Flag used to mirror object itself or create a copy.
7631
7632             Returns:
7633                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7634                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7635             """
7636             if theCopy:
7637                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7638             else:
7639                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
7640             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
7641             return anObj
7642
7643         ## Create an object, symmetrical
7644         #  to the given one relatively the given axis.
7645         #  @param theObject The object to be mirrored.
7646         #  @param theAxis Axis of symmetry.
7647         #  @param theName Object name; when specified, this parameter is used
7648         #         for result publication in the study. Otherwise, if automatic
7649         #         publication is switched on, default value is used for result name.
7650         #
7651         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7652         #
7653         #  @ref tui_mirror "Example"
7654         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
7655             """
7656             Create an object, symmetrical to the given one relatively the given axis.
7657
7658             Parameters:
7659                 theObject The object to be mirrored.
7660                 theAxis Axis of symmetry.
7661                 theName Object name; when specified, this parameter is used
7662                         for result publication in the study. Otherwise, if automatic
7663                         publication is switched on, default value is used for result name.
7664
7665             Returns: 
7666                 New GEOM.GEOM_Object, containing the mirrored shape.
7667             """
7668             # Example: see GEOM_TestAll.py
7669             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7670             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
7671             self._autoPublish(anObj, theName, "mirrored")
7672             return anObj
7673
7674         ## Mirror an object relatively the given point.
7675         #  @param theObject The object to be mirrored.
7676         #  @param thePoint Point of symmetry.
7677         #  @param theCopy Flag used to mirror object itself or create a copy.
7678         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7679         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7680         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
7681             """
7682             Mirror an object relatively the given point.
7683
7684             Parameters:
7685                 theObject The object to be mirrored.
7686                 thePoint Point of symmetry.
7687                 theCopy Flag used to mirror object itself or create a copy.
7688
7689             Returns:
7690                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7691                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7692             """
7693             # Example: see GEOM_TestAll.py
7694             if theCopy:
7695                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7696             else:
7697                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
7698             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
7699             return anObj
7700
7701         ## Create an object, symmetrical
7702         #  to the given one relatively the given point.
7703         #  @param theObject The object to be mirrored.
7704         #  @param thePoint Point of symmetry.
7705         #  @param theName Object name; when specified, this parameter is used
7706         #         for result publication in the study. Otherwise, if automatic
7707         #         publication is switched on, default value is used for result name.
7708         #
7709         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7710         #
7711         #  @ref tui_mirror "Example"
7712         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
7713             """
7714             Create an object, symmetrical
7715             to the given one relatively the given point.
7716
7717             Parameters:
7718                 theObject The object to be mirrored.
7719                 thePoint Point of symmetry.
7720                 theName Object name; when specified, this parameter is used
7721                         for result publication in the study. Otherwise, if automatic
7722                         publication is switched on, default value is used for result name.
7723
7724             Returns:  
7725                 New GEOM.GEOM_Object, containing the mirrored shape.
7726             """
7727             # Example: see GEOM_TestAll.py
7728             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7729             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
7730             self._autoPublish(anObj, theName, "mirrored")
7731             return anObj
7732
7733         ## Modify the location of the given object.
7734         #  @param theObject The object to be displaced.
7735         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7736         #                     If \a theStartLCS is NULL, displacement
7737         #                     will be performed from global CS.\n
7738         #                     If \a theObject itself is used as \a theStartLCS,
7739         #                     its location will be changed to \a theEndLCS.
7740         #  @param theEndLCS Coordinate system to perform displacement to it.
7741         #  @param theCopy Flag used to displace object itself or create a copy.
7742         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7743         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
7744         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
7745             """
7746             Modify the Location of the given object by LCS, creating its copy before the setting.
7747
7748             Parameters:
7749                 theObject The object to be displaced.
7750                 theStartLCS Coordinate system to perform displacement from it.
7751                             If theStartLCS is NULL, displacement
7752                             will be performed from global CS.
7753                             If theObject itself is used as theStartLCS,
7754                             its location will be changed to theEndLCS.
7755                 theEndLCS Coordinate system to perform displacement to it.
7756                 theCopy Flag used to displace object itself or create a copy.
7757
7758             Returns:
7759                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7760                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
7761             """
7762             # Example: see GEOM_TestAll.py
7763             if theCopy:
7764                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7765             else:
7766                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
7767             RaiseIfFailed("Displace", self.TrsfOp)
7768             return anObj
7769
7770         ## Modify the Location of the given object by LCS,
7771         #  creating its copy before the setting.
7772         #  @param theObject The object to be displaced.
7773         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7774         #                     If \a theStartLCS is NULL, displacement
7775         #                     will be performed from global CS.\n
7776         #                     If \a theObject itself is used as \a theStartLCS,
7777         #                     its location will be changed to \a theEndLCS.
7778         #  @param theEndLCS Coordinate system to perform displacement to it.
7779         #  @param theName Object name; when specified, this parameter is used
7780         #         for result publication in the study. Otherwise, if automatic
7781         #         publication is switched on, default value is used for result name.
7782         #
7783         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7784         #
7785         #  @ref tui_modify_location "Example"
7786         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
7787             """
7788             Modify the Location of the given object by LCS, creating its copy before the setting.
7789
7790             Parameters:
7791                 theObject The object to be displaced.
7792                 theStartLCS Coordinate system to perform displacement from it.
7793                             If theStartLCS is NULL, displacement
7794                             will be performed from global CS.
7795                             If theObject itself is used as theStartLCS,
7796                             its location will be changed to theEndLCS.
7797                 theEndLCS Coordinate system to perform displacement to it.
7798                 theName Object name; when specified, this parameter is used
7799                         for result publication in the study. Otherwise, if automatic
7800                         publication is switched on, default value is used for result name.
7801
7802             Returns:  
7803                 New GEOM.GEOM_Object, containing the displaced shape.
7804
7805             Example of usage:
7806                 # create local coordinate systems
7807                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
7808                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
7809                 # modify the location of the given object
7810                 position = geompy.MakePosition(cylinder, cs1, cs2)
7811             """
7812             # Example: see GEOM_TestAll.py
7813             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7814             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
7815             self._autoPublish(anObj, theName, "displaced")
7816             return anObj
7817
7818         ## Modify the Location of the given object by Path.
7819         #  @param  theObject The object to be displaced.
7820         #  @param  thePath Wire or Edge along that the object will be translated.
7821         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
7822         #  @param  theCopy is to create a copy objects if true.
7823         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
7824         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
7825         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
7826         #
7827         #  @ref tui_modify_location "Example"
7828         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
7829             """
7830             Modify the Location of the given object by Path.
7831
7832             Parameters:
7833                  theObject The object to be displaced.
7834                  thePath Wire or Edge along that the object will be translated.
7835                  theDistance progress of Path (0 = start location, 1 = end of path location).
7836                  theCopy is to create a copy objects if true.
7837                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7838
7839             Returns:  
7840                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
7841                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
7842
7843             Example of usage:
7844                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
7845             """
7846             # Example: see GEOM_TestAll.py
7847             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
7848             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7849             return anObj
7850
7851         ## Modify the Location of the given object by Path, creating its copy before the operation.
7852         #  @param theObject The object to be displaced.
7853         #  @param thePath Wire or Edge along that the object will be translated.
7854         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
7855         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
7856         #  @param theName Object name; when specified, this parameter is used
7857         #         for result publication in the study. Otherwise, if automatic
7858         #         publication is switched on, default value is used for result name.
7859         #
7860         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7861         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
7862             """
7863             Modify the Location of the given object by Path, creating its copy before the operation.
7864
7865             Parameters:
7866                  theObject The object to be displaced.
7867                  thePath Wire or Edge along that the object will be translated.
7868                  theDistance progress of Path (0 = start location, 1 = end of path location).
7869                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7870                  theName Object name; when specified, this parameter is used
7871                          for result publication in the study. Otherwise, if automatic
7872                          publication is switched on, default value is used for result name.
7873
7874             Returns:  
7875                 New GEOM.GEOM_Object, containing the displaced shape.
7876             """
7877             # Example: see GEOM_TestAll.py
7878             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
7879             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7880             self._autoPublish(anObj, theName, "displaced")
7881             return anObj
7882
7883         ## Offset given shape.
7884         #  @param theObject The base object for the offset.
7885         #  @param theOffset Offset value.
7886         #  @param theCopy Flag used to offset object itself or create a copy.
7887         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7888         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
7889         def Offset(self, theObject, theOffset, theCopy=False):
7890             """
7891             Offset given shape.
7892
7893             Parameters:
7894                 theObject The base object for the offset.
7895                 theOffset Offset value.
7896                 theCopy Flag used to offset object itself or create a copy.
7897
7898             Returns: 
7899                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7900                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
7901             """
7902             theOffset, Parameters = ParseParameters(theOffset)
7903             if theCopy:
7904                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7905             else:
7906                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
7907             RaiseIfFailed("Offset", self.TrsfOp)
7908             anObj.SetParameters(Parameters)
7909             return anObj
7910
7911         ## Create new object as offset of the given one.
7912         #  @param theObject The base object for the offset.
7913         #  @param theOffset Offset value.
7914         #  @param theName Object name; when specified, this parameter is used
7915         #         for result publication in the study. Otherwise, if automatic
7916         #         publication is switched on, default value is used for result name.
7917         #
7918         #  @return New GEOM.GEOM_Object, containing the offset object.
7919         #
7920         #  @ref tui_offset "Example"
7921         def MakeOffset(self, theObject, theOffset, theName=None):
7922             """
7923             Create new object as offset of the given one.
7924
7925             Parameters:
7926                 theObject The base object for the offset.
7927                 theOffset Offset value.
7928                 theName Object name; when specified, this parameter is used
7929                         for result publication in the study. Otherwise, if automatic
7930                         publication is switched on, default value is used for result name.
7931
7932             Returns:  
7933                 New GEOM.GEOM_Object, containing the offset object.
7934
7935             Example of usage:
7936                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
7937                  # create a new object as offset of the given object
7938                  offset = geompy.MakeOffset(box, 70.)
7939             """
7940             # Example: see GEOM_TestAll.py
7941             theOffset, Parameters = ParseParameters(theOffset)
7942             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7943             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
7944             anObj.SetParameters(Parameters)
7945             self._autoPublish(anObj, theName, "offset")
7946             return anObj
7947
7948         ## Create new object as projection of the given one on a 2D surface.
7949         #  @param theSource The source object for the projection. It can be a point, edge or wire.
7950         #  @param theTarget The target object. It can be planar or cylindrical face.
7951         #  @param theName Object name; when specified, this parameter is used
7952         #         for result publication in the study. Otherwise, if automatic
7953         #         publication is switched on, default value is used for result name.
7954         #
7955         #  @return New GEOM.GEOM_Object, containing the projection.
7956         #
7957         #  @ref tui_projection "Example"
7958         def MakeProjection(self, theSource, theTarget, theName=None):
7959             """
7960             Create new object as projection of the given one on a 2D surface.
7961
7962             Parameters:
7963                 theSource The source object for the projection. It can be a point, edge or wire.
7964                 theTarget The target object. It can be planar or cylindrical face.
7965                 theName Object name; when specified, this parameter is used
7966                         for result publication in the study. Otherwise, if automatic
7967                         publication is switched on, default value is used for result name.
7968
7969             Returns:  
7970                 New GEOM.GEOM_Object, containing the projection.
7971             """
7972             # Example: see GEOM_TestAll.py
7973             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
7974             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
7975             self._autoPublish(anObj, theName, "projection")
7976             return anObj
7977
7978         # -----------------------------------------------------------------------------
7979         # Patterns
7980         # -----------------------------------------------------------------------------
7981
7982         ## Translate the given object along the given vector a given number times
7983         #  @param theObject The object to be translated.
7984         #  @param theVector Direction of the translation. DX if None.
7985         #  @param theStep Distance to translate on.
7986         #  @param theNbTimes Quantity of translations to be done.
7987         #  @param theName Object name; when specified, this parameter is used
7988         #         for result publication in the study. Otherwise, if automatic
7989         #         publication is switched on, default value is used for result name.
7990         #
7991         #  @return New GEOM.GEOM_Object, containing compound of all
7992         #          the shapes, obtained after each translation.
7993         #
7994         #  @ref tui_multi_translation "Example"
7995         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
7996             """
7997             Translate the given object along the given vector a given number times
7998
7999             Parameters:
8000                 theObject The object to be translated.
8001                 theVector Direction of the translation. DX if None.
8002                 theStep Distance to translate on.
8003                 theNbTimes Quantity of translations to be done.
8004                 theName Object name; when specified, this parameter is used
8005                         for result publication in the study. Otherwise, if automatic
8006                         publication is switched on, default value is used for result name.
8007
8008             Returns:     
8009                 New GEOM.GEOM_Object, containing compound of all
8010                 the shapes, obtained after each translation.
8011
8012             Example of usage:
8013                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
8014             """
8015             # Example: see GEOM_TestAll.py
8016             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
8017             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
8018             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
8019             anObj.SetParameters(Parameters)
8020             self._autoPublish(anObj, theName, "multitranslation")
8021             return anObj
8022
8023         ## Conseqently apply two specified translations to theObject specified number of times.
8024         #  @param theObject The object to be translated.
8025         #  @param theVector1 Direction of the first translation. DX if None.
8026         #  @param theStep1 Step of the first translation.
8027         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
8028         #  @param theVector2 Direction of the second translation. DY if None.
8029         #  @param theStep2 Step of the second translation.
8030         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
8031         #  @param theName Object name; when specified, this parameter is used
8032         #         for result publication in the study. Otherwise, if automatic
8033         #         publication is switched on, default value is used for result name.
8034         #
8035         #  @return New GEOM.GEOM_Object, containing compound of all
8036         #          the shapes, obtained after each translation.
8037         #
8038         #  @ref tui_multi_translation "Example"
8039         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8040                                    theVector2, theStep2, theNbTimes2, theName=None):
8041             """
8042             Conseqently apply two specified translations to theObject specified number of times.
8043
8044             Parameters:
8045                 theObject The object to be translated.
8046                 theVector1 Direction of the first translation. DX if None.
8047                 theStep1 Step of the first translation.
8048                 theNbTimes1 Quantity of translations to be done along theVector1.
8049                 theVector2 Direction of the second translation. DY if None.
8050                 theStep2 Step of the second translation.
8051                 theNbTimes2 Quantity of translations to be done along theVector2.
8052                 theName Object name; when specified, this parameter is used
8053                         for result publication in the study. Otherwise, if automatic
8054                         publication is switched on, default value is used for result name.
8055
8056             Returns:
8057                 New GEOM.GEOM_Object, containing compound of all
8058                 the shapes, obtained after each translation.
8059
8060             Example of usage:
8061                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8062             """
8063             # Example: see GEOM_TestAll.py
8064             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8065             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8066                                                  theVector2, theStep2, theNbTimes2)
8067             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8068             anObj.SetParameters(Parameters)
8069             self._autoPublish(anObj, theName, "multitranslation")
8070             return anObj
8071
8072         ## Rotate the given object around the given axis a given number times.
8073         #  Rotation angle will be 2*PI/theNbTimes.
8074         #  @param theObject The object to be rotated.
8075         #  @param theAxis The rotation axis. DZ if None.
8076         #  @param theNbTimes Quantity of rotations to be done.
8077         #  @param theName Object name; when specified, this parameter is used
8078         #         for result publication in the study. Otherwise, if automatic
8079         #         publication is switched on, default value is used for result name.
8080         #
8081         #  @return New GEOM.GEOM_Object, containing compound of all the
8082         #          shapes, obtained after each rotation.
8083         #
8084         #  @ref tui_multi_rotation "Example"
8085         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8086             """
8087             Rotate the given object around the given axis a given number times.
8088             Rotation angle will be 2*PI/theNbTimes.
8089
8090             Parameters:
8091                 theObject The object to be rotated.
8092                 theAxis The rotation axis. DZ if None.
8093                 theNbTimes Quantity of rotations to be done.
8094                 theName Object name; when specified, this parameter is used
8095                         for result publication in the study. Otherwise, if automatic
8096                         publication is switched on, default value is used for result name.
8097
8098             Returns:     
8099                 New GEOM.GEOM_Object, containing compound of all the
8100                 shapes, obtained after each rotation.
8101
8102             Example of usage:
8103                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8104             """
8105             # Example: see GEOM_TestAll.py
8106             theNbTimes, Parameters = ParseParameters(theNbTimes)
8107             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8108             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8109             anObj.SetParameters(Parameters)
8110             self._autoPublish(anObj, theName, "multirotation")
8111             return anObj
8112
8113         ## Rotate the given object around the given axis
8114         #  a given number times on the given angle.
8115         #  @param theObject The object to be rotated.
8116         #  @param theAxis The rotation axis. DZ if None.
8117         #  @param theAngleStep Rotation angle in radians.
8118         #  @param theNbTimes Quantity of rotations to be done.
8119         #  @param theName Object name; when specified, this parameter is used
8120         #         for result publication in the study. Otherwise, if automatic
8121         #         publication is switched on, default value is used for result name.
8122         #
8123         #  @return New GEOM.GEOM_Object, containing compound of all the
8124         #          shapes, obtained after each rotation.
8125         #
8126         #  @ref tui_multi_rotation "Example"
8127         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8128             """
8129             Rotate the given object around the given axis
8130             a given number times on the given angle.
8131
8132             Parameters:
8133                 theObject The object to be rotated.
8134                 theAxis The rotation axis. DZ if None.
8135                 theAngleStep Rotation angle in radians.
8136                 theNbTimes Quantity of rotations to be done.
8137                 theName Object name; when specified, this parameter is used
8138                         for result publication in the study. Otherwise, if automatic
8139                         publication is switched on, default value is used for result name.
8140
8141             Returns:     
8142                 New GEOM.GEOM_Object, containing compound of all the
8143                 shapes, obtained after each rotation.
8144
8145             Example of usage:
8146                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8147             """
8148             # Example: see GEOM_TestAll.py
8149             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8150             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8151             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8152             anObj.SetParameters(Parameters)
8153             self._autoPublish(anObj, theName, "multirotation")
8154             return anObj
8155
8156         ## Rotate the given object around the given axis a given
8157         #  number times and multi-translate each rotation result.
8158         #  Rotation angle will be 2*PI/theNbTimes1.
8159         #  Translation direction passes through center of gravity
8160         #  of rotated shape and its projection on the rotation axis.
8161         #  @param theObject The object to be rotated.
8162         #  @param theAxis Rotation axis. DZ if None.
8163         #  @param theNbTimes1 Quantity of rotations to be done.
8164         #  @param theRadialStep Translation distance.
8165         #  @param theNbTimes2 Quantity of translations to be done.
8166         #  @param theName Object name; when specified, this parameter is used
8167         #         for result publication in the study. Otherwise, if automatic
8168         #         publication is switched on, default value is used for result name.
8169         #
8170         #  @return New GEOM.GEOM_Object, containing compound of all the
8171         #          shapes, obtained after each transformation.
8172         #
8173         #  @ref tui_multi_rotation "Example"
8174         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8175             """
8176             Rotate the given object around the
8177             given axis on the given angle a given number
8178             times and multi-translate each rotation result.
8179             Translation direction passes through center of gravity
8180             of rotated shape and its projection on the rotation axis.
8181
8182             Parameters:
8183                 theObject The object to be rotated.
8184                 theAxis Rotation axis. DZ if None.
8185                 theNbTimes1 Quantity of rotations to be done.
8186                 theRadialStep Translation distance.
8187                 theNbTimes2 Quantity of translations to be done.
8188                 theName Object name; when specified, this parameter is used
8189                         for result publication in the study. Otherwise, if automatic
8190                         publication is switched on, default value is used for result name.
8191
8192             Returns:    
8193                 New GEOM.GEOM_Object, containing compound of all the
8194                 shapes, obtained after each transformation.
8195
8196             Example of usage:
8197                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8198             """
8199             # Example: see GEOM_TestAll.py
8200             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8201             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8202             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8203             anObj.SetParameters(Parameters)
8204             self._autoPublish(anObj, theName, "multirotation")
8205             return anObj
8206
8207         ## Rotate the given object around the
8208         #  given axis on the given angle a given number
8209         #  times and multi-translate each rotation result.
8210         #  Translation direction passes through center of gravity
8211         #  of rotated shape and its projection on the rotation axis.
8212         #  @param theObject The object to be rotated.
8213         #  @param theAxis Rotation axis. DZ if None.
8214         #  @param theAngleStep Rotation angle in radians.
8215         #  @param theNbTimes1 Quantity of rotations to be done.
8216         #  @param theRadialStep Translation distance.
8217         #  @param theNbTimes2 Quantity of translations to be done.
8218         #  @param theName Object name; when specified, this parameter is used
8219         #         for result publication in the study. Otherwise, if automatic
8220         #         publication is switched on, default value is used for result name.
8221         #
8222         #  @return New GEOM.GEOM_Object, containing compound of all the
8223         #          shapes, obtained after each transformation.
8224         #
8225         #  @ref tui_multi_rotation "Example"
8226         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8227             """
8228             Rotate the given object around the
8229             given axis on the given angle a given number
8230             times and multi-translate each rotation result.
8231             Translation direction passes through center of gravity
8232             of rotated shape and its projection on the rotation axis.
8233
8234             Parameters:
8235                 theObject The object to be rotated.
8236                 theAxis Rotation axis. DZ if None.
8237                 theAngleStep Rotation angle in radians.
8238                 theNbTimes1 Quantity of rotations to be done.
8239                 theRadialStep Translation distance.
8240                 theNbTimes2 Quantity of translations to be done.
8241                 theName Object name; when specified, this parameter is used
8242                         for result publication in the study. Otherwise, if automatic
8243                         publication is switched on, default value is used for result name.
8244
8245             Returns:    
8246                 New GEOM.GEOM_Object, containing compound of all the
8247                 shapes, obtained after each transformation.
8248
8249             Example of usage:
8250                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8251             """
8252             # Example: see GEOM_TestAll.py
8253             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8254             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8255             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8256             anObj.SetParameters(Parameters)
8257             self._autoPublish(anObj, theName, "multirotation")
8258             return anObj
8259
8260         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8261         #
8262         #  @ref swig_MakeMultiRotation "Example"
8263         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8264             """
8265             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8266
8267             Example of usage:
8268                 pz = geompy.MakeVertex(0, 0, 100)
8269                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8270                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8271             """
8272             # Example: see GEOM_TestOthers.py
8273             aVec = self.MakeLine(aPoint,aDir)
8274             # note: auto-publishing is done in self.MultiRotate1D()
8275             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8276             return anObj
8277
8278         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8279         #
8280         #  @ref swig_MakeMultiRotation "Example"
8281         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8282             """
8283             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8284
8285             Example of usage:
8286                 pz = geompy.MakeVertex(0, 0, 100)
8287                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8288                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8289             """
8290             # Example: see GEOM_TestOthers.py
8291             aVec = self.MakeLine(aPoint,aDir)
8292             # note: auto-publishing is done in self.MultiRotate1D()
8293             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8294             return anObj
8295
8296         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8297         #
8298         #  @ref swig_MakeMultiRotation "Example"
8299         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8300             """
8301             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8302             
8303             Example of usage:
8304                 pz = geompy.MakeVertex(0, 0, 100)
8305                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8306                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8307             """
8308             # Example: see GEOM_TestOthers.py
8309             aVec = self.MakeLine(aPoint,aDir)
8310             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8311             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8312             return anObj
8313
8314         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8315         #
8316         #  @ref swig_MakeMultiRotation "Example"
8317         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8318             """
8319             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8320             
8321             Example of usage:
8322                 pz = geompy.MakeVertex(0, 0, 100)
8323                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8324                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8325             """
8326             # Example: see GEOM_TestOthers.py
8327             aVec = self.MakeLine(aPoint,aDir)
8328             # note: auto-publishing is done in self.MultiRotate2D()
8329             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8330             return anObj
8331
8332         # end of l3_transform
8333         ## @}
8334
8335         ## @addtogroup l3_transform_d
8336         ## @{
8337
8338         ## Deprecated method. Use MultiRotate1DNbTimes instead.
8339         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
8340             """
8341             Deprecated method. Use MultiRotate1DNbTimes instead.
8342             """
8343             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
8344             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
8345
8346         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8347         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8348         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
8349             """
8350             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8351             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8352
8353             Example of usage:
8354                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8355             """
8356             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
8357             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
8358             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
8359             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
8360             anObj.SetParameters(Parameters)
8361             self._autoPublish(anObj, theName, "multirotation")
8362             return anObj
8363
8364         ## The same, as MultiRotate1D(), but axis is given by direction and point
8365         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8366         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8367             """
8368             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
8369             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8370
8371             Example of usage:
8372                 pz = geompy.MakeVertex(0, 0, 100)
8373                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8374                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
8375             """
8376             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
8377             aVec = self.MakeLine(aPoint,aDir)
8378             # note: auto-publishing is done in self.MultiRotate1D()
8379             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
8380             return anObj
8381
8382         ## The same, as MultiRotate2D(), but axis is given by direction and point
8383         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8384         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8385             """
8386             The same, as MultiRotate2D(), but axis is given by direction and point
8387             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8388             
8389             Example of usage:
8390                 pz = geompy.MakeVertex(0, 0, 100)
8391                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8392                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
8393             """
8394             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
8395             aVec = self.MakeLine(aPoint,aDir)
8396             # note: auto-publishing is done in self.MultiRotate2D()
8397             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8398             return anObj
8399
8400         # end of l3_transform_d
8401         ## @}
8402
8403         ## @addtogroup l3_local
8404         ## @{
8405
8406         ## Perform a fillet on all edges of the given shape.
8407         #  @param theShape Shape, to perform fillet on.
8408         #  @param theR Fillet radius.
8409         #  @param theName Object name; when specified, this parameter is used
8410         #         for result publication in the study. Otherwise, if automatic
8411         #         publication is switched on, default value is used for result name.
8412         #
8413         #  @return New GEOM.GEOM_Object, containing the result shape.
8414         #
8415         #  @ref tui_fillet "Example 1"
8416         #  \n @ref swig_MakeFilletAll "Example 2"
8417         def MakeFilletAll(self, theShape, theR, theName=None):
8418             """
8419             Perform a fillet on all edges of the given shape.
8420
8421             Parameters:
8422                 theShape Shape, to perform fillet on.
8423                 theR Fillet radius.
8424                 theName Object name; when specified, this parameter is used
8425                         for result publication in the study. Otherwise, if automatic
8426                         publication is switched on, default value is used for result name.
8427
8428             Returns: 
8429                 New GEOM.GEOM_Object, containing the result shape.
8430
8431             Example of usage: 
8432                filletall = geompy.MakeFilletAll(prism, 10.)
8433             """
8434             # Example: see GEOM_TestOthers.py
8435             theR,Parameters = ParseParameters(theR)
8436             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
8437             RaiseIfFailed("MakeFilletAll", self.LocalOp)
8438             anObj.SetParameters(Parameters)
8439             self._autoPublish(anObj, theName, "fillet")
8440             return anObj
8441
8442         ## Perform a fillet on the specified edges/faces of the given shape
8443         #  @param theShape Shape, to perform fillet on.
8444         #  @param theR Fillet radius.
8445         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
8446         #  @param theListShapes Global indices of edges/faces to perform fillet on.
8447         #  @param theName Object name; when specified, this parameter is used
8448         #         for result publication in the study. Otherwise, if automatic
8449         #         publication is switched on, default value is used for result name.
8450         #
8451         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8452         #
8453         #  @return New GEOM.GEOM_Object, containing the result shape.
8454         #
8455         #  @ref tui_fillet "Example"
8456         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
8457             """
8458             Perform a fillet on the specified edges/faces of the given shape
8459
8460             Parameters:
8461                 theShape Shape, to perform fillet on.
8462                 theR Fillet radius.
8463                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
8464                 theListShapes Global indices of edges/faces to perform fillet on.
8465                 theName Object name; when specified, this parameter is used
8466                         for result publication in the study. Otherwise, if automatic
8467                         publication is switched on, default value is used for result name.
8468
8469             Note:
8470                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8471
8472             Returns: 
8473                 New GEOM.GEOM_Object, containing the result shape.
8474
8475             Example of usage:
8476                 # get the list of IDs (IDList) for the fillet
8477                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8478                 IDlist_e = []
8479                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8480                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8481                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8482                 # make a fillet on the specified edges of the given shape
8483                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
8484             """
8485             # Example: see GEOM_TestAll.py
8486             theR,Parameters = ParseParameters(theR)
8487             anObj = None
8488             if theShapeType == self.ShapeType["EDGE"]:
8489                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
8490                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
8491             else:
8492                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
8493                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
8494             anObj.SetParameters(Parameters)
8495             self._autoPublish(anObj, theName, "fillet")
8496             return anObj
8497
8498         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
8499         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
8500             """
8501             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
8502
8503             Example of usage:
8504                 # get the list of IDs (IDList) for the fillet
8505                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8506                 IDlist_e = []
8507                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8508                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8509                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8510                 # make a fillet on the specified edges of the given shape
8511                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
8512             """
8513             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
8514             anObj = None
8515             if theShapeType == self.ShapeType["EDGE"]:
8516                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
8517                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
8518             else:
8519                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
8520                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
8521             anObj.SetParameters(Parameters)
8522             self._autoPublish(anObj, theName, "fillet")
8523             return anObj
8524
8525         ## Perform a fillet on the specified edges of the given shape
8526         #  @param theShape  Wire Shape to perform fillet on.
8527         #  @param theR  Fillet radius.
8528         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8529         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
8530         #    \note The list of vertices could be empty,
8531         #          in this case fillet will done done at all vertices in wire
8532         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
8533         #         by the length of the edges, nearest to the fillet vertex.
8534         #         But sometimes the next edge is C1 continuous with the one, nearest to
8535         #         the fillet point, and such two (or more) edges can be united to allow
8536         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
8537         #         thus ignoring the secant vertex (vertices).
8538         #  @param theName Object name; when specified, this parameter is used
8539         #         for result publication in the study. Otherwise, if automatic
8540         #         publication is switched on, default value is used for result name.
8541         #
8542         #  @return New GEOM.GEOM_Object, containing the result shape.
8543         #
8544         #  @ref tui_fillet2d "Example"
8545         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
8546             """
8547             Perform a fillet on the specified edges of the given shape
8548
8549             Parameters:
8550                 theShape  Wire Shape to perform fillet on.
8551                 theR  Fillet radius.
8552                 theListOfVertexes Global indices of vertexes to perform fillet on.
8553                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
8554                     by the length of the edges, nearest to the fillet vertex.
8555                     But sometimes the next edge is C1 continuous with the one, nearest to
8556                     the fillet point, and such two (or more) edges can be united to allow
8557                     bigger radius. Set this flag to TRUE to allow collinear edges union,
8558                     thus ignoring the secant vertex (vertices).
8559                 theName Object name; when specified, this parameter is used
8560                         for result publication in the study. Otherwise, if automatic
8561                         publication is switched on, default value is used for result name.
8562             Note:
8563                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8564
8565                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
8566
8567             Returns: 
8568                 New GEOM.GEOM_Object, containing the result shape.
8569
8570             Example of usage:  
8571                 # create wire
8572                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
8573                 # make fillet at given wire vertices with giver radius
8574                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
8575             """
8576             # Example: see GEOM_TestAll.py
8577             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
8578             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
8579             RaiseIfFailed("MakeFillet1D", self.LocalOp)
8580             anObj.SetParameters(Parameters)
8581             self._autoPublish(anObj, theName, "fillet")
8582             return anObj
8583
8584         ## Perform a fillet at the specified vertices of the given face/shell.
8585         #  @param theShape Face or Shell shape to perform fillet on.
8586         #  @param theR Fillet radius.
8587         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8588         #  @param theName Object name; when specified, this parameter is used
8589         #         for result publication in the study. Otherwise, if automatic
8590         #         publication is switched on, default value is used for result name.
8591         #
8592         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8593         #
8594         #  @return New GEOM.GEOM_Object, containing the result shape.
8595         #
8596         #  @ref tui_fillet2d "Example"
8597         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
8598             """
8599             Perform a fillet at the specified vertices of the given face/shell.
8600
8601             Parameters:
8602                 theShape  Face or Shell shape to perform fillet on.
8603                 theR  Fillet radius.
8604                 theListOfVertexes Global indices of vertexes to perform fillet on.
8605                 theName Object name; when specified, this parameter is used
8606                         for result publication in the study. Otherwise, if automatic
8607                         publication is switched on, default value is used for result name.
8608             Note:
8609                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8610
8611             Returns: 
8612                 New GEOM.GEOM_Object, containing the result shape.
8613
8614             Example of usage:
8615                 face = geompy.MakeFaceHW(100, 100, 1)
8616                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
8617             """
8618             # Example: see GEOM_TestAll.py
8619             theR,Parameters = ParseParameters(theR)
8620             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
8621             RaiseIfFailed("MakeFillet2D", self.LocalOp)
8622             anObj.SetParameters(Parameters)
8623             self._autoPublish(anObj, theName, "fillet")
8624             return anObj
8625
8626         ## Perform a symmetric chamfer on all edges of the given shape.
8627         #  @param theShape Shape, to perform chamfer on.
8628         #  @param theD Chamfer size along each face.
8629         #  @param theName Object name; when specified, this parameter is used
8630         #         for result publication in the study. Otherwise, if automatic
8631         #         publication is switched on, default value is used for result name.
8632         #
8633         #  @return New GEOM.GEOM_Object, containing the result shape.
8634         #
8635         #  @ref tui_chamfer "Example 1"
8636         #  \n @ref swig_MakeChamferAll "Example 2"
8637         def MakeChamferAll(self, theShape, theD, theName=None):
8638             """
8639             Perform a symmetric chamfer on all edges of the given shape.
8640
8641             Parameters:
8642                 theShape Shape, to perform chamfer on.
8643                 theD Chamfer size along each face.
8644                 theName Object name; when specified, this parameter is used
8645                         for result publication in the study. Otherwise, if automatic
8646                         publication is switched on, default value is used for result name.
8647
8648             Returns:     
8649                 New GEOM.GEOM_Object, containing the result shape.
8650
8651             Example of usage:
8652                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
8653             """
8654             # Example: see GEOM_TestOthers.py
8655             theD,Parameters = ParseParameters(theD)
8656             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
8657             RaiseIfFailed("MakeChamferAll", self.LocalOp)
8658             anObj.SetParameters(Parameters)
8659             self._autoPublish(anObj, theName, "chamfer")
8660             return anObj
8661
8662         ## Perform a chamfer on edges, common to the specified faces,
8663         #  with distance D1 on the Face1
8664         #  @param theShape Shape, to perform chamfer on.
8665         #  @param theD1 Chamfer size along \a theFace1.
8666         #  @param theD2 Chamfer size along \a theFace2.
8667         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8668         #  @param theName Object name; when specified, this parameter is used
8669         #         for result publication in the study. Otherwise, if automatic
8670         #         publication is switched on, default value is used for result name.
8671         #
8672         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8673         #
8674         #  @return New GEOM.GEOM_Object, containing the result shape.
8675         #
8676         #  @ref tui_chamfer "Example"
8677         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
8678             """
8679             Perform a chamfer on edges, common to the specified faces,
8680             with distance D1 on the Face1
8681
8682             Parameters:
8683                 theShape Shape, to perform chamfer on.
8684                 theD1 Chamfer size along theFace1.
8685                 theD2 Chamfer size along theFace2.
8686                 theFace1,theFace2 Global indices of two faces of theShape.
8687                 theName Object name; when specified, this parameter is used
8688                         for result publication in the study. Otherwise, if automatic
8689                         publication is switched on, default value is used for result name.
8690
8691             Note:
8692                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8693
8694             Returns:      
8695                 New GEOM.GEOM_Object, containing the result shape.
8696
8697             Example of usage:
8698                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8699                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8700                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8701                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
8702             """
8703             # Example: see GEOM_TestAll.py
8704             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8705             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
8706             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
8707             anObj.SetParameters(Parameters)
8708             self._autoPublish(anObj, theName, "chamfer")
8709             return anObj
8710
8711         ## Perform a chamfer on edges
8712         #  @param theShape Shape, to perform chamfer on.
8713         #  @param theD Chamfer length
8714         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8715         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8716         #  @param theName Object name; when specified, this parameter is used
8717         #         for result publication in the study. Otherwise, if automatic
8718         #         publication is switched on, default value is used for result name.
8719         #
8720         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8721         #
8722         #  @return New GEOM.GEOM_Object, containing the result shape.
8723         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
8724             """
8725             Perform a chamfer on edges
8726
8727             Parameters:
8728                 theShape Shape, to perform chamfer on.
8729                 theD1 Chamfer size along theFace1.
8730                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
8731                 theFace1,theFace2 Global indices of two faces of theShape.
8732                 theName Object name; when specified, this parameter is used
8733                         for result publication in the study. Otherwise, if automatic
8734                         publication is switched on, default value is used for result name.
8735
8736             Note:
8737                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8738
8739             Returns:      
8740                 New GEOM.GEOM_Object, containing the result shape.
8741
8742             Example of usage:
8743                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8744                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8745                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8746                 ang = 30
8747                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
8748             """
8749             flag = False
8750             if isinstance(theAngle,str):
8751                 flag = True
8752             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8753             if flag:
8754                 theAngle = theAngle*math.pi/180.0
8755             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
8756             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
8757             anObj.SetParameters(Parameters)
8758             self._autoPublish(anObj, theName, "chamfer")
8759             return anObj
8760
8761         ## Perform a chamfer on all edges of the specified faces,
8762         #  with distance D1 on the first specified face (if several for one edge)
8763         #  @param theShape Shape, to perform chamfer on.
8764         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
8765         #               connected to the edge, are in \a theFaces, \a theD1
8766         #               will be get along face, which is nearer to \a theFaces beginning.
8767         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
8768         #  @param theFaces Sequence of global indices of faces of \a theShape.
8769         #  @param theName Object name; when specified, this parameter is used
8770         #         for result publication in the study. Otherwise, if automatic
8771         #         publication is switched on, default value is used for result name.
8772         #
8773         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8774         #
8775         #  @return New GEOM.GEOM_Object, containing the result shape.
8776         #
8777         #  @ref tui_chamfer "Example"
8778         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
8779             """
8780             Perform a chamfer on all edges of the specified faces,
8781             with distance D1 on the first specified face (if several for one edge)
8782
8783             Parameters:
8784                 theShape Shape, to perform chamfer on.
8785                 theD1 Chamfer size along face from  theFaces. If both faces,
8786                       connected to the edge, are in theFaces, theD1
8787                       will be get along face, which is nearer to theFaces beginning.
8788                 theD2 Chamfer size along another of two faces, connected to the edge.
8789                 theFaces Sequence of global indices of faces of theShape.
8790                 theName Object name; when specified, this parameter is used
8791                         for result publication in the study. Otherwise, if automatic
8792                         publication is switched on, default value is used for result name.
8793                 
8794             Note: 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: see GEOM_TestAll.py
8800             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8801             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
8802             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
8803             anObj.SetParameters(Parameters)
8804             self._autoPublish(anObj, theName, "chamfer")
8805             return anObj
8806
8807         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
8808         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8809         #
8810         #  @ref swig_FilletChamfer "Example"
8811         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
8812             """
8813             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
8814             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8815             """
8816             flag = False
8817             if isinstance(theAngle,str):
8818                 flag = True
8819             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8820             if flag:
8821                 theAngle = theAngle*math.pi/180.0
8822             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
8823             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
8824             anObj.SetParameters(Parameters)
8825             self._autoPublish(anObj, theName, "chamfer")
8826             return anObj
8827
8828         ## Perform a chamfer on edges,
8829         #  with distance D1 on the first specified face (if several for one edge)
8830         #  @param theShape Shape, to perform chamfer on.
8831         #  @param theD1,theD2 Chamfer size
8832         #  @param theEdges Sequence of edges of \a theShape.
8833         #  @param theName Object name; when specified, this parameter is used
8834         #         for result publication in the study. Otherwise, if automatic
8835         #         publication is switched on, default value is used for result name.
8836         #
8837         #  @return New GEOM.GEOM_Object, containing the result shape.
8838         #
8839         #  @ref swig_FilletChamfer "Example"
8840         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
8841             """
8842             Perform a chamfer on edges,
8843             with distance D1 on the first specified face (if several for one edge)
8844             
8845             Parameters:
8846                 theShape Shape, to perform chamfer on.
8847                 theD1,theD2 Chamfer size
8848                 theEdges Sequence of edges of theShape.
8849                 theName Object name; when specified, this parameter is used
8850                         for result publication in the study. Otherwise, if automatic
8851                         publication is switched on, default value is used for result name.
8852
8853             Returns:
8854                 New GEOM.GEOM_Object, containing the result shape.
8855             """
8856             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8857             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
8858             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
8859             anObj.SetParameters(Parameters)
8860             self._autoPublish(anObj, theName, "chamfer")
8861             return anObj
8862
8863         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
8864         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8865         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
8866             """
8867             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
8868             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8869             """
8870             flag = False
8871             if isinstance(theAngle,str):
8872                 flag = True
8873             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8874             if flag:
8875                 theAngle = theAngle*math.pi/180.0
8876             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
8877             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
8878             anObj.SetParameters(Parameters)
8879             self._autoPublish(anObj, theName, "chamfer")
8880             return anObj
8881
8882         ## @sa MakeChamferEdge(), MakeChamferFaces()
8883         #
8884         #  @ref swig_MakeChamfer "Example"
8885         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
8886             """
8887             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
8888             """
8889             # Example: see GEOM_TestOthers.py
8890             anObj = None
8891             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
8892             if aShapeType == self.ShapeType["EDGE"]:
8893                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
8894             else:
8895                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
8896             return anObj
8897             
8898         ## Remove material from a solid by extrusion of the base shape on the given distance.
8899         #  @param theInit Shape to remove material from. It must be a solid or 
8900         #  a compound made of a single solid.
8901         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8902         #  @param theH Prism dimension along the normal to theBase
8903         #  @param theAngle Draft angle in degrees.
8904         #  @param theName Object name; when specified, this parameter is used
8905         #         for result publication in the study. Otherwise, if automatic
8906         #         publication is switched on, default value is used for result name.
8907         #
8908         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
8909         #
8910         #  @ref tui_creation_prism "Example"
8911         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
8912             """
8913             Add material to a solid by extrusion of the base shape on the given distance.
8914
8915             Parameters:
8916                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
8917                 theBase Closed edge or wire defining the base shape to be extruded.
8918                 theH Prism dimension along the normal  to theBase
8919                 theAngle Draft angle in degrees.
8920                 theName Object name; when specified, this parameter is used
8921                         for result publication in the study. Otherwise, if automatic
8922                         publication is switched on, default value is used for result name.
8923
8924             Returns:
8925                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
8926             """
8927             # Example: see GEOM_TestAll.py
8928             #theH,Parameters = ParseParameters(theH)
8929             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
8930             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8931             #anObj.SetParameters(Parameters)
8932             self._autoPublish(anObj, theName, "extrudedCut")
8933             return anObj   
8934             
8935         ## Add material to a solid by extrusion of the base shape on the given distance.
8936         #  @param theInit Shape to add material to. It must be a solid or 
8937         #  a compound made of a single solid.
8938         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8939         #  @param theH Prism dimension along the normal to theBase
8940         #  @param theAngle Draft angle in degrees.
8941         #  @param theName Object name; when specified, this parameter is used
8942         #         for result publication in the study. Otherwise, if automatic
8943         #         publication is switched on, default value is used for result name.
8944         #
8945         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
8946         #
8947         #  @ref tui_creation_prism "Example"
8948         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
8949             """
8950             Add material to a solid by extrusion of the base shape on the given distance.
8951
8952             Parameters:
8953                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
8954                 theBase Closed edge or wire defining the base shape to be extruded.
8955                 theH Prism dimension along the normal  to theBase
8956                 theAngle Draft angle in degrees.
8957                 theName Object name; when specified, this parameter is used
8958                         for result publication in the study. Otherwise, if automatic
8959                         publication is switched on, default value is used for result name.
8960
8961             Returns:
8962                 New GEOM.GEOM_Object,  containing the initial shape with added material.
8963             """
8964             # Example: see GEOM_TestAll.py
8965             #theH,Parameters = ParseParameters(theH)
8966             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
8967             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8968             #anObj.SetParameters(Parameters)
8969             self._autoPublish(anObj, theName, "extrudedBoss")
8970             return anObj   
8971
8972         # end of l3_local
8973         ## @}
8974
8975         ## @addtogroup l3_basic_op
8976         ## @{
8977
8978         ## Perform an Archimde operation on the given shape with given parameters.
8979         #  The object presenting the resulting face is returned.
8980         #  @param theShape Shape to be put in water.
8981         #  @param theWeight Weight og the shape.
8982         #  @param theWaterDensity Density of the water.
8983         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
8984         #  @param theName Object name; when specified, this parameter is used
8985         #         for result publication in the study. Otherwise, if automatic
8986         #         publication is switched on, default value is used for result name.
8987         #
8988         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
8989         #          by a plane, corresponding to water level.
8990         #
8991         #  @ref tui_archimede "Example"
8992         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
8993             """
8994             Perform an Archimde operation on the given shape with given parameters.
8995             The object presenting the resulting face is returned.
8996
8997             Parameters: 
8998                 theShape Shape to be put in water.
8999                 theWeight Weight og the shape.
9000                 theWaterDensity Density of the water.
9001                 theMeshDeflection Deflection of the mesh, using to compute the section.
9002                 theName Object name; when specified, this parameter is used
9003                         for result publication in the study. Otherwise, if automatic
9004                         publication is switched on, default value is used for result name.
9005
9006             Returns: 
9007                 New GEOM.GEOM_Object, containing a section of theShape
9008                 by a plane, corresponding to water level.
9009             """
9010             # Example: see GEOM_TestAll.py
9011             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
9012               theWeight,theWaterDensity,theMeshDeflection)
9013             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
9014             RaiseIfFailed("MakeArchimede", self.LocalOp)
9015             anObj.SetParameters(Parameters)
9016             self._autoPublish(anObj, theName, "archimede")
9017             return anObj
9018
9019         # end of l3_basic_op
9020         ## @}
9021
9022         ## @addtogroup l2_measure
9023         ## @{
9024
9025         ## Get point coordinates
9026         #  @return [x, y, z]
9027         #
9028         #  @ref tui_measurement_tools_page "Example"
9029         def PointCoordinates(self,Point):
9030             """
9031             Get point coordinates
9032
9033             Returns:
9034                 [x, y, z]
9035             """
9036             # Example: see GEOM_TestMeasures.py
9037             aTuple = self.MeasuOp.PointCoordinates(Point)
9038             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9039             return aTuple 
9040         
9041         ## Get vector coordinates
9042         #  @return [x, y, z]
9043         #
9044         #  @ref tui_measurement_tools_page "Example"
9045         def VectorCoordinates(self,Vector):
9046             """
9047             Get vector coordinates
9048
9049             Returns:
9050                 [x, y, z]
9051             """
9052
9053             p1=self.GetFirstVertex(Vector)
9054             p2=self.GetLastVertex(Vector)
9055             
9056             X1=self.PointCoordinates(p1)
9057             X2=self.PointCoordinates(p2)
9058
9059             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9060
9061
9062         ## Compute cross product
9063         #  @return vector w=u^v
9064         #
9065         #  @ref tui_measurement_tools_page "Example"
9066         def CrossProduct(self, Vector1, Vector2):
9067             """ 
9068             Compute cross product
9069             
9070             Returns: vector w=u^v
9071             """
9072             u=self.VectorCoordinates(Vector1)
9073             v=self.VectorCoordinates(Vector2)
9074             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])
9075             
9076             return w
9077         
9078         ## Compute cross product
9079         #  @return dot product  p=u.v
9080         #
9081         #  @ref tui_measurement_tools_page "Example"
9082         def DotProduct(self, Vector1, Vector2):
9083             """ 
9084             Compute cross product
9085             
9086             Returns: dot product  p=u.v
9087             """
9088             u=self.VectorCoordinates(Vector1)
9089             v=self.VectorCoordinates(Vector2)
9090             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9091             
9092             return p
9093
9094
9095         ## Get summarized length of all wires,
9096         #  area of surface and volume of the given shape.
9097         #  @param theShape Shape to define properties of.
9098         #  @return [theLength, theSurfArea, theVolume]\n
9099         #  theLength:   Summarized length of all wires of the given shape.\n
9100         #  theSurfArea: Area of surface of the given shape.\n
9101         #  theVolume:   Volume of the given shape.
9102         #
9103         #  @ref tui_measurement_tools_page "Example"
9104         def BasicProperties(self,theShape):
9105             """
9106             Get summarized length of all wires,
9107             area of surface and volume of the given shape.
9108
9109             Parameters: 
9110                 theShape Shape to define properties of.
9111
9112             Returns:
9113                 [theLength, theSurfArea, theVolume]
9114                  theLength:   Summarized length of all wires of the given shape.
9115                  theSurfArea: Area of surface of the given shape.
9116                  theVolume:   Volume of the given shape.
9117             """
9118             # Example: see GEOM_TestMeasures.py
9119             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9120             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9121             return aTuple
9122
9123         ## Get parameters of bounding box of the given shape
9124         #  @param theShape Shape to obtain bounding box of.
9125         #  @param precise TRUE for precise computation; FALSE for fast one.
9126         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9127         #  Xmin,Xmax: Limits of shape along OX axis.
9128         #  Ymin,Ymax: Limits of shape along OY axis.
9129         #  Zmin,Zmax: Limits of shape along OZ axis.
9130         #
9131         #  @ref tui_measurement_tools_page "Example"
9132         def BoundingBox (self, theShape, precise=False):
9133             """
9134             Get parameters of bounding box of the given shape
9135
9136             Parameters: 
9137                 theShape Shape to obtain bounding box of.
9138                 precise TRUE for precise computation; FALSE for fast one.
9139
9140             Returns:
9141                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9142                  Xmin,Xmax: Limits of shape along OX axis.
9143                  Ymin,Ymax: Limits of shape along OY axis.
9144                  Zmin,Zmax: Limits of shape along OZ axis.
9145             """
9146             # Example: see GEOM_TestMeasures.py
9147             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9148             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9149             return aTuple
9150
9151         ## Get bounding box of the given shape
9152         #  @param theShape Shape to obtain bounding box of.
9153         #  @param precise TRUE for precise computation; FALSE for fast one.
9154         #  @param theName Object name; when specified, this parameter is used
9155         #         for result publication in the study. Otherwise, if automatic
9156         #         publication is switched on, default value is used for result name.
9157         #
9158         #  @return New GEOM.GEOM_Object, containing the created box.
9159         #
9160         #  @ref tui_measurement_tools_page "Example"
9161         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9162             """
9163             Get bounding box of the given shape
9164
9165             Parameters: 
9166                 theShape Shape to obtain bounding box of.
9167                 precise TRUE for precise computation; FALSE for fast one.
9168                 theName Object name; when specified, this parameter is used
9169                         for result publication in the study. Otherwise, if automatic
9170                         publication is switched on, default value is used for result name.
9171
9172             Returns:
9173                 New GEOM.GEOM_Object, containing the created box.
9174             """
9175             # Example: see GEOM_TestMeasures.py
9176             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9177             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9178             self._autoPublish(anObj, theName, "bndbox")
9179             return anObj
9180
9181         ## Get inertia matrix and moments of inertia of theShape.
9182         #  @param theShape Shape to calculate inertia of.
9183         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9184         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9185         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9186         #
9187         #  @ref tui_measurement_tools_page "Example"
9188         def Inertia(self,theShape):
9189             """
9190             Get inertia matrix and moments of inertia of theShape.
9191
9192             Parameters: 
9193                 theShape Shape to calculate inertia of.
9194
9195             Returns:
9196                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9197                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9198                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9199             """
9200             # Example: see GEOM_TestMeasures.py
9201             aTuple = self.MeasuOp.GetInertia(theShape)
9202             RaiseIfFailed("GetInertia", self.MeasuOp)
9203             return aTuple
9204
9205         ## Get if coords are included in the shape (ST_IN or ST_ON)
9206         #  @param theShape Shape
9207         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9208         #  @param tolerance to be used (default is 1.0e-7)
9209         #  @return list_of_boolean = [res1, res2, ...]
9210         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9211             """
9212             Get if coords are included in the shape (ST_IN or ST_ON)
9213             
9214             Parameters: 
9215                 theShape Shape
9216                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9217                 tolerance to be used (default is 1.0e-7)
9218
9219             Returns:
9220                 list_of_boolean = [res1, res2, ...]
9221             """
9222             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9223
9224         ## Get minimal distance between the given shapes.
9225         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9226         #  @return Value of the minimal distance between the given shapes.
9227         #
9228         #  @ref tui_measurement_tools_page "Example"
9229         def MinDistance(self, theShape1, theShape2):
9230             """
9231             Get minimal distance between the given shapes.
9232             
9233             Parameters: 
9234                 theShape1,theShape2 Shapes to find minimal distance between.
9235
9236             Returns:    
9237                 Value of the minimal distance between the given shapes.
9238             """
9239             # Example: see GEOM_TestMeasures.py
9240             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9241             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9242             return aTuple[0]
9243
9244         ## Get minimal distance between the given shapes.
9245         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9246         #  @return Value of the minimal distance between the given shapes, in form of list
9247         #          [Distance, DX, DY, DZ].
9248         #
9249         #  @ref swig_all_measure "Example"
9250         def MinDistanceComponents(self, theShape1, theShape2):
9251             """
9252             Get minimal distance between the given shapes.
9253
9254             Parameters: 
9255                 theShape1,theShape2 Shapes to find minimal distance between.
9256
9257             Returns:  
9258                 Value of the minimal distance between the given shapes, in form of list
9259                 [Distance, DX, DY, DZ]
9260             """
9261             # Example: see GEOM_TestMeasures.py
9262             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9263             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9264             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9265             return aRes
9266
9267         ## Get closest points of the given shapes.
9268         #  @param theShape1,theShape2 Shapes to find closest points of.
9269         #  @return The number of found solutions (-1 in case of infinite number of
9270         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9271         #
9272         #  @ref tui_measurement_tools_page "Example"
9273         def ClosestPoints (self, theShape1, theShape2):
9274             """
9275             Get closest points of the given shapes.
9276
9277             Parameters: 
9278                 theShape1,theShape2 Shapes to find closest points of.
9279
9280             Returns:    
9281                 The number of found solutions (-1 in case of infinite number of
9282                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9283             """
9284             # Example: see GEOM_TestMeasures.py
9285             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9286             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9287             return aTuple
9288
9289         ## Get angle between the given shapes in degrees.
9290         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9291         #  @note If both arguments are vectors, the angle is computed in accordance
9292         #        with their orientations, otherwise the minimum angle is computed.
9293         #  @return Value of the angle between the given shapes in degrees.
9294         #
9295         #  @ref tui_measurement_tools_page "Example"
9296         def GetAngle(self, theShape1, theShape2):
9297             """
9298             Get angle between the given shapes in degrees.
9299
9300             Parameters: 
9301                 theShape1,theShape2 Lines or linear edges to find angle between.
9302
9303             Note:
9304                 If both arguments are vectors, the angle is computed in accordance
9305                 with their orientations, otherwise the minimum angle is computed.
9306
9307             Returns:  
9308                 Value of the angle between the given shapes in degrees.
9309             """
9310             # Example: see GEOM_TestMeasures.py
9311             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
9312             RaiseIfFailed("GetAngle", self.MeasuOp)
9313             return anAngle
9314
9315         ## Get angle between the given shapes in radians.
9316         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9317         #  @note If both arguments are vectors, the angle is computed in accordance
9318         #        with their orientations, otherwise the minimum angle is computed.
9319         #  @return Value of the angle between the given shapes in radians.
9320         #
9321         #  @ref tui_measurement_tools_page "Example"
9322         def GetAngleRadians(self, theShape1, theShape2):
9323             """
9324             Get angle between the given shapes in radians.
9325
9326             Parameters: 
9327                 theShape1,theShape2 Lines or linear edges to find angle between.
9328
9329                 
9330             Note:
9331                 If both arguments are vectors, the angle is computed in accordance
9332                 with their orientations, otherwise the minimum angle is computed.
9333
9334             Returns:  
9335                 Value of the angle between the given shapes in radians.
9336             """
9337             # Example: see GEOM_TestMeasures.py
9338             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
9339             RaiseIfFailed("GetAngle", self.MeasuOp)
9340             return anAngle
9341
9342         ## Get angle between the given vectors in degrees.
9343         #  @param theShape1,theShape2 Vectors to find angle between.
9344         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
9345         #                 if False, the opposite vector to the normal vector is used.
9346         #  @return Value of the angle between the given vectors in degrees.
9347         #
9348         #  @ref tui_measurement_tools_page "Example"
9349         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
9350             """
9351             Get angle between the given vectors in degrees.
9352
9353             Parameters: 
9354                 theShape1,theShape2 Vectors to find angle between.
9355                 theFlag If True, the normal vector is defined by the two vectors cross,
9356                         if False, the opposite vector to the normal vector is used.
9357
9358             Returns:  
9359                 Value of the angle between the given vectors in degrees.
9360             """
9361             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
9362             if not theFlag:
9363                 anAngle = 360. - anAngle
9364             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
9365             return anAngle
9366
9367         ## The same as GetAngleVectors, but the result is in radians.
9368         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
9369             """
9370             Get angle between the given vectors in radians.
9371
9372             Parameters: 
9373                 theShape1,theShape2 Vectors to find angle between.
9374                 theFlag If True, the normal vector is defined by the two vectors cross,
9375                         if False, the opposite vector to the normal vector is used.
9376
9377             Returns:  
9378                 Value of the angle between the given vectors in radians.
9379             """
9380             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
9381             return anAngle
9382
9383         ## @name Curve Curvature Measurement
9384         #  Methods for receiving radius of curvature of curves
9385         #  in the given point
9386         ## @{
9387
9388         ## Measure curvature of a curve at a point, set by parameter.
9389         #  @param theCurve a curve.
9390         #  @param theParam parameter.
9391         #  @return radius of curvature of \a theCurve.
9392         #
9393         #  @ref swig_todo "Example"
9394         def CurveCurvatureByParam(self, theCurve, theParam):
9395             """
9396             Measure curvature of a curve at a point, set by parameter.
9397
9398             Parameters: 
9399                 theCurve a curve.
9400                 theParam parameter.
9401
9402             Returns: 
9403                 radius of curvature of theCurve.
9404             """
9405             # Example: see GEOM_TestMeasures.py
9406             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
9407             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
9408             return aCurv
9409
9410         ## Measure curvature of a curve at a point.
9411         #  @param theCurve a curve.
9412         #  @param thePoint given point.
9413         #  @return radius of curvature of \a theCurve.
9414         #
9415         #  @ref swig_todo "Example"
9416         def CurveCurvatureByPoint(self, theCurve, thePoint):
9417             """
9418             Measure curvature of a curve at a point.
9419
9420             Parameters: 
9421                 theCurve a curve.
9422                 thePoint given point.
9423
9424             Returns: 
9425                 radius of curvature of theCurve.           
9426             """
9427             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
9428             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
9429             return aCurv
9430         ## @}
9431
9432         ## @name Surface Curvature Measurement
9433         #  Methods for receiving max and min radius of curvature of surfaces
9434         #  in the given point
9435         ## @{
9436
9437         ## Measure max radius of curvature of surface.
9438         #  @param theSurf the given surface.
9439         #  @param theUParam Value of U-parameter on the referenced surface.
9440         #  @param theVParam Value of V-parameter on the referenced surface.
9441         #  @return max radius of curvature of theSurf.
9442         #
9443         ## @ref swig_todo "Example"
9444         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9445             """
9446             Measure max radius of curvature of surface.
9447
9448             Parameters: 
9449                 theSurf the given surface.
9450                 theUParam Value of U-parameter on the referenced surface.
9451                 theVParam Value of V-parameter on the referenced surface.
9452                 
9453             Returns:     
9454                 max radius of curvature of theSurf.
9455             """
9456             # Example: see GEOM_TestMeasures.py
9457             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9458             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
9459             return aSurf
9460
9461         ## Measure max radius of curvature of surface in the given point
9462         #  @param theSurf the given surface.
9463         #  @param thePoint given point.
9464         #  @return max radius of curvature of theSurf.
9465         #
9466         ## @ref swig_todo "Example"
9467         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
9468             """
9469             Measure max radius of curvature of surface in the given point.
9470
9471             Parameters: 
9472                 theSurf the given surface.
9473                 thePoint given point.
9474                 
9475             Returns:     
9476                 max radius of curvature of theSurf.          
9477             """
9478             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
9479             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
9480             return aSurf
9481
9482         ## Measure min radius of curvature of surface.
9483         #  @param theSurf the given surface.
9484         #  @param theUParam Value of U-parameter on the referenced surface.
9485         #  @param theVParam Value of V-parameter on the referenced surface.
9486         #  @return min radius of curvature of theSurf.
9487         #   
9488         ## @ref swig_todo "Example"
9489         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9490             """
9491             Measure min radius of curvature of surface.
9492
9493             Parameters: 
9494                 theSurf the given surface.
9495                 theUParam Value of U-parameter on the referenced surface.
9496                 theVParam Value of V-parameter on the referenced surface.
9497                 
9498             Returns:     
9499                 Min radius of curvature of theSurf.
9500             """
9501             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9502             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
9503             return aSurf
9504
9505         ## Measure min radius of curvature of surface in the given point
9506         #  @param theSurf the given surface.
9507         #  @param thePoint given point.
9508         #  @return min radius of curvature of theSurf.
9509         #
9510         ## @ref swig_todo "Example"
9511         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
9512             """
9513             Measure min radius of curvature of surface in the given point.
9514
9515             Parameters: 
9516                 theSurf the given surface.
9517                 thePoint given point.
9518                 
9519             Returns:     
9520                 Min radius of curvature of theSurf.          
9521             """
9522             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
9523             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
9524             return aSurf
9525         ## @}
9526
9527         ## Get min and max tolerances of sub-shapes of theShape
9528         #  @param theShape Shape, to get tolerances of.
9529         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
9530         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
9531         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
9532         #  VertMin,VertMax: Min and max tolerances of the vertices.
9533         #
9534         #  @ref tui_measurement_tools_page "Example"
9535         def Tolerance(self,theShape):
9536             """
9537             Get min and max tolerances of sub-shapes of theShape
9538
9539             Parameters: 
9540                 theShape Shape, to get tolerances of.
9541
9542             Returns:    
9543                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
9544                  FaceMin,FaceMax: Min and max tolerances of the faces.
9545                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
9546                  VertMin,VertMax: Min and max tolerances of the vertices.
9547             """
9548             # Example: see GEOM_TestMeasures.py
9549             aTuple = self.MeasuOp.GetTolerance(theShape)
9550             RaiseIfFailed("GetTolerance", self.MeasuOp)
9551             return aTuple
9552
9553         ## Obtain description of the given shape (number of sub-shapes of each type)
9554         #  @param theShape Shape to be described.
9555         #  @return Description of the given shape.
9556         #
9557         #  @ref tui_measurement_tools_page "Example"
9558         def WhatIs(self,theShape):
9559             """
9560             Obtain description of the given shape (number of sub-shapes of each type)
9561
9562             Parameters:
9563                 theShape Shape to be described.
9564
9565             Returns:
9566                 Description of the given shape.
9567             """
9568             # Example: see GEOM_TestMeasures.py
9569             aDescr = self.MeasuOp.WhatIs(theShape)
9570             RaiseIfFailed("WhatIs", self.MeasuOp)
9571             return aDescr
9572
9573         ## Obtain quantity of shapes of the given type in \a theShape.
9574         #  If \a theShape is of type \a theType, it is also counted.
9575         #  @param theShape Shape to be described.
9576         #  @param theType the given ShapeType().
9577         #  @return Quantity of shapes of type \a theType in \a theShape.
9578         #
9579         #  @ref tui_measurement_tools_page "Example"
9580         def NbShapes (self, theShape, theType):
9581             """
9582             Obtain quantity of shapes of the given type in theShape.
9583             If theShape is of type theType, it is also counted.
9584
9585             Parameters:
9586                 theShape Shape to be described.
9587                 theType the given geompy.ShapeType
9588
9589             Returns:
9590                 Quantity of shapes of type theType in theShape.
9591             """
9592             # Example: see GEOM_TestMeasures.py
9593             listSh = self.SubShapeAllIDs(theShape, theType)
9594             Nb = len(listSh)
9595             t       = EnumToLong(theShape.GetShapeType())
9596             theType = EnumToLong(theType)
9597             if t == theType:
9598                 Nb = Nb + 1
9599                 pass
9600             return Nb
9601
9602         ## Obtain quantity of shapes of each type in \a theShape.
9603         #  The \a theShape is also counted.
9604         #  @param theShape Shape to be described.
9605         #  @return Dictionary of ShapeType() with bound quantities of shapes.
9606         #
9607         #  @ref tui_measurement_tools_page "Example"
9608         def ShapeInfo (self, theShape):
9609             """
9610             Obtain quantity of shapes of each type in theShape.
9611             The theShape is also counted.
9612
9613             Parameters:
9614                 theShape Shape to be described.
9615
9616             Returns:
9617                 Dictionary of geompy.ShapeType with bound quantities of shapes.
9618             """
9619             # Example: see GEOM_TestMeasures.py
9620             aDict = {}
9621             for typeSh in self.ShapeType:
9622                 if typeSh in ( "AUTO", "SHAPE" ): continue
9623                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
9624                 Nb = len(listSh)
9625                 if EnumToLong(theShape.GetShapeType()) == self.ShapeType[typeSh]:
9626                     Nb = Nb + 1
9627                     pass
9628                 aDict[typeSh] = Nb
9629                 pass
9630             return aDict
9631
9632         def GetCreationInformation(self, theShape):
9633             info = theShape.GetCreationInformation()
9634             # operationName
9635             opName = info.operationName
9636             if not opName: opName = "no info available"
9637             res = "Operation: " + opName
9638             # parameters
9639             for parVal in info.params:
9640                 res += " \n %s = %s" % ( parVal.name, parVal.value )
9641             return res
9642
9643         ## Get a point, situated at the centre of mass of theShape.
9644         #  @param theShape Shape to define centre of mass of.
9645         #  @param theName Object name; when specified, this parameter is used
9646         #         for result publication in the study. Otherwise, if automatic
9647         #         publication is switched on, default value is used for result name.
9648         #
9649         #  @return New GEOM.GEOM_Object, containing the created point.
9650         #
9651         #  @ref tui_measurement_tools_page "Example"
9652         def MakeCDG(self, theShape, theName=None):
9653             """
9654             Get a point, situated at the centre of mass of theShape.
9655
9656             Parameters:
9657                 theShape Shape to define centre of mass of.
9658                 theName Object name; when specified, this parameter is used
9659                         for result publication in the study. Otherwise, if automatic
9660                         publication is switched on, default value is used for result name.
9661
9662             Returns:
9663                 New GEOM.GEOM_Object, containing the created point.
9664             """
9665             # Example: see GEOM_TestMeasures.py
9666             anObj = self.MeasuOp.GetCentreOfMass(theShape)
9667             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
9668             self._autoPublish(anObj, theName, "centerOfMass")
9669             return anObj
9670
9671         ## Get a vertex sub-shape by index depended with orientation.
9672         #  @param theShape Shape to find sub-shape.
9673         #  @param theIndex Index to find vertex by this index (starting from zero)
9674         #  @param theName Object name; when specified, this parameter is used
9675         #         for result publication in the study. Otherwise, if automatic
9676         #         publication is switched on, default value is used for result name.
9677         #
9678         #  @return New GEOM.GEOM_Object, containing the created vertex.
9679         #
9680         #  @ref tui_measurement_tools_page "Example"
9681         def GetVertexByIndex(self, theShape, theIndex, theName=None):
9682             """
9683             Get a vertex sub-shape by index depended with orientation.
9684
9685             Parameters:
9686                 theShape Shape to find sub-shape.
9687                 theIndex Index to find vertex by this index (starting from zero)
9688                 theName Object name; when specified, this parameter is used
9689                         for result publication in the study. Otherwise, if automatic
9690                         publication is switched on, default value is used for result name.
9691
9692             Returns:
9693                 New GEOM.GEOM_Object, containing the created vertex.
9694             """
9695             # Example: see GEOM_TestMeasures.py
9696             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
9697             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
9698             self._autoPublish(anObj, theName, "vertex")
9699             return anObj
9700
9701         ## Get the first vertex of wire/edge depended orientation.
9702         #  @param theShape Shape to find first vertex.
9703         #  @param theName Object name; when specified, this parameter is used
9704         #         for result publication in the study. Otherwise, if automatic
9705         #         publication is switched on, default value is used for result name.
9706         #
9707         #  @return New GEOM.GEOM_Object, containing the created vertex.
9708         #
9709         #  @ref tui_measurement_tools_page "Example"
9710         def GetFirstVertex(self, theShape, theName=None):
9711             """
9712             Get the first vertex of wire/edge depended orientation.
9713
9714             Parameters:
9715                 theShape Shape to find first vertex.
9716                 theName Object name; when specified, this parameter is used
9717                         for result publication in the study. Otherwise, if automatic
9718                         publication is switched on, default value is used for result name.
9719
9720             Returns:    
9721                 New GEOM.GEOM_Object, containing the created vertex.
9722             """
9723             # Example: see GEOM_TestMeasures.py
9724             # note: auto-publishing is done in self.GetVertexByIndex()
9725             anObj = self.GetVertexByIndex(theShape, 0, theName)
9726             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
9727             return anObj
9728
9729         ## Get the last vertex of wire/edge depended orientation.
9730         #  @param theShape Shape to find last vertex.
9731         #  @param theName Object name; when specified, this parameter is used
9732         #         for result publication in the study. Otherwise, if automatic
9733         #         publication is switched on, default value is used for result name.
9734         #
9735         #  @return New GEOM.GEOM_Object, containing the created vertex.
9736         #
9737         #  @ref tui_measurement_tools_page "Example"
9738         def GetLastVertex(self, theShape, theName=None):
9739             """
9740             Get the last vertex of wire/edge depended orientation.
9741
9742             Parameters: 
9743                 theShape Shape to find last vertex.
9744                 theName Object name; when specified, this parameter is used
9745                         for result publication in the study. Otherwise, if automatic
9746                         publication is switched on, default value is used for result name.
9747
9748             Returns:   
9749                 New GEOM.GEOM_Object, containing the created vertex.
9750             """
9751             # Example: see GEOM_TestMeasures.py
9752             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
9753             # note: auto-publishing is done in self.GetVertexByIndex()
9754             anObj = self.GetVertexByIndex(theShape, (nb_vert-1), theName)
9755             RaiseIfFailed("GetLastVertex", self.MeasuOp)
9756             return anObj
9757
9758         ## Get a normale to the given face. If the point is not given,
9759         #  the normale is calculated at the center of mass.
9760         #  @param theFace Face to define normale of.
9761         #  @param theOptionalPoint Point to compute the normale at.
9762         #  @param theName Object name; when specified, this parameter is used
9763         #         for result publication in the study. Otherwise, if automatic
9764         #         publication is switched on, default value is used for result name.
9765         #
9766         #  @return New GEOM.GEOM_Object, containing the created vector.
9767         #
9768         #  @ref swig_todo "Example"
9769         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
9770             """
9771             Get a normale to the given face. If the point is not given,
9772             the normale is calculated at the center of mass.
9773             
9774             Parameters: 
9775                 theFace Face to define normale of.
9776                 theOptionalPoint Point to compute the normale at.
9777                 theName Object name; when specified, this parameter is used
9778                         for result publication in the study. Otherwise, if automatic
9779                         publication is switched on, default value is used for result name.
9780
9781             Returns:   
9782                 New GEOM.GEOM_Object, containing the created vector.
9783             """
9784             # Example: see GEOM_TestMeasures.py
9785             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
9786             RaiseIfFailed("GetNormal", self.MeasuOp)
9787             self._autoPublish(anObj, theName, "normal")
9788             return anObj
9789
9790         ## Check a topology of the given shape.
9791         #  @param theShape Shape to check validity of.
9792         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
9793         #                        if TRUE, the shape's geometry will be checked also.
9794         #  @param theReturnStatus If FALSE and if theShape is invalid, a description \n
9795         #                        of problem is printed.
9796         #                        if TRUE and if theShape is invalid, the description 
9797         #                        of problem is also returned.
9798         #  @return TRUE, if the shape "seems to be valid".
9799         #
9800         #  @ref tui_measurement_tools_page "Example"
9801         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
9802             """
9803             Check a topology of the given shape.
9804
9805             Parameters: 
9806                 theShape Shape to check validity of.
9807                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
9808                                if TRUE, the shape's geometry will be checked also.
9809                 theReturnStatus If FALSE and if theShape is invalid, a description
9810                                 of problem is printed.
9811                                 if TRUE and if theShape is invalid, the description 
9812                                 of problem is returned.
9813
9814             Returns:   
9815                 TRUE, if the shape "seems to be valid".
9816                 If theShape is invalid, prints a description of problem.
9817                 This description can also be returned.
9818             """
9819             # Example: see GEOM_TestMeasures.py
9820             if theIsCheckGeom:
9821                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
9822                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
9823             else:
9824                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
9825                 RaiseIfFailed("CheckShape", self.MeasuOp)
9826             if IsValid == 0:
9827                 if theReturnStatus == 0:
9828                     print Status
9829             if theReturnStatus == 1:
9830               return (IsValid, Status)
9831             return IsValid
9832
9833         ## Detect self-intersections in the given shape.
9834         #  @param theShape Shape to check.
9835         #  @return TRUE, if the shape contains no self-intersections.
9836         #
9837         #  @ref tui_measurement_tools_page "Example"
9838         def CheckSelfIntersections(self, theShape):
9839             """
9840             Detect self-intersections in the given shape.
9841
9842             Parameters: 
9843                 theShape Shape to check.
9844
9845             Returns:   
9846                 TRUE, if the shape contains no self-intersections.
9847             """
9848             # Example: see GEOM_TestMeasures.py
9849             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
9850             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
9851             return IsValid
9852
9853         ## Get position (LCS) of theShape.
9854         #
9855         #  Origin of the LCS is situated at the shape's center of mass.
9856         #  Axes of the LCS are obtained from shape's location or,
9857         #  if the shape is a planar face, from position of its plane.
9858         #
9859         #  @param theShape Shape to calculate position of.
9860         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9861         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
9862         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9863         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9864         #
9865         #  @ref swig_todo "Example"
9866         def GetPosition(self,theShape):
9867             """
9868             Get position (LCS) of theShape.
9869             Origin of the LCS is situated at the shape's center of mass.
9870             Axes of the LCS are obtained from shape's location or,
9871             if the shape is a planar face, from position of its plane.
9872
9873             Parameters: 
9874                 theShape Shape to calculate position of.
9875
9876             Returns:  
9877                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9878                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
9879                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9880                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9881             """
9882             # Example: see GEOM_TestMeasures.py
9883             aTuple = self.MeasuOp.GetPosition(theShape)
9884             RaiseIfFailed("GetPosition", self.MeasuOp)
9885             return aTuple
9886
9887         ## Get kind of theShape.
9888         #
9889         #  @param theShape Shape to get a kind of.
9890         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
9891         #          and a list of parameters, describing the shape.
9892         #  @note  Concrete meaning of each value, returned via \a theIntegers
9893         #         or \a theDoubles list depends on the kind() of the shape.
9894         #
9895         #  @ref swig_todo "Example"
9896         def KindOfShape(self,theShape):
9897             """
9898             Get kind of theShape.
9899          
9900             Parameters: 
9901                 theShape Shape to get a kind of.
9902
9903             Returns:
9904                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
9905                     and a list of parameters, describing the shape.
9906             Note:
9907                 Concrete meaning of each value, returned via theIntegers
9908                 or theDoubles list depends on the geompy.kind of the shape
9909             """
9910             # Example: see GEOM_TestMeasures.py
9911             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
9912             RaiseIfFailed("KindOfShape", self.MeasuOp)
9913
9914             aKind  = aRoughTuple[0]
9915             anInts = aRoughTuple[1]
9916             aDbls  = aRoughTuple[2]
9917
9918             # Now there is no exception from this rule:
9919             aKindTuple = [aKind] + aDbls + anInts
9920
9921             # If they are we will regroup parameters for such kind of shape.
9922             # For example:
9923             #if aKind == kind.SOME_KIND:
9924             #    #  SOME_KIND     int int double int double double
9925             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
9926
9927             return aKindTuple
9928
9929         # end of l2_measure
9930         ## @}
9931
9932         ## @addtogroup l2_import_export
9933         ## @{
9934
9935         ## Import a shape from the BREP or IGES or STEP file
9936         #  (depends on given format) with given name.
9937         #  @param theFileName The file, containing the shape.
9938         #  @param theFormatName Specify format for the file reading.
9939         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
9940         #         If format 'IGES_SCALE' is used instead of 'IGES' or
9941         #            format 'STEP_SCALE' is used instead of 'STEP',
9942         #            length unit will be set to 'meter' and result model will be scaled.
9943         #  @param theName Object name; when specified, this parameter is used
9944         #         for result publication in the study. Otherwise, if automatic
9945         #         publication is switched on, default value is used for result name.
9946         #
9947         #  @return New GEOM.GEOM_Object, containing the imported shape.
9948         #
9949         #  @ref swig_Import_Export "Example"
9950         def ImportFile(self, theFileName, theFormatName, theName=None):
9951             """
9952             Import a shape from the BREP or IGES or STEP file
9953             (depends on given format) with given name.
9954
9955             Parameters: 
9956                 theFileName The file, containing the shape.
9957                 theFormatName Specify format for the file reading.
9958                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
9959                     If format 'IGES_SCALE' is used instead of 'IGES' or
9960                        format 'STEP_SCALE' is used instead of 'STEP',
9961                        length unit will be set to 'meter' and result model will be scaled.
9962                 theName Object name; when specified, this parameter is used
9963                         for result publication in the study. Otherwise, if automatic
9964                         publication is switched on, default value is used for result name.
9965
9966             Returns:
9967                 New GEOM.GEOM_Object, containing the imported shape.
9968             """
9969             # Example: see GEOM_TestOthers.py
9970             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
9971             RaiseIfFailed("ImportFile", self.InsertOp)
9972             self._autoPublish(anObj, theName, "imported")
9973             return anObj
9974
9975         ## Deprecated analog of ImportFile()
9976         def Import(self, theFileName, theFormatName, theName=None):
9977             """
9978             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
9979             """
9980             print "WARNING: Function Import is deprecated, use ImportFile instead"
9981             # note: auto-publishing is done in self.ImportFile()
9982             return self.ImportFile(theFileName, theFormatName, theName)
9983
9984         ## Shortcut to ImportFile() for BREP format.
9985         #  Import a shape from the BREP file with given name.
9986         #  @param theFileName The file, containing the shape.
9987         #  @param theName Object name; when specified, this parameter is used
9988         #         for result publication in the study. Otherwise, if automatic
9989         #         publication is switched on, default value is used for result name.
9990         #
9991         #  @return New GEOM.GEOM_Object, containing the imported shape.
9992         #
9993         #  @ref swig_Import_Export "Example"
9994         def ImportBREP(self, theFileName, theName=None):
9995             """
9996             geompy.ImportFile(...) function for BREP format
9997             Import a shape from the BREP file with given name.
9998
9999             Parameters: 
10000                 theFileName The file, containing the shape.
10001                 theName Object name; when specified, this parameter is used
10002                         for result publication in the study. Otherwise, if automatic
10003                         publication is switched on, default value is used for result name.
10004
10005             Returns:
10006                 New GEOM.GEOM_Object, containing the imported shape.
10007             """
10008             # Example: see GEOM_TestOthers.py
10009             # note: auto-publishing is done in self.ImportFile()
10010             return self.ImportFile(theFileName, "BREP", theName)
10011
10012         ## Shortcut to ImportFile() for IGES format
10013         #  Import a shape from the IGES file with given name.
10014         #  @param theFileName The file, containing the shape.
10015         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10016         #                     and result model will be scaled, if its units are not meters.
10017         #                     If False (default), file length units will be taken into account.
10018         #  @param theName Object name; when specified, this parameter is used
10019         #         for result publication in the study. Otherwise, if automatic
10020         #         publication is switched on, default value is used for result name.
10021         #
10022         #  @return New GEOM.GEOM_Object, containing the imported shape.
10023         #
10024         #  @ref swig_Import_Export "Example"
10025         def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
10026             """
10027             geompy.ImportFile(...) function for IGES format
10028
10029             Parameters:
10030                 theFileName The file, containing the shape.
10031                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10032                             and result model will be scaled, if its units are not meters.
10033                             If False (default), file length units will be taken into account.
10034                 theName Object name; when specified, this parameter is used
10035                         for result publication in the study. Otherwise, if automatic
10036                         publication is switched on, default value is used for result name.
10037
10038             Returns:
10039                 New GEOM.GEOM_Object, containing the imported shape.
10040             """
10041             # Example: see GEOM_TestOthers.py
10042             # note: auto-publishing is done in self.ImportFile()
10043             if ignoreUnits:
10044                 return self.ImportFile(theFileName, "IGES_SCALE", theName)
10045             return self.ImportFile(theFileName, "IGES", theName)
10046
10047         ## Return length unit from given IGES file
10048         #  @param theFileName The file, containing the shape.
10049         #  @return String, containing the units name.
10050         #
10051         #  @ref swig_Import_Export "Example"
10052         def GetIGESUnit(self, theFileName):
10053             """
10054             Return length units from given IGES file
10055
10056             Parameters:
10057                 theFileName The file, containing the shape.
10058
10059             Returns:
10060                 String, containing the units name.
10061             """
10062             # Example: see GEOM_TestOthers.py
10063             aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
10064             return aUnitName
10065
10066         ## Shortcut to ImportFile() for STEP format
10067         #  Import a shape from the STEP file with given name.
10068         #  @param theFileName The file, containing the shape.
10069         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10070         #                     and result model will be scaled, if its units are not meters.
10071         #                     If False (default), file length units will be taken into account.
10072         #  @param theName Object name; when specified, this parameter is used
10073         #         for result publication in the study. Otherwise, if automatic
10074         #         publication is switched on, default value is used for result name.
10075         #
10076         #  @return New GEOM.GEOM_Object, containing the imported shape.
10077         #
10078         #  @ref swig_Import_Export "Example"
10079         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
10080             """
10081             geompy.ImportFile(...) function for STEP format
10082
10083             Parameters:
10084                 theFileName The file, containing the shape.
10085                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10086                             and result model will be scaled, if its units are not meters.
10087                             If False (default), file length units will be taken into account.
10088                 theName Object name; when specified, this parameter is used
10089                         for result publication in the study. Otherwise, if automatic
10090                         publication is switched on, default value is used for result name.
10091
10092             Returns:
10093                 New GEOM.GEOM_Object, containing the imported shape.
10094             """
10095             # Example: see GEOM_TestOthers.py
10096             # note: auto-publishing is done in self.ImportFile()
10097             if ignoreUnits:
10098                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
10099             return self.ImportFile(theFileName, "STEP", theName)
10100
10101         ## Return length unit from given IGES or STEP file
10102         #  @param theFileName The file, containing the shape.
10103         #  @return String, containing the units name.
10104         #
10105         #  @ref swig_Import_Export "Example"
10106         def GetSTEPUnit(self, theFileName):
10107             """
10108             Return length units from given STEP file
10109
10110             Parameters:
10111                 theFileName The file, containing the shape.
10112
10113             Returns:
10114                 String, containing the units name.
10115             """
10116             # Example: see GEOM_TestOthers.py
10117             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
10118             return aUnitName
10119
10120         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10121         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10122         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10123         #  @param theStream The BRep binary stream.
10124         #  @param theName Object name; when specified, this parameter is used
10125         #         for result publication in the study. Otherwise, if automatic
10126         #         publication is switched on, default value is used for result name.
10127         #
10128         #  @return New GEOM_Object, containing the shape, read from theStream.
10129         #
10130         #  @ref swig_Import_Export "Example"
10131         def RestoreShape (self, theStream, theName=None):
10132             """
10133             Read a shape from the binary stream, containing its bounding representation (BRep).
10134
10135             Note:
10136                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10137
10138             Parameters: 
10139                 theStream The BRep binary stream.
10140                 theName Object name; when specified, this parameter is used
10141                         for result publication in the study. Otherwise, if automatic
10142                         publication is switched on, default value is used for result name.
10143
10144             Returns:
10145                 New GEOM_Object, containing the shape, read from theStream.
10146             """
10147             # Example: see GEOM_TestOthers.py
10148             anObj = self.InsertOp.RestoreShape(theStream)
10149             RaiseIfFailed("RestoreShape", self.InsertOp)
10150             self._autoPublish(anObj, theName, "restored")
10151             return anObj
10152
10153         ## Export the given shape into a file with given name.
10154         #  @param theObject Shape to be stored in the file.
10155         #  @param theFileName Name of the file to store the given shape in.
10156         #  @param theFormatName Specify format for the shape storage.
10157         #         Available formats can be obtained with
10158         #         geompy.InsertOp.ExportTranslators()[0] method.
10159         #
10160         #  @ref swig_Import_Export "Example"
10161         def Export(self, theObject, theFileName, theFormatName):
10162             """
10163             Export the given shape into a file with given name.
10164
10165             Parameters: 
10166                 theObject Shape to be stored in the file.
10167                 theFileName Name of the file to store the given shape in.
10168                 theFormatName Specify format for the shape storage.
10169                               Available formats can be obtained with
10170                               geompy.InsertOp.ExportTranslators()[0] method.
10171             """
10172             # Example: see GEOM_TestOthers.py
10173             self.InsertOp.Export(theObject, theFileName, theFormatName)
10174             if self.InsertOp.IsDone() == 0:
10175                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10176                 pass
10177             pass
10178
10179         ## Shortcut to Export() for BREP format
10180         #
10181         #  @ref swig_Import_Export "Example"
10182         def ExportBREP(self,theObject, theFileName):
10183             """
10184             geompy.Export(...) function for BREP format
10185             """
10186             # Example: see GEOM_TestOthers.py
10187             return self.Export(theObject, theFileName, "BREP")
10188
10189         ## Shortcut to Export() for IGES format
10190         #
10191         #  @ref swig_Import_Export "Example"
10192         def ExportIGES(self,theObject, theFileName):
10193             """
10194             geompy.Export(...) function for IGES format
10195             """
10196             # Example: see GEOM_TestOthers.py
10197             return self.Export(theObject, theFileName, "IGES")
10198
10199         ## Shortcut to Export() for STEP format
10200         #
10201         #  @ref swig_Import_Export "Example"
10202         def ExportSTEP(self,theObject, theFileName):
10203             """
10204             geompy.Export(...) function for STEP format
10205             """
10206             # Example: see GEOM_TestOthers.py
10207             return self.Export(theObject, theFileName, "STEP")
10208
10209         # end of l2_import_export
10210         ## @}
10211
10212         ## @addtogroup l3_blocks
10213         ## @{
10214
10215         ## Create a quadrangle face from four edges. Order of Edges is not
10216         #  important. It is  not necessary that edges share the same vertex.
10217         #  @param E1,E2,E3,E4 Edges for the face bound.
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.GEOM_Object, containing the created face.
10223         #
10224         #  @ref tui_building_by_blocks_page "Example"
10225         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10226             """
10227             Create a quadrangle face from four edges. Order of Edges is not
10228             important. It is  not necessary that edges share the same vertex.
10229
10230             Parameters: 
10231                 E1,E2,E3,E4 Edges for the face bound.
10232                 theName Object name; when specified, this parameter is used
10233                         for result publication in the study. Otherwise, if automatic
10234                         publication is switched on, default value is used for result name.
10235
10236             Returns: 
10237                 New GEOM.GEOM_Object, containing the created face.
10238
10239             Example of usage:               
10240                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10241             """
10242             # Example: see GEOM_Spanner.py
10243             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10244             RaiseIfFailed("MakeQuad", self.BlocksOp)
10245             self._autoPublish(anObj, theName, "quad")
10246             return anObj
10247
10248         ## Create a quadrangle face on two edges.
10249         #  The missing edges will be built by creating the shortest ones.
10250         #  @param E1,E2 Two opposite edges for the face.
10251         #  @param theName Object name; when specified, this parameter is used
10252         #         for result publication in the study. Otherwise, if automatic
10253         #         publication is switched on, default value is used for result name.
10254         #
10255         #  @return New GEOM.GEOM_Object, containing the created face.
10256         #
10257         #  @ref tui_building_by_blocks_page "Example"
10258         def MakeQuad2Edges(self, E1, E2, theName=None):
10259             """
10260             Create a quadrangle face on two edges.
10261             The missing edges will be built by creating the shortest ones.
10262
10263             Parameters: 
10264                 E1,E2 Two opposite edges for the face.
10265                 theName Object name; when specified, this parameter is used
10266                         for result publication in the study. Otherwise, if automatic
10267                         publication is switched on, default value is used for result name.
10268
10269             Returns: 
10270                 New GEOM.GEOM_Object, containing the created face.
10271             
10272             Example of usage:
10273                 # create vertices
10274                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10275                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10276                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10277                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10278                 # create edges
10279                 edge1 = geompy.MakeEdge(p1, p2)
10280                 edge2 = geompy.MakeEdge(p3, p4)
10281                 # create a quadrangle face from two edges
10282                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10283             """
10284             # Example: see GEOM_Spanner.py
10285             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10286             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10287             self._autoPublish(anObj, theName, "quad")
10288             return anObj
10289
10290         ## Create a quadrangle face with specified corners.
10291         #  The missing edges will be built by creating the shortest ones.
10292         #  @param V1,V2,V3,V4 Corner vertices for the face.
10293         #  @param theName Object name; when specified, this parameter is used
10294         #         for result publication in the study. Otherwise, if automatic
10295         #         publication is switched on, default value is used for result name.
10296         #
10297         #  @return New GEOM.GEOM_Object, containing the created face.
10298         #
10299         #  @ref tui_building_by_blocks_page "Example 1"
10300         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10301         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10302             """
10303             Create a quadrangle face with specified corners.
10304             The missing edges will be built by creating the shortest ones.
10305
10306             Parameters: 
10307                 V1,V2,V3,V4 Corner vertices for the face.
10308                 theName Object name; when specified, this parameter is used
10309                         for result publication in the study. Otherwise, if automatic
10310                         publication is switched on, default value is used for result name.
10311
10312             Returns: 
10313                 New GEOM.GEOM_Object, containing the created face.
10314
10315             Example of usage:
10316                 # create vertices
10317                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10318                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10319                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10320                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10321                 # create a quadrangle from four points in its corners
10322                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10323             """
10324             # Example: see GEOM_Spanner.py
10325             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10326             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10327             self._autoPublish(anObj, theName, "quad")
10328             return anObj
10329
10330         ## Create a hexahedral solid, bounded by the six given faces. Order of
10331         #  faces is not important. It is  not necessary that Faces share the same edge.
10332         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10333         #  @param theName Object name; when specified, this parameter is used
10334         #         for result publication in the study. Otherwise, if automatic
10335         #         publication is switched on, default value is used for result name.
10336         #
10337         #  @return New GEOM.GEOM_Object, containing the created solid.
10338         #
10339         #  @ref tui_building_by_blocks_page "Example 1"
10340         #  \n @ref swig_MakeHexa "Example 2"
10341         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
10342             """
10343             Create a hexahedral solid, bounded by the six given faces. Order of
10344             faces is not important. It is  not necessary that Faces share the same edge.
10345
10346             Parameters: 
10347                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10348                 theName Object name; when specified, this parameter is used
10349                         for result publication in the study. Otherwise, if automatic
10350                         publication is switched on, default value is used for result name.
10351
10352             Returns:    
10353                 New GEOM.GEOM_Object, containing the created solid.
10354
10355             Example of usage:
10356                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
10357             """
10358             # Example: see GEOM_Spanner.py
10359             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
10360             RaiseIfFailed("MakeHexa", self.BlocksOp)
10361             self._autoPublish(anObj, theName, "hexa")
10362             return anObj
10363
10364         ## Create a hexahedral solid between two given faces.
10365         #  The missing faces will be built by creating the smallest ones.
10366         #  @param F1,F2 Two opposite faces for the hexahedral solid.
10367         #  @param theName Object name; when specified, this parameter is used
10368         #         for result publication in the study. Otherwise, if automatic
10369         #         publication is switched on, default value is used for result name.
10370         #
10371         #  @return New GEOM.GEOM_Object, containing the created solid.
10372         #
10373         #  @ref tui_building_by_blocks_page "Example 1"
10374         #  \n @ref swig_MakeHexa2Faces "Example 2"
10375         def MakeHexa2Faces(self, F1, F2, theName=None):
10376             """
10377             Create a hexahedral solid between two given faces.
10378             The missing faces will be built by creating the smallest ones.
10379
10380             Parameters: 
10381                 F1,F2 Two opposite faces for the hexahedral solid.
10382                 theName Object name; when specified, this parameter is used
10383                         for result publication in the study. Otherwise, if automatic
10384                         publication is switched on, default value is used for result name.
10385
10386             Returns:
10387                 New GEOM.GEOM_Object, containing the created solid.
10388
10389             Example of usage:
10390                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
10391             """
10392             # Example: see GEOM_Spanner.py
10393             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
10394             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
10395             self._autoPublish(anObj, theName, "hexa")
10396             return anObj
10397
10398         # end of l3_blocks
10399         ## @}
10400
10401         ## @addtogroup l3_blocks_op
10402         ## @{
10403
10404         ## Get a vertex, found in the given shape by its coordinates.
10405         #  @param theShape Block or a compound of blocks.
10406         #  @param theX,theY,theZ Coordinates of the sought vertex.
10407         #  @param theEpsilon Maximum allowed distance between the resulting
10408         #                    vertex and point with the given coordinates.
10409         #  @param theName Object name; when specified, this parameter is used
10410         #         for result publication in the study. Otherwise, if automatic
10411         #         publication is switched on, default value is used for result name.
10412         #
10413         #  @return New GEOM.GEOM_Object, containing the found vertex.
10414         #
10415         #  @ref swig_GetPoint "Example"
10416         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
10417             """
10418             Get a vertex, found in the given shape by its coordinates.
10419
10420             Parameters: 
10421                 theShape Block or a compound of blocks.
10422                 theX,theY,theZ Coordinates of the sought vertex.
10423                 theEpsilon Maximum allowed distance between the resulting
10424                            vertex and point with the given coordinates.
10425                 theName Object name; when specified, this parameter is used
10426                         for result publication in the study. Otherwise, if automatic
10427                         publication is switched on, default value is used for result name.
10428
10429             Returns:                  
10430                 New GEOM.GEOM_Object, containing the found vertex.
10431
10432             Example of usage:
10433                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
10434             """
10435             # Example: see GEOM_TestOthers.py
10436             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
10437             RaiseIfFailed("GetPoint", self.BlocksOp)
10438             self._autoPublish(anObj, theName, "vertex")
10439             return anObj
10440
10441         ## Find a vertex of the given shape, which has minimal distance to the given point.
10442         #  @param theShape Any shape.
10443         #  @param thePoint Point, close to the desired vertex.
10444         #  @param theName Object name; when specified, this parameter is used
10445         #         for result publication in the study. Otherwise, if automatic
10446         #         publication is switched on, default value is used for result name.
10447         #
10448         #  @return New GEOM.GEOM_Object, containing the found vertex.
10449         #
10450         #  @ref swig_GetVertexNearPoint "Example"
10451         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
10452             """
10453             Find a vertex of the given shape, which has minimal distance to the given point.
10454
10455             Parameters: 
10456                 theShape Any shape.
10457                 thePoint Point, close to the desired vertex.
10458                 theName Object name; when specified, this parameter is used
10459                         for result publication in the study. Otherwise, if automatic
10460                         publication is switched on, default value is used for result name.
10461
10462             Returns:
10463                 New GEOM.GEOM_Object, containing the found vertex.
10464
10465             Example of usage:
10466                 pmidle = geompy.MakeVertex(50, 0, 50)
10467                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
10468             """
10469             # Example: see GEOM_TestOthers.py
10470             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
10471             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
10472             self._autoPublish(anObj, theName, "vertex")
10473             return anObj
10474
10475         ## Get an edge, found in the given shape by two given vertices.
10476         #  @param theShape Block or a compound of blocks.
10477         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
10478         #  @param theName Object name; when specified, this parameter is used
10479         #         for result publication in the study. Otherwise, if automatic
10480         #         publication is switched on, default value is used for result name.
10481         #
10482         #  @return New GEOM.GEOM_Object, containing the found edge.
10483         #
10484         #  @ref swig_GetEdge "Example"
10485         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
10486             """
10487             Get an edge, found in the given shape by two given vertices.
10488
10489             Parameters: 
10490                 theShape Block or a compound of blocks.
10491                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
10492                 theName Object name; when specified, this parameter is used
10493                         for result publication in the study. Otherwise, if automatic
10494                         publication is switched on, default value is used for result name.
10495
10496             Returns:
10497                 New GEOM.GEOM_Object, containing the found edge.
10498             """
10499             # Example: see GEOM_Spanner.py
10500             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
10501             RaiseIfFailed("GetEdge", self.BlocksOp)
10502             self._autoPublish(anObj, theName, "edge")
10503             return anObj
10504
10505         ## Find an edge of the given shape, which has minimal distance to the given point.
10506         #  @param theShape Block or a compound of blocks.
10507         #  @param thePoint Point, close to the desired edge.
10508         #  @param theName Object name; when specified, this parameter is used
10509         #         for result publication in the study. Otherwise, if automatic
10510         #         publication is switched on, default value is used for result name.
10511         #
10512         #  @return New GEOM.GEOM_Object, containing the found edge.
10513         #
10514         #  @ref swig_GetEdgeNearPoint "Example"
10515         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
10516             """
10517             Find an edge of the given shape, which has minimal distance to the given point.
10518
10519             Parameters: 
10520                 theShape Block or a compound of blocks.
10521                 thePoint Point, close to the desired edge.
10522                 theName Object name; when specified, this parameter is used
10523                         for result publication in the study. Otherwise, if automatic
10524                         publication is switched on, default value is used for result name.
10525
10526             Returns:
10527                 New GEOM.GEOM_Object, containing the found edge.
10528             """
10529             # Example: see GEOM_TestOthers.py
10530             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
10531             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
10532             self._autoPublish(anObj, theName, "edge")
10533             return anObj
10534
10535         ## Returns a face, found in the given shape by four given corner vertices.
10536         #  @param theShape Block or a compound of blocks.
10537         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
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 face.
10543         #
10544         #  @ref swig_todo "Example"
10545         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
10546             """
10547             Returns a face, found in the given shape by four given corner vertices.
10548
10549             Parameters:
10550                 theShape Block or a compound of blocks.
10551                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
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 face.
10558             """
10559             # Example: see GEOM_Spanner.py
10560             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
10561             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
10562             self._autoPublish(anObj, theName, "face")
10563             return anObj
10564
10565         ## Get a face of block, found in the given shape by two given edges.
10566         #  @param theShape Block or a compound of blocks.
10567         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
10568         #  @param theName Object name; when specified, this parameter is used
10569         #         for result publication in the study. Otherwise, if automatic
10570         #         publication is switched on, default value is used for result name.
10571         #
10572         #  @return New GEOM.GEOM_Object, containing the found face.
10573         #
10574         #  @ref swig_todo "Example"
10575         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
10576             """
10577             Get a face of block, found in the given shape by two given edges.
10578
10579             Parameters:
10580                 theShape Block or a compound of blocks.
10581                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
10582                 theName Object name; when specified, this parameter is used
10583                         for result publication in the study. Otherwise, if automatic
10584                         publication is switched on, default value is used for result name.
10585
10586             Returns:
10587                 New GEOM.GEOM_Object, containing the found face.
10588             """
10589             # Example: see GEOM_Spanner.py
10590             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
10591             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
10592             self._autoPublish(anObj, theName, "face")
10593             return anObj
10594
10595         ## Find a face, opposite to the given one in the given block.
10596         #  @param theBlock Must be a hexahedral solid.
10597         #  @param theFace Face of \a theBlock, opposite to the desired face.
10598         #  @param theName Object name; when specified, this parameter is used
10599         #         for result publication in the study. Otherwise, if automatic
10600         #         publication is switched on, default value is used for result name.
10601         #
10602         #  @return New GEOM.GEOM_Object, containing the found face.
10603         #
10604         #  @ref swig_GetOppositeFace "Example"
10605         def GetOppositeFace(self, theBlock, theFace, theName=None):
10606             """
10607             Find a face, opposite to the given one in the given block.
10608
10609             Parameters:
10610                 theBlock Must be a hexahedral solid.
10611                 theFace Face of theBlock, opposite to the desired face.
10612                 theName Object name; when specified, this parameter is used
10613                         for result publication in the study. Otherwise, if automatic
10614                         publication is switched on, default value is used for result name.
10615
10616             Returns: 
10617                 New GEOM.GEOM_Object, containing the found face.
10618             """
10619             # Example: see GEOM_Spanner.py
10620             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
10621             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
10622             self._autoPublish(anObj, theName, "face")
10623             return anObj
10624
10625         ## Find a face of the given shape, which has minimal distance to the given point.
10626         #  @param theShape Block or a compound of blocks.
10627         #  @param thePoint Point, close to the desired face.
10628         #  @param theName Object name; when specified, this parameter is used
10629         #         for result publication in the study. Otherwise, if automatic
10630         #         publication is switched on, default value is used for result name.
10631         #
10632         #  @return New GEOM.GEOM_Object, containing the found face.
10633         #
10634         #  @ref swig_GetFaceNearPoint "Example"
10635         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
10636             """
10637             Find a face of the given shape, which has minimal distance to the given point.
10638
10639             Parameters:
10640                 theShape Block or a compound of blocks.
10641                 thePoint Point, close to the desired face.
10642                 theName Object name; when specified, this parameter is used
10643                         for result publication in the study. Otherwise, if automatic
10644                         publication is switched on, default value is used for result name.
10645
10646             Returns:
10647                 New GEOM.GEOM_Object, containing the found face.
10648             """
10649             # Example: see GEOM_Spanner.py
10650             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
10651             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
10652             self._autoPublish(anObj, theName, "face")
10653             return anObj
10654
10655         ## Find a face of block, whose outside normale has minimal angle with the given vector.
10656         #  @param theBlock Block or a compound of blocks.
10657         #  @param theVector Vector, close to the normale of the desired face.
10658         #  @param theName Object name; when specified, this parameter is used
10659         #         for result publication in the study. Otherwise, if automatic
10660         #         publication is switched on, default value is used for result name.
10661         #
10662         #  @return New GEOM.GEOM_Object, containing the found face.
10663         #
10664         #  @ref swig_todo "Example"
10665         def GetFaceByNormale(self, theBlock, theVector, theName=None):
10666             """
10667             Find a face of block, whose outside normale has minimal angle with the given vector.
10668
10669             Parameters:
10670                 theBlock Block or a compound of blocks.
10671                 theVector Vector, close to the normale of the desired face.
10672                 theName Object name; when specified, this parameter is used
10673                         for result publication in the study. Otherwise, if automatic
10674                         publication is switched on, default value is used for result name.
10675
10676             Returns:
10677                 New GEOM.GEOM_Object, containing the found face.
10678             """
10679             # Example: see GEOM_Spanner.py
10680             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
10681             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
10682             self._autoPublish(anObj, theName, "face")
10683             return anObj
10684
10685         ## Find all sub-shapes of type \a theShapeType of the given shape,
10686         #  which have minimal distance to the given point.
10687         #  @param theShape Any shape.
10688         #  @param thePoint Point, close to the desired shape.
10689         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
10690         #  @param theTolerance The tolerance for distances comparison. All shapes
10691         #                      with distances to the given point in interval
10692         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
10693         #  @param theName Object name; when specified, this parameter is used
10694         #         for result publication in the study. Otherwise, if automatic
10695         #         publication is switched on, default value is used for result name.
10696         #
10697         #  @return New GEOM_Object, containing a group of all found shapes.
10698         #
10699         #  @ref swig_GetShapesNearPoint "Example"
10700         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
10701             """
10702             Find all sub-shapes of type theShapeType of the given shape,
10703             which have minimal distance to the given point.
10704
10705             Parameters:
10706                 theShape Any shape.
10707                 thePoint Point, close to the desired shape.
10708                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
10709                 theTolerance The tolerance for distances comparison. All shapes
10710                                 with distances to the given point in interval
10711                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
10712                 theName Object name; when specified, this parameter is used
10713                         for result publication in the study. Otherwise, if automatic
10714                         publication is switched on, default value is used for result name.
10715
10716             Returns:
10717                 New GEOM_Object, containing a group of all found shapes.
10718             """
10719             # Example: see GEOM_TestOthers.py
10720             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
10721             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
10722             self._autoPublish(anObj, theName, "group")
10723             return anObj
10724
10725         # end of l3_blocks_op
10726         ## @}
10727
10728         ## @addtogroup l4_blocks_measure
10729         ## @{
10730
10731         ## Check, if the compound of blocks is given.
10732         #  To be considered as a compound of blocks, the
10733         #  given shape must satisfy the following conditions:
10734         #  - Each element of the compound should be a Block (6 faces and 12 edges).
10735         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10736         #  - The compound should be connexe.
10737         #  - The glue between two quadrangle faces should be applied.
10738         #  @param theCompound The compound to check.
10739         #  @return TRUE, if the given shape is a compound of blocks.
10740         #  If theCompound is not valid, prints all discovered errors.
10741         #
10742         #  @ref tui_measurement_tools_page "Example 1"
10743         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
10744         def CheckCompoundOfBlocks(self,theCompound):
10745             """
10746             Check, if the compound of blocks is given.
10747             To be considered as a compound of blocks, the
10748             given shape must satisfy the following conditions:
10749             - Each element of the compound should be a Block (6 faces and 12 edges).
10750             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10751             - The compound should be connexe.
10752             - The glue between two quadrangle faces should be applied.
10753
10754             Parameters:
10755                 theCompound The compound to check.
10756
10757             Returns:
10758                 TRUE, if the given shape is a compound of blocks.
10759                 If theCompound is not valid, prints all discovered errors.            
10760             """
10761             # Example: see GEOM_Spanner.py
10762             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
10763             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
10764             if IsValid == 0:
10765                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
10766                 print Descr
10767             return IsValid
10768
10769         ## Retrieve all non blocks solids and faces from \a theShape.
10770         #  @param theShape The shape to explore.
10771         #  @param theName Object name; when specified, this parameter is used
10772         #         for result publication in the study. Otherwise, if automatic
10773         #         publication is switched on, default value is used for result name.
10774         #
10775         #  @return A tuple of two GEOM_Objects. The first object is a group of all
10776         #          non block solids (= not 6 faces, or with 6 faces, but with the
10777         #          presence of non-quadrangular faces). The second object is a
10778         #          group of all non quadrangular faces.
10779         #
10780         #  @ref tui_measurement_tools_page "Example 1"
10781         #  \n @ref swig_GetNonBlocks "Example 2"
10782         def GetNonBlocks (self, theShape, theName=None):
10783             """
10784             Retrieve all non blocks solids and faces from theShape.
10785
10786             Parameters:
10787                 theShape The shape to explore.
10788                 theName Object name; when specified, this parameter is used
10789                         for result publication in the study. Otherwise, if automatic
10790                         publication is switched on, default value is used for result name.
10791
10792             Returns:
10793                 A tuple of two GEOM_Objects. The first object is a group of all
10794                 non block solids (= not 6 faces, or with 6 faces, but with the
10795                 presence of non-quadrangular faces). The second object is a
10796                 group of all non quadrangular faces.
10797
10798             Usage:
10799                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
10800             """
10801             # Example: see GEOM_Spanner.py
10802             aTuple = self.BlocksOp.GetNonBlocks(theShape)
10803             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
10804             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
10805             return aTuple
10806
10807         ## Remove all seam and degenerated edges from \a theShape.
10808         #  Unite faces and edges, sharing one surface. It means that
10809         #  this faces must have references to one C++ surface object (handle).
10810         #  @param theShape The compound or single solid to remove irregular edges from.
10811         #  @param doUnionFaces If True, then unite faces. If False (the default value),
10812         #         do not unite faces.
10813         #  @param theName Object name; when specified, this parameter is used
10814         #         for result publication in the study. Otherwise, if automatic
10815         #         publication is switched on, default value is used for result name.
10816         #
10817         #  @return Improved shape.
10818         #
10819         #  @ref swig_RemoveExtraEdges "Example"
10820         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
10821             """
10822             Remove all seam and degenerated edges from theShape.
10823             Unite faces and edges, sharing one surface. It means that
10824             this faces must have references to one C++ surface object (handle).
10825
10826             Parameters:
10827                 theShape The compound or single solid to remove irregular edges from.
10828                 doUnionFaces If True, then unite faces. If False (the default value),
10829                              do not unite faces.
10830                 theName Object name; when specified, this parameter is used
10831                         for result publication in the study. Otherwise, if automatic
10832                         publication is switched on, default value is used for result name.
10833
10834             Returns: 
10835                 Improved shape.
10836             """
10837             # Example: see GEOM_TestOthers.py
10838             nbFacesOptimum = -1 # -1 means do not unite faces
10839             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
10840             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
10841             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
10842             self._autoPublish(anObj, theName, "removeExtraEdges")
10843             return anObj
10844
10845         ## Performs union faces of \a theShape
10846         #  Unite faces sharing one surface. It means that
10847         #  these faces must have references to one C++ surface object (handle).
10848         #  @param theShape The compound or single solid that contains faces
10849         #         to perform union.
10850         #  @param theName Object name; when specified, this parameter is used
10851         #         for result publication in the study. Otherwise, if automatic
10852         #         publication is switched on, default value is used for result name.
10853         #
10854         #  @return Improved shape.
10855         #
10856         #  @ref swig_UnionFaces "Example"
10857         def UnionFaces(self, theShape, theName=None):
10858             """
10859             Performs union faces of theShape.
10860             Unite faces sharing one surface. It means that
10861             these faces must have references to one C++ surface object (handle).
10862
10863             Parameters:
10864                 theShape The compound or single solid that contains faces
10865                          to perform union.
10866                 theName Object name; when specified, this parameter is used
10867                         for result publication in the study. Otherwise, if automatic
10868                         publication is switched on, default value is used for result name.
10869
10870             Returns: 
10871                 Improved shape.
10872             """
10873             # Example: see GEOM_TestOthers.py
10874             anObj = self.BlocksOp.UnionFaces(theShape)
10875             RaiseIfFailed("UnionFaces", self.BlocksOp)
10876             self._autoPublish(anObj, theName, "unionFaces")
10877             return anObj
10878
10879         ## Check, if the given shape is a blocks compound.
10880         #  Fix all detected errors.
10881         #    \note Single block can be also fixed by this method.
10882         #  @param theShape The compound to check and improve.
10883         #  @param theName Object name; when specified, this parameter is used
10884         #         for result publication in the study. Otherwise, if automatic
10885         #         publication is switched on, default value is used for result name.
10886         #
10887         #  @return Improved compound.
10888         #
10889         #  @ref swig_CheckAndImprove "Example"
10890         def CheckAndImprove(self, theShape, theName=None):
10891             """
10892             Check, if the given shape is a blocks compound.
10893             Fix all detected errors.
10894
10895             Note:
10896                 Single block can be also fixed by this method.
10897
10898             Parameters:
10899                 theShape The compound to check and improve.
10900                 theName Object name; when specified, this parameter is used
10901                         for result publication in the study. Otherwise, if automatic
10902                         publication is switched on, default value is used for result name.
10903
10904             Returns: 
10905                 Improved compound.
10906             """
10907             # Example: see GEOM_TestOthers.py
10908             anObj = self.BlocksOp.CheckAndImprove(theShape)
10909             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
10910             self._autoPublish(anObj, theName, "improved")
10911             return anObj
10912
10913         # end of l4_blocks_measure
10914         ## @}
10915
10916         ## @addtogroup l3_blocks_op
10917         ## @{
10918
10919         ## Get all the blocks, contained in the given compound.
10920         #  @param theCompound The compound to explode.
10921         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
10922         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
10923         #  @param theName Object name; when specified, this parameter is used
10924         #         for result publication in the study. Otherwise, if automatic
10925         #         publication is switched on, default value is used for result name.
10926         #
10927         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10928         #
10929         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
10930         #
10931         #  @ref tui_explode_on_blocks "Example 1"
10932         #  \n @ref swig_MakeBlockExplode "Example 2"
10933         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
10934             """
10935             Get all the blocks, contained in the given compound.
10936
10937             Parameters:
10938                 theCompound The compound to explode.
10939                 theMinNbFaces If solid has lower number of faces, it is not a block.
10940                 theMaxNbFaces If solid has higher number of faces, it is not a block.
10941                 theName Object name; when specified, this parameter is used
10942                         for result publication in the study. Otherwise, if automatic
10943                         publication is switched on, default value is used for result name.
10944
10945             Note:
10946                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10947
10948             Returns:  
10949                 List of GEOM.GEOM_Object, containing the retrieved blocks.
10950             """
10951             # Example: see GEOM_TestOthers.py
10952             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
10953             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
10954             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
10955             for anObj in aList:
10956                 anObj.SetParameters(Parameters)
10957                 pass
10958             self._autoPublish(aList, theName, "block")
10959             return aList
10960
10961         ## Find block, containing the given point inside its volume or on boundary.
10962         #  @param theCompound Compound, to find block in.
10963         #  @param thePoint Point, close to the desired block. If the point lays on
10964         #         boundary between some blocks, we return block with nearest center.
10965         #  @param theName Object name; when specified, this parameter is used
10966         #         for result publication in the study. Otherwise, if automatic
10967         #         publication is switched on, default value is used for result name.
10968         #
10969         #  @return New GEOM.GEOM_Object, containing the found block.
10970         #
10971         #  @ref swig_todo "Example"
10972         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
10973             """
10974             Find block, containing the given point inside its volume or on boundary.
10975
10976             Parameters:
10977                 theCompound Compound, to find block in.
10978                 thePoint Point, close to the desired block. If the point lays on
10979                          boundary between some blocks, we return block with nearest center.
10980                 theName Object name; when specified, this parameter is used
10981                         for result publication in the study. Otherwise, if automatic
10982                         publication is switched on, default value is used for result name.
10983
10984             Returns:
10985                 New GEOM.GEOM_Object, containing the found block.
10986             """
10987             # Example: see GEOM_Spanner.py
10988             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
10989             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
10990             self._autoPublish(anObj, theName, "block")
10991             return anObj
10992
10993         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
10994         #  @param theCompound Compound, to find block in.
10995         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
10996         #  @param theName Object name; when specified, this parameter is used
10997         #         for result publication in the study. Otherwise, if automatic
10998         #         publication is switched on, default value is used for result name.
10999         #
11000         #  @return New GEOM.GEOM_Object, containing the found block.
11001         #
11002         #  @ref swig_GetBlockByParts "Example"
11003         def GetBlockByParts(self, theCompound, theParts, theName=None):
11004             """
11005              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11006
11007              Parameters:
11008                 theCompound Compound, to find block in.
11009                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
11010                 theName Object name; when specified, this parameter is used
11011                         for result publication in the study. Otherwise, if automatic
11012                         publication is switched on, default value is used for result name.
11013
11014             Returns: 
11015                 New GEOM_Object, containing the found block.
11016             """
11017             # Example: see GEOM_TestOthers.py
11018             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
11019             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
11020             self._autoPublish(anObj, theName, "block")
11021             return anObj
11022
11023         ## Return all blocks, containing all the elements, passed as the parts.
11024         #  @param theCompound Compound, to find blocks in.
11025         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11026         #  @param theName Object name; when specified, this parameter is used
11027         #         for result publication in the study. Otherwise, if automatic
11028         #         publication is switched on, default value is used for result name.
11029         #
11030         #  @return List of GEOM.GEOM_Object, containing the found blocks.
11031         #
11032         #  @ref swig_todo "Example"
11033         def GetBlocksByParts(self, theCompound, theParts, theName=None):
11034             """
11035             Return all blocks, containing all the elements, passed as the parts.
11036
11037             Parameters:
11038                 theCompound Compound, to find blocks in.
11039                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11040                 theName Object name; when specified, this parameter is used
11041                         for result publication in the study. Otherwise, if automatic
11042                         publication is switched on, default value is used for result name.
11043
11044             Returns:
11045                 List of GEOM.GEOM_Object, containing the found blocks.
11046             """
11047             # Example: see GEOM_Spanner.py
11048             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11049             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11050             self._autoPublish(aList, theName, "block")
11051             return aList
11052
11053         ## Multi-transformate block and glue the result.
11054         #  Transformation is defined so, as to superpose direction faces.
11055         #  @param Block Hexahedral solid to be multi-transformed.
11056         #  @param DirFace1 ID of First direction face.
11057         #  @param DirFace2 ID of Second direction face.
11058         #  @param NbTimes Quantity of transformations to be done.
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         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11064         #
11065         #  @return New GEOM.GEOM_Object, containing the result shape.
11066         #
11067         #  @ref tui_multi_transformation "Example"
11068         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11069             """
11070             Multi-transformate block and glue the result.
11071             Transformation is defined so, as to superpose direction faces.
11072
11073             Parameters:
11074                 Block Hexahedral solid to be multi-transformed.
11075                 DirFace1 ID of First direction face.
11076                 DirFace2 ID of Second direction face.
11077                 NbTimes Quantity of transformations to be done.
11078                 theName Object name; when specified, this parameter is used
11079                         for result publication in the study. Otherwise, if automatic
11080                         publication is switched on, default value is used for result name.
11081
11082             Note:
11083                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11084
11085             Returns:
11086                 New GEOM.GEOM_Object, containing the result shape.
11087             """
11088             # Example: see GEOM_Spanner.py
11089             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11090             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11091             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11092             anObj.SetParameters(Parameters)
11093             self._autoPublish(anObj, theName, "transformed")
11094             return anObj
11095
11096         ## Multi-transformate block and glue the result.
11097         #  @param Block Hexahedral solid to be multi-transformed.
11098         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11099         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11100         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11101         #  @param theName Object name; when specified, this parameter is used
11102         #         for result publication in the study. Otherwise, if automatic
11103         #         publication is switched on, default value is used for result name.
11104         #
11105         #  @return New GEOM.GEOM_Object, containing the result shape.
11106         #
11107         #  @ref tui_multi_transformation "Example"
11108         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11109                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11110             """
11111             Multi-transformate block and glue the result.
11112
11113             Parameters:
11114                 Block Hexahedral solid to be multi-transformed.
11115                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11116                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11117                 NbTimesU,NbTimesV Quantity of transformations to be done.
11118                 theName Object name; when specified, this parameter is used
11119                         for result publication in the study. Otherwise, if automatic
11120                         publication is switched on, default value is used for result name.
11121
11122             Returns:
11123                 New GEOM.GEOM_Object, containing the result shape.
11124             """
11125             # Example: see GEOM_Spanner.py
11126             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11127               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11128             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11129                                                             DirFace1V, DirFace2V, NbTimesV)
11130             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11131             anObj.SetParameters(Parameters)
11132             self._autoPublish(anObj, theName, "transformed")
11133             return anObj
11134
11135         ## Build all possible propagation groups.
11136         #  Propagation group is a set of all edges, opposite to one (main)
11137         #  edge of this group directly or through other opposite edges.
11138         #  Notion of Opposite Edge make sence only on quadrangle face.
11139         #  @param theShape Shape to build propagation groups on.
11140         #  @param theName Object name; when specified, this parameter is used
11141         #         for result publication in the study. Otherwise, if automatic
11142         #         publication is switched on, default value is used for result name.
11143         #
11144         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11145         #
11146         #  @ref swig_Propagate "Example"
11147         def Propagate(self, theShape, theName=None):
11148             """
11149             Build all possible propagation groups.
11150             Propagation group is a set of all edges, opposite to one (main)
11151             edge of this group directly or through other opposite edges.
11152             Notion of Opposite Edge make sence only on quadrangle face.
11153
11154             Parameters:
11155                 theShape Shape to build propagation groups on.
11156                 theName Object name; when specified, this parameter is used
11157                         for result publication in the study. Otherwise, if automatic
11158                         publication is switched on, default value is used for result name.
11159
11160             Returns:
11161                 List of GEOM.GEOM_Object, each of them is a propagation group.
11162             """
11163             # Example: see GEOM_TestOthers.py
11164             listChains = self.BlocksOp.Propagate(theShape)
11165             RaiseIfFailed("Propagate", self.BlocksOp)
11166             self._autoPublish(listChains, theName, "propagate")
11167             return listChains
11168
11169         # end of l3_blocks_op
11170         ## @}
11171
11172         ## @addtogroup l3_groups
11173         ## @{
11174
11175         ## Creates a new group which will store sub-shapes of theMainShape
11176         #  @param theMainShape is a GEOM object on which the group is selected
11177         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
11178         #  @param theName Object name; when specified, this parameter is used
11179         #         for result publication in the study. Otherwise, if automatic
11180         #         publication is switched on, default value is used for result name.
11181         #
11182         #  @return a newly created GEOM group (GEOM.GEOM_Object)
11183         #
11184         #  @ref tui_working_with_groups_page "Example 1"
11185         #  \n @ref swig_CreateGroup "Example 2"
11186         def CreateGroup(self, theMainShape, theShapeType, theName=None):
11187             """
11188             Creates a new group which will store sub-shapes of theMainShape
11189
11190             Parameters:
11191                theMainShape is a GEOM object on which the group is selected
11192                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
11193                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
11194                 theName Object name; when specified, this parameter is used
11195                         for result publication in the study. Otherwise, if automatic
11196                         publication is switched on, default value is used for result name.
11197
11198             Returns:
11199                a newly created GEOM group
11200
11201             Example of usage:
11202                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
11203                 
11204             """
11205             # Example: see GEOM_TestOthers.py
11206             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
11207             RaiseIfFailed("CreateGroup", self.GroupOp)
11208             self._autoPublish(anObj, theName, "group")
11209             return anObj
11210
11211         ## Adds a sub-object with ID theSubShapeId to the group
11212         #  @param theGroup is a GEOM group to which the new sub-shape is added
11213         #  @param theSubShapeID is a sub-shape ID in the main object.
11214         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11215         #
11216         #  @ref tui_working_with_groups_page "Example"
11217         def AddObject(self,theGroup, theSubShapeID):
11218             """
11219             Adds a sub-object with ID theSubShapeId to the group
11220
11221             Parameters:
11222                 theGroup       is a GEOM group to which the new sub-shape is added
11223                 theSubShapeID  is a sub-shape ID in the main object.
11224
11225             Note:
11226                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
11227             """
11228             # Example: see GEOM_TestOthers.py
11229             self.GroupOp.AddObject(theGroup, theSubShapeID)
11230             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
11231                 RaiseIfFailed("AddObject", self.GroupOp)
11232                 pass
11233             pass
11234
11235         ## Removes a sub-object with ID \a theSubShapeId from the group
11236         #  @param theGroup is a GEOM group from which the new sub-shape is removed
11237         #  @param theSubShapeID is a sub-shape ID in the main object.
11238         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11239         #
11240         #  @ref tui_working_with_groups_page "Example"
11241         def RemoveObject(self,theGroup, theSubShapeID):
11242             """
11243             Removes a sub-object with ID theSubShapeId from the group
11244
11245             Parameters:
11246                 theGroup is a GEOM group from which the new sub-shape is removed
11247                 theSubShapeID is a sub-shape ID in the main object.
11248
11249             Note:
11250                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11251             """
11252             # Example: see GEOM_TestOthers.py
11253             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
11254             RaiseIfFailed("RemoveObject", self.GroupOp)
11255             pass
11256
11257         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11258         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11259         #  @param theSubShapes is a list of sub-shapes to be added.
11260         #
11261         #  @ref tui_working_with_groups_page "Example"
11262         def UnionList (self,theGroup, theSubShapes):
11263             """
11264             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11265
11266             Parameters:
11267                 theGroup is a GEOM group to which the new sub-shapes are added.
11268                 theSubShapes is a list of sub-shapes to be added.
11269             """
11270             # Example: see GEOM_TestOthers.py
11271             self.GroupOp.UnionList(theGroup, theSubShapes)
11272             RaiseIfFailed("UnionList", self.GroupOp)
11273             pass
11274
11275         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11276         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11277         #  @param theSubShapes is a list of indices of sub-shapes to be added.
11278         #
11279         #  @ref swig_UnionIDs "Example"
11280         def UnionIDs(self,theGroup, theSubShapes):
11281             """
11282             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11283
11284             Parameters:
11285                 theGroup is a GEOM group to which the new sub-shapes are added.
11286                 theSubShapes is a list of indices of sub-shapes to be added.
11287             """
11288             # Example: see GEOM_TestOthers.py
11289             self.GroupOp.UnionIDs(theGroup, theSubShapes)
11290             RaiseIfFailed("UnionIDs", self.GroupOp)
11291             pass
11292
11293         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11294         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11295         #  @param theSubShapes is a list of sub-shapes to be removed.
11296         #
11297         #  @ref tui_working_with_groups_page "Example"
11298         def DifferenceList (self,theGroup, theSubShapes):
11299             """
11300             Removes from the group all the given shapes. No errors, if some shapes are not included.
11301
11302             Parameters:
11303                 theGroup is a GEOM group from which the sub-shapes are removed.
11304                 theSubShapes is a list of sub-shapes to be removed.
11305             """
11306             # Example: see GEOM_TestOthers.py
11307             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11308             RaiseIfFailed("DifferenceList", self.GroupOp)
11309             pass
11310
11311         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11312         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11313         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
11314         #
11315         #  @ref swig_DifferenceIDs "Example"
11316         def DifferenceIDs(self,theGroup, theSubShapes):
11317             """
11318             Removes from the group all the given shapes. No errors, if some shapes are not included.
11319
11320             Parameters:
11321                 theGroup is a GEOM group from which the sub-shapes are removed.
11322                 theSubShapes is a list of indices of sub-shapes to be removed.
11323             """            
11324             # Example: see GEOM_TestOthers.py
11325             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
11326             RaiseIfFailed("DifferenceIDs", self.GroupOp)
11327             pass
11328
11329         ## Union of two groups.
11330         #  New group is created. It will contain all entities
11331         #  which are present in groups theGroup1 and theGroup2.
11332         #  @param theGroup1, theGroup2 are the initial GEOM groups
11333         #                              to create the united group from.
11334         #  @param theName Object name; when specified, this parameter is used
11335         #         for result publication in the study. Otherwise, if automatic
11336         #         publication is switched on, default value is used for result name.
11337         #
11338         #  @return a newly created GEOM group.
11339         #
11340         #  @ref tui_union_groups_anchor "Example"
11341         def UnionGroups (self, theGroup1, theGroup2, theName=None):
11342             """
11343             Union of two groups.
11344             New group is created. It will contain all entities
11345             which are present in groups theGroup1 and theGroup2.
11346
11347             Parameters:
11348                 theGroup1, theGroup2 are the initial GEOM groups
11349                                      to create the united group from.
11350                 theName Object name; when specified, this parameter is used
11351                         for result publication in the study. Otherwise, if automatic
11352                         publication is switched on, default value is used for result name.
11353
11354             Returns:
11355                 a newly created GEOM group.
11356             """
11357             # Example: see GEOM_TestOthers.py
11358             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
11359             RaiseIfFailed("UnionGroups", self.GroupOp)
11360             self._autoPublish(aGroup, theName, "group")
11361             return aGroup
11362
11363         ## Intersection of two groups.
11364         #  New group is created. It will contain only those entities
11365         #  which are present in both groups theGroup1 and theGroup2.
11366         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11367         #  @param theName Object name; when specified, this parameter is used
11368         #         for result publication in the study. Otherwise, if automatic
11369         #         publication is switched on, default value is used for result name.
11370         #
11371         #  @return a newly created GEOM group.
11372         #
11373         #  @ref tui_intersect_groups_anchor "Example"
11374         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
11375             """
11376             Intersection of two groups.
11377             New group is created. It will contain only those entities
11378             which are present in both groups theGroup1 and theGroup2.
11379
11380             Parameters:
11381                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11382                 theName Object name; when specified, this parameter is used
11383                         for result publication in the study. Otherwise, if automatic
11384                         publication is switched on, default value is used for result name.
11385
11386             Returns:
11387                 a newly created GEOM group.
11388             """
11389             # Example: see GEOM_TestOthers.py
11390             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
11391             RaiseIfFailed("IntersectGroups", self.GroupOp)
11392             self._autoPublish(aGroup, theName, "group")
11393             return aGroup
11394
11395         ## Cut of two groups.
11396         #  New group is created. It will contain entities which are
11397         #  present in group theGroup1 but are not present in group theGroup2.
11398         #  @param theGroup1 is a GEOM group to include elements of.
11399         #  @param theGroup2 is a GEOM group to exclude elements of.
11400         #  @param theName Object name; when specified, this parameter is used
11401         #         for result publication in the study. Otherwise, if automatic
11402         #         publication is switched on, default value is used for result name.
11403         #
11404         #  @return a newly created GEOM group.
11405         #
11406         #  @ref tui_cut_groups_anchor "Example"
11407         def CutGroups (self, theGroup1, theGroup2, theName=None):
11408             """
11409             Cut of two groups.
11410             New group is created. It will contain entities which are
11411             present in group theGroup1 but are not present in group theGroup2.
11412
11413             Parameters:
11414                 theGroup1 is a GEOM group to include elements of.
11415                 theGroup2 is a GEOM group to exclude elements of.
11416                 theName Object name; when specified, this parameter is used
11417                         for result publication in the study. Otherwise, if automatic
11418                         publication is switched on, default value is used for result name.
11419
11420             Returns:
11421                 a newly created GEOM group.
11422             """
11423             # Example: see GEOM_TestOthers.py
11424             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
11425             RaiseIfFailed("CutGroups", self.GroupOp)
11426             self._autoPublish(aGroup, theName, "group")
11427             return aGroup
11428
11429         ## Union of list of groups.
11430         #  New group is created. It will contain all entities that are
11431         #  present in groups listed in theGList.
11432         #  @param theGList is a list of GEOM groups to create the united group from.
11433         #  @param theName Object name; when specified, this parameter is used
11434         #         for result publication in the study. Otherwise, if automatic
11435         #         publication is switched on, default value is used for result name.
11436         #
11437         #  @return a newly created GEOM group.
11438         #
11439         #  @ref tui_union_groups_anchor "Example"
11440         def UnionListOfGroups (self, theGList, theName=None):
11441             """
11442             Union of list of groups.
11443             New group is created. It will contain all entities that are
11444             present in groups listed in theGList.
11445
11446             Parameters:
11447                 theGList is a list of GEOM groups to create the united group from.
11448                 theName Object name; when specified, this parameter is used
11449                         for result publication in the study. Otherwise, if automatic
11450                         publication is switched on, default value is used for result name.
11451
11452             Returns:
11453                 a newly created GEOM group.
11454             """
11455             # Example: see GEOM_TestOthers.py
11456             aGroup = self.GroupOp.UnionListOfGroups(theGList)
11457             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
11458             self._autoPublish(aGroup, theName, "group")
11459             return aGroup
11460
11461         ## Cut of lists of groups.
11462         #  New group is created. It will contain only entities
11463         #  which are present in groups listed in theGList.
11464         #  @param theGList is a list of GEOM groups to include elements of.
11465         #  @param theName Object name; when specified, this parameter is used
11466         #         for result publication in the study. Otherwise, if automatic
11467         #         publication is switched on, default value is used for result name.
11468         #
11469         #  @return a newly created GEOM group.
11470         #
11471         #  @ref tui_intersect_groups_anchor "Example"
11472         def IntersectListOfGroups (self, theGList, theName=None):
11473             """
11474             Cut of lists of groups.
11475             New group is created. It will contain only entities
11476             which are present in groups listed in theGList.
11477
11478             Parameters:
11479                 theGList is a list of GEOM groups to include elements of.
11480                 theName Object name; when specified, this parameter is used
11481                         for result publication in the study. Otherwise, if automatic
11482                         publication is switched on, default value is used for result name.
11483
11484             Returns:
11485                 a newly created GEOM group.
11486             """
11487             # Example: see GEOM_TestOthers.py
11488             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
11489             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
11490             self._autoPublish(aGroup, theName, "group")
11491             return aGroup
11492
11493         ## Cut of lists of groups.
11494         #  New group is created. It will contain only entities
11495         #  which are present in groups listed in theGList1 but 
11496         #  are not present in groups from theGList2.
11497         #  @param theGList1 is a list of GEOM groups to include elements of.
11498         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11499         #  @param theName Object name; when specified, this parameter is used
11500         #         for result publication in the study. Otherwise, if automatic
11501         #         publication is switched on, default value is used for result name.
11502         #
11503         #  @return a newly created GEOM group.
11504         #
11505         #  @ref tui_cut_groups_anchor "Example"
11506         def CutListOfGroups (self, theGList1, theGList2, theName=None):
11507             """
11508             Cut of lists of groups.
11509             New group is created. It will contain only entities
11510             which are present in groups listed in theGList1 but 
11511             are not present in groups from theGList2.
11512
11513             Parameters:
11514                 theGList1 is a list of GEOM groups to include elements of.
11515                 theGList2 is a list of GEOM groups to exclude elements of.
11516                 theName Object name; when specified, this parameter is used
11517                         for result publication in the study. Otherwise, if automatic
11518                         publication is switched on, default value is used for result name.
11519
11520             Returns:
11521                 a newly created GEOM group.
11522             """
11523             # Example: see GEOM_TestOthers.py
11524             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
11525             RaiseIfFailed("CutListOfGroups", self.GroupOp)
11526             self._autoPublish(aGroup, theName, "group")
11527             return aGroup
11528
11529         ## Returns a list of sub-objects ID stored in the group
11530         #  @param theGroup is a GEOM group for which a list of IDs is requested
11531         #
11532         #  @ref swig_GetObjectIDs "Example"
11533         def GetObjectIDs(self,theGroup):
11534             """
11535             Returns a list of sub-objects ID stored in the group
11536
11537             Parameters:
11538                 theGroup is a GEOM group for which a list of IDs is requested
11539             """
11540             # Example: see GEOM_TestOthers.py
11541             ListIDs = self.GroupOp.GetObjects(theGroup)
11542             RaiseIfFailed("GetObjects", self.GroupOp)
11543             return ListIDs
11544
11545         ## Returns a type of sub-objects stored in the group
11546         #  @param theGroup is a GEOM group which type is returned.
11547         #
11548         #  @ref swig_GetType "Example"
11549         def GetType(self,theGroup):
11550             """
11551             Returns a type of sub-objects stored in the group
11552
11553             Parameters:
11554                 theGroup is a GEOM group which type is returned.
11555             """
11556             # Example: see GEOM_TestOthers.py
11557             aType = self.GroupOp.GetType(theGroup)
11558             RaiseIfFailed("GetType", self.GroupOp)
11559             return aType
11560
11561         ## Convert a type of geom object from id to string value
11562         #  @param theId is a GEOM obect type id.
11563         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11564         #  @ref swig_GetType "Example"
11565         def ShapeIdToType(self, theId):
11566             """
11567             Convert a type of geom object from id to string value
11568
11569             Parameters:
11570                 theId is a GEOM obect type id.
11571                 
11572             Returns:
11573                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11574             """
11575             if theId == 0:
11576                 return "COPY"
11577             if theId == 1:
11578                 return "IMPORT"
11579             if theId == 2:
11580                 return "POINT"
11581             if theId == 3:
11582                 return "VECTOR"
11583             if theId == 4:
11584                 return "PLANE"
11585             if theId == 5:
11586                 return "LINE"
11587             if theId == 6:
11588                 return "TORUS"
11589             if theId == 7:
11590                 return "BOX"
11591             if theId == 8:
11592                 return "CYLINDER"
11593             if theId == 9:
11594                 return "CONE"
11595             if theId == 10:
11596                 return "SPHERE"
11597             if theId == 11:
11598                 return "PRISM"
11599             if theId == 12:
11600                 return "REVOLUTION"
11601             if theId == 13:
11602                 return "BOOLEAN"
11603             if theId == 14:
11604                 return "PARTITION"
11605             if theId == 15:
11606                 return "POLYLINE"
11607             if theId == 16:
11608                 return "CIRCLE"
11609             if theId == 17:
11610                 return "SPLINE"
11611             if theId == 18:
11612                 return "ELLIPSE"
11613             if theId == 19:
11614                 return "CIRC_ARC"
11615             if theId == 20:
11616                 return "FILLET"
11617             if theId == 21:
11618                 return "CHAMFER"
11619             if theId == 22:
11620                 return "EDGE"
11621             if theId == 23:
11622                 return "WIRE"
11623             if theId == 24:
11624                 return "FACE"
11625             if theId == 25:
11626                 return "SHELL"
11627             if theId == 26:
11628                 return "SOLID"
11629             if theId == 27:
11630                 return "COMPOUND"
11631             if theId == 28:
11632                 return "SUBSHAPE"
11633             if theId == 29:
11634                 return "PIPE"
11635             if theId == 30:
11636                 return "ARCHIMEDE"
11637             if theId == 31:
11638                 return "FILLING"
11639             if theId == 32:
11640                 return "EXPLODE"
11641             if theId == 33:
11642                 return "GLUED"
11643             if theId == 34:
11644                 return "SKETCHER"
11645             if theId == 35:
11646                 return "CDG"
11647             if theId == 36:
11648                 return "FREE_BOUNDS"
11649             if theId == 37:
11650                 return "GROUP"
11651             if theId == 38:
11652                 return "BLOCK"
11653             if theId == 39:
11654                 return "MARKER"
11655             if theId == 40:
11656                 return "THRUSECTIONS"
11657             if theId == 41:
11658                 return "COMPOUNDFILTER"
11659             if theId == 42:
11660                 return "SHAPES_ON_SHAPE"
11661             if theId == 43:
11662                 return "ELLIPSE_ARC"
11663             if theId == 44:
11664                 return "3DSKETCHER"
11665             if theId == 45:
11666                 return "FILLET_2D"
11667             if theId == 46:
11668                 return "FILLET_1D"
11669             if theId == 201:
11670                 return "PIPETSHAPE"
11671             return "Shape Id not exist."
11672
11673         ## Returns a main shape associated with the group
11674         #  @param theGroup is a GEOM group for which a main shape object is requested
11675         #  @return a GEOM object which is a main shape for theGroup
11676         #
11677         #  @ref swig_GetMainShape "Example"
11678         def GetMainShape(self,theGroup):
11679             """
11680             Returns a main shape associated with the group
11681
11682             Parameters:
11683                 theGroup is a GEOM group for which a main shape object is requested
11684
11685             Returns:
11686                 a GEOM object which is a main shape for theGroup
11687
11688             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
11689             """
11690             # Example: see GEOM_TestOthers.py
11691             anObj = self.GroupOp.GetMainShape(theGroup)
11692             RaiseIfFailed("GetMainShape", self.GroupOp)
11693             return anObj
11694
11695         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
11696         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11697         #  @param theShape given shape (see GEOM.GEOM_Object)
11698         #  @param min_length minimum length of edges of theShape
11699         #  @param max_length maximum length of edges of theShape
11700         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11701         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11702         #  @param theName Object name; when specified, this parameter is used
11703         #         for result publication in the study. Otherwise, if automatic
11704         #         publication is switched on, default value is used for result name.
11705         #
11706         #  @return a newly created GEOM group of edges
11707         #
11708         #  @@ref swig_todo "Example"
11709         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
11710             """
11711             Create group of edges of theShape, whose length is in range [min_length, max_length].
11712             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11713
11714             Parameters:
11715                 theShape given shape
11716                 min_length minimum length of edges of theShape
11717                 max_length maximum length of edges of theShape
11718                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11719                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11720                 theName Object name; when specified, this parameter is used
11721                         for result publication in the study. Otherwise, if automatic
11722                         publication is switched on, default value is used for result name.
11723
11724              Returns:
11725                 a newly created GEOM group of edges.
11726             """
11727             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
11728             edges_in_range = []
11729             for edge in edges:
11730                 Props = self.BasicProperties(edge)
11731                 if min_length <= Props[0] and Props[0] <= max_length:
11732                     if (not include_min) and (min_length == Props[0]):
11733                         skip = 1
11734                     else:
11735                         if (not include_max) and (Props[0] == max_length):
11736                             skip = 1
11737                         else:
11738                             edges_in_range.append(edge)
11739
11740             if len(edges_in_range) <= 0:
11741                 print "No edges found by given criteria"
11742                 return None
11743
11744             # note: auto-publishing is done in self.CreateGroup()
11745             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
11746             self.UnionList(group_edges, edges_in_range)
11747
11748             return group_edges
11749
11750         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
11751         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11752         #  @param min_length minimum length of edges of selected shape
11753         #  @param max_length maximum length of edges of selected shape
11754         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11755         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11756         #  @return a newly created GEOM group of edges
11757         #  @ref swig_todo "Example"
11758         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
11759             """
11760             Create group of edges of selected shape, whose length is in range [min_length, max_length].
11761             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11762
11763             Parameters:
11764                 min_length minimum length of edges of selected shape
11765                 max_length maximum length of edges of selected shape
11766                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11767                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11768
11769              Returns:
11770                 a newly created GEOM group of edges.
11771             """
11772             nb_selected = sg.SelectedCount()
11773             if nb_selected < 1:
11774                 print "Select a shape before calling this function, please."
11775                 return 0
11776             if nb_selected > 1:
11777                 print "Only one shape must be selected"
11778                 return 0
11779
11780             id_shape = sg.getSelected(0)
11781             shape = IDToObject( id_shape )
11782
11783             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
11784
11785             left_str  = " < "
11786             right_str = " < "
11787             if include_min: left_str  = " <= "
11788             if include_max: right_str  = " <= "
11789
11790             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
11791                                     + left_str + "length" + right_str + `max_length`)
11792
11793             sg.updateObjBrowser(1)
11794
11795             return group_edges
11796
11797         # end of l3_groups
11798         ## @}
11799
11800         ## @addtogroup l4_advanced
11801         ## @{
11802
11803         ## Create a T-shape object with specified caracteristics for the main
11804         #  and the incident pipes (radius, width, half-length).
11805         #  The extremities of the main pipe are located on junctions points P1 and P2.
11806         #  The extremity of the incident pipe is located on junction point P3.
11807         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11808         #  the main plane of the T-shape is XOY.
11809         #
11810         #  @param theR1 Internal radius of main pipe
11811         #  @param theW1 Width of main pipe
11812         #  @param theL1 Half-length of main pipe
11813         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11814         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11815         #  @param theL2 Half-length of incident pipe
11816         #
11817         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11818         #  @param theP1 1st junction point of main pipe
11819         #  @param theP2 2nd junction point of main pipe
11820         #  @param theP3 Junction point of incident pipe
11821         #
11822         #  @param theRL Internal radius of left thickness reduction
11823         #  @param theWL Width of left thickness reduction
11824         #  @param theLtransL Length of left transition part
11825         #  @param theLthinL Length of left thin part
11826         #
11827         #  @param theRR Internal radius of right thickness reduction
11828         #  @param theWR Width of right thickness reduction
11829         #  @param theLtransR Length of right transition part
11830         #  @param theLthinR Length of right thin part
11831         #
11832         #  @param theRI Internal radius of incident thickness reduction
11833         #  @param theWI Width of incident thickness reduction
11834         #  @param theLtransI Length of incident transition part
11835         #  @param theLthinI Length of incident thin part
11836         #
11837         #  @param theName Object name; when specified, this parameter is used
11838         #         for result publication in the study. Otherwise, if automatic
11839         #         publication is switched on, default value is used for result name.
11840         #
11841         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11842         #
11843         #  @ref tui_creation_pipetshape "Example"
11844         def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
11845                             theHexMesh=True, theP1=None, theP2=None, theP3=None,
11846                             theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11847                             theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11848                             theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11849                             theName=None):
11850             """
11851             Create a T-shape object with specified caracteristics for the main
11852             and the incident pipes (radius, width, half-length).
11853             The extremities of the main pipe are located on junctions points P1 and P2.
11854             The extremity of the incident pipe is located on junction point P3.
11855             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11856             the main plane of the T-shape is XOY.
11857
11858             Parameters:
11859                 theR1 Internal radius of main pipe
11860                 theW1 Width of main pipe
11861                 theL1 Half-length of main pipe
11862                 theR2 Internal radius of incident pipe (R2 < R1)
11863                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11864                 theL2 Half-length of incident pipe
11865                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11866                 theP1 1st junction point of main pipe
11867                 theP2 2nd junction point of main pipe
11868                 theP3 Junction point of incident pipe
11869
11870                 theRL Internal radius of left thickness reduction
11871                 theWL Width of left thickness reduction
11872                 theLtransL Length of left transition part
11873                 theLthinL Length of left thin part
11874
11875                 theRR Internal radius of right thickness reduction
11876                 theWR Width of right thickness reduction
11877                 theLtransR Length of right transition part
11878                 theLthinR Length of right thin part
11879
11880                 theRI Internal radius of incident thickness reduction
11881                 theWI Width of incident thickness reduction
11882                 theLtransI Length of incident transition part
11883                 theLthinI Length of incident thin part
11884
11885                 theName Object name; when specified, this parameter is used
11886                         for result publication in the study. Otherwise, if automatic
11887                         publication is switched on, default value is used for result name.
11888
11889             Returns:
11890                 List of GEOM_Object, containing the created shape and propagation groups.
11891
11892             Example of usage:
11893                 # create PipeTShape object
11894                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
11895                 # create PipeTShape object with position
11896                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
11897                 # create PipeTShape object with left thickness reduction
11898                 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
11899             """
11900             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)
11901             if (theP1 and theP2 and theP3):
11902                 anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11903                                                                 theRL, theWL, theLtransL, theLthinL,
11904                                                                 theRR, theWR, theLtransR, theLthinR,
11905                                                                 theRI, theWI, theLtransI, theLthinI,
11906                                                                 theHexMesh, theP1, theP2, theP3)
11907             else:
11908                 anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
11909                                                     theRL, theWL, theLtransL, theLthinL,
11910                                                     theRR, theWR, theLtransR, theLthinR,
11911                                                     theRI, theWI, theLtransI, theLthinI,
11912                                                     theHexMesh)
11913             RaiseIfFailed("MakePipeTShape", self.AdvOp)
11914             if Parameters: anObj[0].SetParameters(Parameters)
11915             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11916             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11917             return anObj
11918
11919         ## Create a T-shape object with chamfer and with specified caracteristics for the main
11920         #  and the incident pipes (radius, width, half-length). The chamfer is
11921         #  created on the junction of the pipes.
11922         #  The extremities of the main pipe are located on junctions points P1 and P2.
11923         #  The extremity of the incident pipe is located on junction point P3.
11924         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11925         #  the main plane of the T-shape is XOY.
11926         #  @param theR1 Internal radius of main pipe
11927         #  @param theW1 Width of main pipe
11928         #  @param theL1 Half-length of main pipe
11929         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11930         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11931         #  @param theL2 Half-length of incident pipe
11932         #  @param theH Height of the chamfer.
11933         #  @param theW Width of the chamfer.
11934         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11935         #  @param theP1 1st junction point of main pipe
11936         #  @param theP2 2nd junction point of main pipe
11937         #  @param theP3 Junction point of incident pipe
11938         #
11939         #  @param theRL Internal radius of left thickness reduction
11940         #  @param theWL Width of left thickness reduction
11941         #  @param theLtransL Length of left transition part
11942         #  @param theLthinL Length of left thin part
11943         #
11944         #  @param theRR Internal radius of right thickness reduction
11945         #  @param theWR Width of right thickness reduction
11946         #  @param theLtransR Length of right transition part
11947         #  @param theLthinR Length of right thin part
11948         #
11949         #  @param theRI Internal radius of incident thickness reduction
11950         #  @param theWI Width of incident thickness reduction
11951         #  @param theLtransI Length of incident transition part
11952         #  @param theLthinI Length of incident thin part
11953         #
11954         #  @param theName Object name; when specified, this parameter is used
11955         #         for result publication in the study. Otherwise, if automatic
11956         #         publication is switched on, default value is used for result name.
11957         #
11958         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11959         #
11960         #  @ref tui_creation_pipetshape "Example"
11961         def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
11962                                    theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
11963                                    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11964                                    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11965                                    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11966                                    theName=None):
11967             """
11968             Create a T-shape object with chamfer and with specified caracteristics for the main
11969             and the incident pipes (radius, width, half-length). The chamfer is
11970             created on the junction of the pipes.
11971             The extremities of the main pipe are located on junctions points P1 and P2.
11972             The extremity of the incident pipe is located on junction point P3.
11973             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11974             the main plane of the T-shape is XOY.
11975
11976             Parameters:
11977                 theR1 Internal radius of main pipe
11978                 theW1 Width of main pipe
11979                 theL1 Half-length of main pipe
11980                 theR2 Internal radius of incident pipe (R2 < R1)
11981                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11982                 theL2 Half-length of incident pipe
11983                 theH Height of the chamfer.
11984                 theW Width of the chamfer.
11985                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11986                 theP1 1st junction point of main pipe
11987                 theP2 2nd junction point of main pipe
11988                 theP3 Junction point of incident pipe
11989
11990                 theRL Internal radius of left thickness reduction
11991                 theWL Width of left thickness reduction
11992                 theLtransL Length of left transition part
11993                 theLthinL Length of left thin part
11994
11995                 theRR Internal radius of right thickness reduction
11996                 theWR Width of right thickness reduction
11997                 theLtransR Length of right transition part
11998                 theLthinR Length of right thin part
11999
12000                 theRI Internal radius of incident thickness reduction
12001                 theWI Width of incident thickness reduction
12002                 theLtransI Length of incident transition part
12003                 theLthinI Length of incident thin part
12004
12005                 theName Object name; when specified, this parameter is used
12006                         for result publication in the study. Otherwise, if automatic
12007                         publication is switched on, default value is used for result name.
12008
12009             Returns:
12010                 List of GEOM_Object, containing the created shape and propagation groups.
12011
12012             Example of usage:
12013                 # create PipeTShape with chamfer object
12014                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
12015                 # create PipeTShape with chamfer object with position
12016                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
12017                 # create PipeTShape with chamfer object with left thickness reduction
12018                 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)
12019             """
12020             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)
12021             if (theP1 and theP2 and theP3):
12022               anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12023                                                                      theRL, theWL, theLtransL, theLthinL,
12024                                                                      theRR, theWR, theLtransR, theLthinR,
12025                                                                      theRI, theWI, theLtransI, theLthinI,
12026                                                                      theH, theW, theHexMesh, theP1, theP2, theP3)
12027             else:
12028               anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
12029                                                          theRL, theWL, theLtransL, theLthinL,
12030                                                          theRR, theWR, theLtransR, theLthinR,
12031                                                          theRI, theWI, theLtransI, theLthinI,
12032                                                          theH, theW, theHexMesh)
12033             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
12034             if Parameters: anObj[0].SetParameters(Parameters)
12035             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12036             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12037             return anObj
12038
12039         ## Create a T-shape object with fillet and with specified caracteristics for the main
12040         #  and the incident pipes (radius, width, half-length). The fillet is
12041         #  created on the junction of the pipes.
12042         #  The extremities of the main pipe are located on junctions points P1 and P2.
12043         #  The extremity of the incident pipe is located on junction point P3.
12044         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12045         #  the main plane of the T-shape is XOY.
12046         #  @param theR1 Internal radius of main pipe
12047         #  @param theW1 Width of main pipe
12048         #  @param theL1 Half-length of main pipe
12049         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12050         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12051         #  @param theL2 Half-length of incident pipe
12052         #  @param theRF Radius of curvature of fillet.
12053         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12054         #  @param theP1 1st junction point of main pipe
12055         #  @param theP2 2nd junction point of main pipe
12056         #  @param theP3 Junction point of incident pipe
12057         #
12058         #  @param theRL Internal radius of left thickness reduction
12059         #  @param theWL Width of left thickness reduction
12060         #  @param theLtransL Length of left transition part
12061         #  @param theLthinL Length of left thin part
12062         #
12063         #  @param theRR Internal radius of right thickness reduction
12064         #  @param theWR Width of right thickness reduction
12065         #  @param theLtransR Length of right transition part
12066         #  @param theLthinR Length of right thin part
12067         #
12068         #  @param theRI Internal radius of incident thickness reduction
12069         #  @param theWI Width of incident thickness reduction
12070         #  @param theLtransI Length of incident transition part
12071         #  @param theLthinI Length of incident thin part
12072         #
12073         #  @param theName Object name; when specified, this parameter is used
12074         #         for result publication in the study. Otherwise, if automatic
12075         #         publication is switched on, default value is used for result name.
12076         #
12077         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12078         #
12079         #  @ref tui_creation_pipetshape "Example"
12080         def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
12081                                   theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12082                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12083                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12084                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12085                                   theName=None):
12086             """
12087             Create a T-shape object with fillet and with specified caracteristics for the main
12088             and the incident pipes (radius, width, half-length). The fillet is
12089             created on the junction of the pipes.
12090             The extremities of the main pipe are located on junctions points P1 and P2.
12091             The extremity of the incident pipe is located on junction point P3.
12092
12093             Parameters:
12094                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12095                 the main plane of the T-shape is XOY.
12096                 theR1 Internal radius of main pipe
12097                 theW1 Width of main pipe
12098                 heL1 Half-length of main pipe
12099                 theR2 Internal radius of incident pipe (R2 < R1)
12100                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12101                 theL2 Half-length of incident pipe
12102                 theRF Radius of curvature of fillet.
12103                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12104                 theP1 1st junction point of main pipe
12105                 theP2 2nd junction point of main pipe
12106                 theP3 Junction point of incident pipe
12107
12108                 theRL Internal radius of left thickness reduction
12109                 theWL Width of left thickness reduction
12110                 theLtransL Length of left transition part
12111                 theLthinL Length of left thin part
12112
12113                 theRR Internal radius of right thickness reduction
12114                 theWR Width of right thickness reduction
12115                 theLtransR Length of right transition part
12116                 theLthinR Length of right thin part
12117
12118                 theRI Internal radius of incident thickness reduction
12119                 theWI Width of incident thickness reduction
12120                 theLtransI Length of incident transition part
12121                 theLthinI Length of incident thin part
12122
12123                 theName Object name; when specified, this parameter is used
12124                         for result publication in the study. Otherwise, if automatic
12125                         publication is switched on, default value is used for result name.
12126                 
12127             Returns:
12128                 List of GEOM_Object, containing the created shape and propagation groups.
12129                 
12130             Example of usage:
12131                 # create PipeTShape with fillet object
12132                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
12133                 # create PipeTShape with fillet object with position
12134                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
12135                 # create PipeTShape with fillet object with left thickness reduction
12136                 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)
12137             """
12138             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)
12139             if (theP1 and theP2 and theP3):
12140               anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12141                                                                     theRL, theWL, theLtransL, theLthinL,
12142                                                                     theRR, theWR, theLtransR, theLthinR,
12143                                                                     theRI, theWI, theLtransI, theLthinI,
12144                                                                     theRF, theHexMesh, theP1, theP2, theP3)
12145             else:
12146               anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
12147                                                         theRL, theWL, theLtransL, theLthinL,
12148                                                         theRR, theWR, theLtransR, theLthinR,
12149                                                         theRI, theWI, theLtransI, theLthinI,
12150                                                         theRF, theHexMesh)
12151             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
12152             if Parameters: anObj[0].SetParameters(Parameters)
12153             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12154             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12155             return anObj
12156
12157         ## This function allows creating a disk already divided into blocks. It
12158         #  can be used to create divided pipes for later meshing in hexaedra.
12159         #  @param theR Radius of the disk
12160         #  @param theOrientation Orientation of the plane on which the disk will be built
12161         #         1 = XOY, 2 = OYZ, 3 = OZX
12162         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12163         #  @param theName Object name; when specified, this parameter is used
12164         #         for result publication in the study. Otherwise, if automatic
12165         #         publication is switched on, default value is used for result name.
12166         #
12167         #  @return New GEOM_Object, containing the created shape.
12168         #
12169         #  @ref tui_creation_divideddisk "Example"
12170         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
12171             """
12172             Creates a disk, divided into blocks. It can be used to create divided pipes
12173             for later meshing in hexaedra.
12174
12175             Parameters:
12176                 theR Radius of the disk
12177                 theOrientation Orientation of the plane on which the disk will be built:
12178                                1 = XOY, 2 = OYZ, 3 = OZX
12179                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12180                 theName Object name; when specified, this parameter is used
12181                         for result publication in the study. Otherwise, if automatic
12182                         publication is switched on, default value is used for result name.
12183
12184             Returns:
12185                 New GEOM_Object, containing the created shape.
12186             """
12187             theR, Parameters = ParseParameters(theR)
12188             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
12189             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
12190             if Parameters: anObj.SetParameters(Parameters)
12191             self._autoPublish(anObj, theName, "dividedDisk")
12192             return anObj
12193             
12194         ## This function allows creating a disk already divided into blocks. It
12195         #  can be used to create divided pipes for later meshing in hexaedra.
12196         #  @param theCenter Center of the disk
12197         #  @param theVector Normal vector to the plane of the created disk
12198         #  @param theRadius Radius of the disk
12199         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12200         #  @param theName Object name; when specified, this parameter is used
12201         #         for result publication in the study. Otherwise, if automatic
12202         #         publication is switched on, default value is used for result name.
12203         #
12204         #  @return New GEOM_Object, containing the created shape.
12205         #
12206         #  @ref tui_creation_divideddisk "Example"
12207         def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
12208             """
12209             Creates a disk already divided into blocks. It can be used to create divided pipes
12210             for later meshing in hexaedra.
12211
12212             Parameters:
12213                 theCenter Center of the disk
12214                 theVector Normal vector to the plane of the created disk
12215                 theRadius Radius of the disk
12216                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
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                 New GEOM_Object, containing the created shape.
12223             """
12224             theRadius, Parameters = ParseParameters(theRadius)
12225             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
12226             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
12227             if Parameters: anObj.SetParameters(Parameters)
12228             self._autoPublish(anObj, theName, "dividedDisk")
12229             return anObj
12230
12231         ## Builds a cylinder prepared for hexa meshes
12232         #  @param theR Radius of the cylinder
12233         #  @param theH Height of the cylinder
12234         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12235         #  @param theName Object name; when specified, this parameter is used
12236         #         for result publication in the study. Otherwise, if automatic
12237         #         publication is switched on, default value is used for result name.
12238         #
12239         #  @return New GEOM_Object, containing the created shape.
12240         #
12241         #  @ref tui_creation_dividedcylinder "Example"
12242         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
12243             """
12244             Builds a cylinder prepared for hexa meshes
12245
12246             Parameters:
12247                 theR Radius of the cylinder
12248                 theH Height of the cylinder
12249                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12250                 theName Object name; when specified, this parameter is used
12251                         for result publication in the study. Otherwise, if automatic
12252                         publication is switched on, default value is used for result name.
12253
12254             Returns:
12255                 New GEOM_Object, containing the created shape.
12256             """
12257             theR, theH, Parameters = ParseParameters(theR, theH)
12258             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
12259             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
12260             if Parameters: anObj.SetParameters(Parameters)
12261             self._autoPublish(anObj, theName, "dividedCylinder")
12262             return anObj
12263
12264         ## Create a surface from a cloud of points
12265         #  @param thelPoints list of points
12266         #  @return New GEOM_Object, containing the created shape.
12267         #
12268         #  @ref tui_creation_smoothingsurface "Example"
12269         def MakeSmoothingSurface(self, thelPoints):
12270             anObj = self.AdvOp.MakeSmoothingSurface(thelPoints)
12271             RaiseIfFailed("MakeSmoothingSurface", self.AdvOp)
12272             return anObj
12273
12274         #@@ insert new functions before this line @@ do not remove this line @@#
12275
12276         # end of l4_advanced
12277         ## @}
12278
12279         ## Create a copy of the given object
12280         #
12281         #  @param theOriginal geometry object for copy
12282         #  @param theName Object name; when specified, this parameter is used
12283         #         for result publication in the study. Otherwise, if automatic
12284         #         publication is switched on, default value is used for result name.
12285         #
12286         #  @return New GEOM_Object, containing the copied shape.
12287         #
12288         #  @ingroup l1_geomBuilder_auxiliary
12289         #  @ref swig_MakeCopy "Example"
12290         def MakeCopy(self, theOriginal, theName=None):
12291             """
12292             Create a copy of the given object
12293
12294             Parameters:
12295                 theOriginal geometry object for copy
12296                 theName Object name; when specified, this parameter is used
12297                         for result publication in the study. Otherwise, if automatic
12298                         publication is switched on, default value is used for result name.
12299
12300             Returns:
12301                 New GEOM_Object, containing the copied shape.
12302
12303             Example of usage: Copy = geompy.MakeCopy(Box)
12304             """
12305             # Example: see GEOM_TestAll.py
12306             anObj = self.InsertOp.MakeCopy(theOriginal)
12307             RaiseIfFailed("MakeCopy", self.InsertOp)
12308             self._autoPublish(anObj, theName, "copy")
12309             return anObj
12310
12311         ## Add Path to load python scripts from
12312         #  @param Path a path to load python scripts from
12313         #  @ingroup l1_geomBuilder_auxiliary
12314         def addPath(self,Path):
12315             """
12316             Add Path to load python scripts from
12317
12318             Parameters:
12319                 Path a path to load python scripts from
12320             """
12321             if (sys.path.count(Path) < 1):
12322                 sys.path.append(Path)
12323                 pass
12324             pass
12325
12326         ## Load marker texture from the file
12327         #  @param Path a path to the texture file
12328         #  @return unique texture identifier
12329         #  @ingroup l1_geomBuilder_auxiliary
12330         def LoadTexture(self, Path):
12331             """
12332             Load marker texture from the file
12333             
12334             Parameters:
12335                 Path a path to the texture file
12336                 
12337             Returns:
12338                 unique texture identifier
12339             """
12340             # Example: see GEOM_TestAll.py
12341             ID = self.InsertOp.LoadTexture(Path)
12342             RaiseIfFailed("LoadTexture", self.InsertOp)
12343             return ID
12344
12345         ## Get internal name of the object based on its study entry
12346         #  @note This method does not provide an unique identifier of the geometry object.
12347         #  @note This is internal function of GEOM component, though it can be used outside it for 
12348         #  appropriate reason (e.g. for identification of geometry object).
12349         #  @param obj geometry object
12350         #  @return unique object identifier
12351         #  @ingroup l1_geomBuilder_auxiliary
12352         def getObjectID(self, obj):
12353             """
12354             Get internal name of the object based on its study entry.
12355             Note: this method does not provide an unique identifier of the geometry object.
12356             It is an internal function of GEOM component, though it can be used outside GEOM for 
12357             appropriate reason (e.g. for identification of geometry object).
12358
12359             Parameters:
12360                 obj geometry object
12361
12362             Returns:
12363                 unique object identifier
12364             """
12365             ID = ""
12366             entry = salome.ObjectToID(obj)
12367             if entry is not None:
12368                 lst = entry.split(":")
12369                 if len(lst) > 0:
12370                     ID = lst[-1] # -1 means last item in the list            
12371                     return "GEOM_" + ID
12372             return ID
12373                 
12374             
12375
12376         ## Add marker texture. @a Width and @a Height parameters
12377         #  specify width and height of the texture in pixels.
12378         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12379         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12380         #  parameter should be unpacked string, in which '1' symbols represent opaque
12381         #  pixels and '0' represent transparent pixels of the texture bitmap.
12382         #
12383         #  @param Width texture width in pixels
12384         #  @param Height texture height in pixels
12385         #  @param Texture texture data
12386         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12387         #  @return unique texture identifier
12388         #  @ingroup l1_geomBuilder_auxiliary
12389         def AddTexture(self, Width, Height, Texture, RowData=False):
12390             """
12391             Add marker texture. Width and Height parameters
12392             specify width and height of the texture in pixels.
12393             If RowData is True, Texture parameter should represent texture data
12394             packed into the byte array. If RowData is False (default), Texture
12395             parameter should be unpacked string, in which '1' symbols represent opaque
12396             pixels and '0' represent transparent pixels of the texture bitmap.
12397
12398             Parameters:
12399                 Width texture width in pixels
12400                 Height texture height in pixels
12401                 Texture texture data
12402                 RowData if True, Texture data are packed in the byte stream
12403
12404             Returns:
12405                 return unique texture identifier
12406             """
12407             if not RowData: Texture = PackData(Texture)
12408             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12409             RaiseIfFailed("AddTexture", self.InsertOp)
12410             return ID
12411
12412         ## Creates a new folder object. It is a container for any GEOM objects.
12413         #  @param Name name of the container
12414         #  @param Father parent object. If None, 
12415         #         folder under 'Geometry' root object will be created.
12416         #  @return a new created folder
12417         def NewFolder(self, Name, Father=None):
12418             """
12419             Create a new folder object. It is an auxiliary container for any GEOM objects.
12420             
12421             Parameters:
12422                 Name name of the container
12423                 Father parent object. If None, 
12424                 folder under 'Geometry' root object will be created.
12425             
12426             Returns:
12427                 a new created folder
12428             """
12429             if not Father: Father = self.father
12430             return self.CreateFolder(Name, Father)
12431
12432         ## Move object to the specified folder
12433         #  @param Object object to move
12434         #  @param Folder target folder
12435         def PutToFolder(self, Object, Folder):
12436             """
12437             Move object to the specified folder
12438             
12439             Parameters:
12440                 Object object to move
12441                 Folder target folder
12442             """
12443             self.MoveToFolder(Object, Folder)
12444             pass
12445
12446         ## Move list of objects to the specified folder
12447         #  @param ListOfSO list of objects to move
12448         #  @param Folder target folder
12449         def PutListToFolder(self, ListOfSO, Folder):
12450             """
12451             Move list of objects to the specified folder
12452             
12453             Parameters:
12454                 ListOfSO list of objects to move
12455                 Folder target folder
12456             """
12457             self.MoveListToFolder(ListOfSO, Folder)
12458             pass
12459
12460 import omniORB
12461 # Register the new proxy for GEOM_Gen
12462 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
12463
12464 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
12465 #  interface to GEOM operations.
12466 #
12467 #  Typical use is:
12468 #  \code
12469 #    import salome
12470 #    salome.salome_init()
12471 #    from salome.geom import geomBuilder
12472 #    geompy = geomBuilder.New(salome.myStudy)
12473 #  \endcode
12474 #  @param  study     SALOME study, generally obtained by salome.myStudy.
12475 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12476 #  @return geomBuilder instance
12477 def New( study, instance=None):
12478     """
12479     Create a new geomBuilder instance.The geomBuilder class provides the Python
12480     interface to GEOM operations.
12481
12482     Typical use is:
12483         import salome
12484         salome.salome_init()
12485         from salome.geom import geomBuilder
12486         geompy = geomBuilder.New(salome.myStudy)
12487
12488     Parameters:
12489         study     SALOME study, generally obtained by salome.myStudy.
12490         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12491     Returns:
12492         geomBuilder instance
12493     """
12494     #print "New geomBuilder ", study, instance
12495     global engine
12496     global geom
12497     global doLcc
12498     engine = instance
12499     if engine is None:
12500       doLcc = True
12501     geom = geomBuilder()
12502     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
12503     geom.init_geom(study)
12504     return geom