Salome HOME
Merge from BR_V7_main_Field branch (02/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 ##   @defgroup l2_field         Field on Geometry
196
197 ## @}
198
199 # initialize SALOME session in try/except block
200 # to avoid problems in some cases, e.g. when generating documentation
201 try:
202     import salome
203     salome.salome_init()
204     from salome import *
205 except:
206     pass
207
208 from salome_notebook import *
209
210 import GEOM
211 import math
212 import os
213
214 from salome.geom.gsketcher import Sketcher3D, Sketcher2D
215
216 # service function
217 def _toListOfNames(_names, _size=-1):
218     l = []
219     import types
220     if type(_names) in [types.ListType, types.TupleType]:
221         for i in _names: l.append(i)
222     elif _names:
223         l.append(_names)
224     if l and len(l) < _size:
225         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
226     return l
227
228 ## Raise an Error, containing the Method_name, if Operation is Failed
229 ## @ingroup l1_geomBuilder_auxiliary
230 def RaiseIfFailed (Method_name, Operation):
231     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
232         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
233
234 ## Return list of variables value from salome notebook
235 ## @ingroup l1_geomBuilder_auxiliary
236 def ParseParameters(*parameters):
237     Result = []
238     StringResult = []
239     for parameter in parameters:
240         if isinstance(parameter, list):
241             lResults = ParseParameters(*parameter)
242             if len(lResults) > 0:
243                 Result.append(lResults[:-1])
244                 StringResult += lResults[-1].split(":")
245                 pass
246             pass
247         else:
248             if isinstance(parameter,str):
249                 if notebook.isVariable(parameter):
250                     Result.append(notebook.get(parameter))
251                 else:
252                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
253                 pass
254             else:
255                 Result.append(parameter)
256                 pass
257             StringResult.append(str(parameter))
258             pass
259         pass
260     if Result:
261         Result.append(":".join(StringResult))
262     else:
263         Result = ":".join(StringResult)
264     return Result
265
266 ## Return list of variables value from salome notebook
267 ## @ingroup l1_geomBuilder_auxiliary
268 def ParseList(list):
269     Result = []
270     StringResult = ""
271     for parameter in list:
272         if isinstance(parameter,str) and notebook.isVariable(parameter):
273             Result.append(str(notebook.get(parameter)))
274             pass
275         else:
276             Result.append(str(parameter))
277             pass
278
279         StringResult = StringResult + str(parameter)
280         StringResult = StringResult + ":"
281         pass
282     StringResult = StringResult[:len(StringResult)-1]
283     return Result, StringResult
284
285 ## Return list of variables value from salome notebook
286 ## @ingroup l1_geomBuilder_auxiliary
287 def ParseSketcherCommand(command):
288     Result = ""
289     StringResult = ""
290     sections = command.split(":")
291     for section in sections:
292         parameters = section.split(" ")
293         paramIndex = 1
294         for parameter in parameters:
295             if paramIndex > 1 and parameter.find("'") != -1:
296                 parameter = parameter.replace("'","")
297                 if notebook.isVariable(parameter):
298                     Result = Result + str(notebook.get(parameter)) + " "
299                     pass
300                 else:
301                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
302                     pass
303                 pass
304             else:
305                 Result = Result + str(parameter) + " "
306                 pass
307             if paramIndex > 1:
308                 StringResult = StringResult + parameter
309                 StringResult = StringResult + ":"
310                 pass
311             paramIndex = paramIndex + 1
312             pass
313         Result = Result[:len(Result)-1] + ":"
314         pass
315     Result = Result[:len(Result)-1]
316     return Result, StringResult
317
318 ## Helper function which can be used to pack the passed string to the byte data.
319 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
320 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
321 ## For example,
322 ## \code
323 ## val = PackData("10001110") # val = 0xAE
324 ## val = PackData("1")        # val = 0x80
325 ## \endcode
326 ## @param data unpacked data - a string containing '1' and '0' symbols
327 ## @return data packed to the byte stream
328 ## @ingroup l1_geomBuilder_auxiliary
329 def PackData(data):
330     """
331     Helper function which can be used to pack the passed string to the byte data.
332     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
333     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
334
335     Parameters:
336         data unpacked data - a string containing '1' and '0' symbols
337
338     Returns:
339         data packed to the byte stream
340         
341     Example of usage:
342         val = PackData("10001110") # val = 0xAE
343         val = PackData("1")        # val = 0x80
344     """
345     bytes = len(data)/8
346     if len(data)%8: bytes += 1
347     res = ""
348     for b in range(bytes):
349         d = data[b*8:(b+1)*8]
350         val = 0
351         for i in range(8):
352             val *= 2
353             if i < len(d):
354                 if d[i] == "1": val += 1
355                 elif d[i] != "0":
356                     raise "Invalid symbol %s" % d[i]
357                 pass
358             pass
359         res += chr(val)
360         pass
361     return res
362
363 ## Read bitmap texture from the text file.
364 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
365 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
366 ## The function returns width and height of the pixmap in pixels and byte stream representing
367 ## texture bitmap itself.
368 ##
369 ## This function can be used to read the texture to the byte stream in order to pass it to
370 ## the AddTexture() function of geomBuilder class.
371 ## For example,
372 ## \code
373 ## from salome.geom import geomBuilder
374 ## geompy = geomBuilder.New(salome.myStudy)
375 ## texture = geompy.readtexture('mytexture.dat')
376 ## texture = geompy.AddTexture(*texture)
377 ## obj.SetMarkerTexture(texture)
378 ## \endcode
379 ## @param fname texture file name
380 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
381 ## @ingroup l1_geomBuilder_auxiliary
382 def ReadTexture(fname):
383     """
384     Read bitmap texture from the text file.
385     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
386     A zero symbol ('0') represents transparent pixel of the texture bitmap.
387     The function returns width and height of the pixmap in pixels and byte stream representing
388     texture bitmap itself.
389     This function can be used to read the texture to the byte stream in order to pass it to
390     the AddTexture() function of geomBuilder class.
391     
392     Parameters:
393         fname texture file name
394
395     Returns:
396         sequence of tree values: texture's width, height in pixels and its byte stream
397     
398     Example of usage:
399         from salome.geom import geomBuilder
400         geompy = geomBuilder.New(salome.myStudy)
401         texture = geompy.readtexture('mytexture.dat')
402         texture = geompy.AddTexture(*texture)
403         obj.SetMarkerTexture(texture)
404     """
405     try:
406         f = open(fname)
407         lines = [ l.strip() for l in f.readlines()]
408         f.close()
409         maxlen = 0
410         if lines: maxlen = max([len(x) for x in lines])
411         lenbytes = maxlen/8
412         if maxlen%8: lenbytes += 1
413         bytedata=""
414         for line in lines:
415             if len(line)%8:
416                 lenline = (len(line)/8+1)*8
417                 pass
418             else:
419                 lenline = (len(line)/8)*8
420                 pass
421             for i in range(lenline/8):
422                 byte=""
423                 for j in range(8):
424                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
425                     else: byte += "0"
426                     pass
427                 bytedata += PackData(byte)
428                 pass
429             for i in range(lenline/8, lenbytes):
430                 bytedata += PackData("0")
431             pass
432         return lenbytes*8, len(lines), bytedata
433     except:
434         pass
435     return 0, 0, ""
436
437 ## Returns a long value from enumeration type
438 #  Can be used for CORBA enumerator types like GEOM.shape_type
439 #  @param theItem enumeration type
440 #  @ingroup l1_geomBuilder_auxiliary
441 def EnumToLong(theItem):
442     """
443     Returns a long value from enumeration type
444     Can be used for CORBA enumerator types like geomBuilder.ShapeType
445
446     Parameters:
447         theItem enumeration type
448     """
449     ret = theItem
450     if hasattr(theItem, "_v"): ret = theItem._v
451     return ret
452
453 ## Information about closed/unclosed state of shell or wire
454 #  @ingroup l1_geomBuilder_auxiliary
455 class info:
456     """
457     Information about closed/unclosed state of shell or wire
458     """
459     UNKNOWN  = 0
460     CLOSED   = 1
461     UNCLOSED = 2
462
463 ##! Private class used to bind calls of plugin operations to geomBuilder
464 class PluginOperation:
465   def __init__(self, operation, function):
466     self.operation = operation
467     self.function = function
468     pass
469
470   def __call__(self, *args):
471     res = self.function(self.operation, *args)
472     RaiseIfFailed(self.function.__name__, self.operation)
473     return res
474
475 # Warning: geom is a singleton
476 geom = None
477 engine = None
478 doLcc = False
479 created = False
480
481 class geomBuilder(object, GEOM._objref_GEOM_Gen):
482
483         ## Enumeration ShapeType as a dictionary. \n
484         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
485         #  @ingroup l1_geomBuilder_auxiliary
486         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
487
488         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
489         #  and a list of parameters, describing the shape.
490         #  List of parameters, describing the shape:
491         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
492         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
493         #
494         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
495         #
496         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
497         #
498         #  - SPHERE:       [xc yc zc            R]
499         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
500         #  - BOX:          [xc yc zc                      ax ay az]
501         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
502         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
503         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
504         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
505         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
506         #
507         #  - SPHERE2D:     [xc yc zc            R]
508         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
509         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
510         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
511         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
512         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
513         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
514         #  - PLANE:        [xo yo zo  dx dy dz]
515         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
516         #  - FACE:                                       [nb_edges  nb_vertices]
517         #
518         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
519         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
520         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
521         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
522         #  - LINE:         [xo yo zo  dx dy dz]
523         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
524         #  - EDGE:                                                 [nb_vertices]
525         #
526         #  - VERTEX:       [x  y  z]
527         #  @ingroup l1_geomBuilder_auxiliary
528         kind = GEOM.GEOM_IKindOfShape
529
530         def __new__(cls):
531             global engine
532             global geom
533             global doLcc
534             global created
535             #print "==== __new__ ", engine, geom, doLcc, created
536             if geom is None:
537                 # geom engine is either retrieved from engine, or created
538                 geom = engine
539                 # Following test avoids a recursive loop
540                 if doLcc:
541                     if geom is not None:
542                         # geom engine not created: existing engine found
543                         doLcc = False
544                     if doLcc and not created:
545                         doLcc = False
546                         # FindOrLoadComponent called:
547                         # 1. CORBA resolution of server
548                         # 2. the __new__ method is called again
549                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
550                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
551                         #print "====1 ",geom
552                 else:
553                     # FindOrLoadComponent not called
554                     if geom is None:
555                         # geomBuilder instance is created from lcc.FindOrLoadComponent
556                         #print "==== super ", engine, geom, doLcc, created
557                         geom = super(geomBuilder,cls).__new__(cls)
558                         #print "====2 ",geom
559                     else:
560                         # geom engine not created: existing engine found
561                         #print "==== existing ", engine, geom, doLcc, created
562                         pass
563                 #print "return geom 1 ", geom
564                 return geom
565
566             #print "return geom 2 ", geom
567             return geom
568
569         def __init__(self):
570             global created
571             #print "-------- geomBuilder __init__ --- ", created, self
572             if not created:
573               created = True
574               GEOM._objref_GEOM_Gen.__init__(self)
575               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
576               self.myBuilder = None
577               self.myStudyId = 0
578               self.father    = None
579
580               self.BasicOp  = None
581               self.CurvesOp = None
582               self.PrimOp   = None
583               self.ShapesOp = None
584               self.HealOp   = None
585               self.InsertOp = None
586               self.BoolOp   = None
587               self.TrsfOp   = None
588               self.LocalOp  = None
589               self.MeasuOp  = None
590               self.BlocksOp = None
591               self.GroupOp  = None
592               self.AdvOp    = None
593               self.FieldOp  = None
594             pass
595
596         ## Process object publication in the study, as follows:
597         #  - if @a theName is specified (not None), the object is published in the study
598         #    with this name, not taking into account "auto-publishing" option;
599         #  - if @a theName is NOT specified, the object is published in the study
600         #    (using default name, which can be customized using @a theDefaultName parameter)
601         #    only if auto-publishing is switched on.
602         #
603         #  @param theObj  object, a subject for publishing
604         #  @param theName object name for study
605         #  @param theDefaultName default name for the auto-publishing
606         #
607         #  @sa addToStudyAuto()
608         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
609             # ---
610             def _item_name(_names, _defname, _idx=-1):
611                 if not _names: _names = _defname
612                 if type(_names) in [types.ListType, types.TupleType]:
613                     if _idx >= 0:
614                         if _idx >= len(_names) or not _names[_idx]:
615                             if type(_defname) not in [types.ListType, types.TupleType]:
616                                 _name = "%s_%d"%(_defname, _idx+1)
617                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
618                                 _name = _defname[_idx]
619                             else:
620                                 _name = "%noname_%d"%(dn, _idx+1)
621                             pass
622                         else:
623                             _name = _names[_idx]
624                         pass
625                     else:
626                         # must be wrong  usage
627                         _name = _names[0]
628                     pass
629                 else:
630                     if _idx >= 0:
631                         _name = "%s_%d"%(_names, _idx+1)
632                     else:
633                         _name = _names
634                     pass
635                 return _name
636             # ---
637             def _publish( _name, _obj ):
638                 fatherObj = None
639                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
640                     fatherObj = _obj.GetShape()
641                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
642                     fatherObj = _obj.GetField()
643                 elif not _obj.IsMainShape():
644                     fatherObj = _obj.GetMainShape()
645                     pass
646                 if fatherObj and fatherObj.GetStudyEntry():
647                     self.addToStudyInFather(fatherObj, _obj, _name)
648                 else:
649                     self.addToStudy(_obj, _name)
650                     pass
651                 return
652             # ---
653             if not theObj:
654                 return # null object
655             if not theName and not self.myMaxNbSubShapesAllowed:
656                 return # nothing to do: auto-publishing is disabled
657             if not theName and not theDefaultName:
658                 return # neither theName nor theDefaultName is given
659             import types
660             if type(theObj) in [types.ListType, types.TupleType]:
661                 # list of objects is being published
662                 idx = 0
663                 for obj in theObj:
664                     if not obj: continue # bad object
665                     name = _item_name(theName, theDefaultName, idx)
666                     _publish( name, obj )
667                     idx = idx+1
668                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
669                     pass
670                 pass
671             else:
672                 # single object is published
673                 name = _item_name(theName, theDefaultName)
674                 _publish( name, theObj )
675             pass
676
677         ## @addtogroup l1_geomBuilder_auxiliary
678         ## @{
679         def init_geom(self,theStudy):
680             self.myStudy = theStudy
681             self.myStudyId = self.myStudy._get_StudyId()
682             self.myBuilder = self.myStudy.NewBuilder()
683             self.father = self.myStudy.FindComponent("GEOM")
684             if self.father is None:
685                 self.father = self.myBuilder.NewComponent("GEOM")
686                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
687                 FName = A1._narrow(SALOMEDS.AttributeName)
688                 FName.SetValue("Geometry")
689                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
690                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
691                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
692                 self.myBuilder.DefineComponentInstance(self.father,self)
693                 pass
694             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
695             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
696             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
697             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
698             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
699             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
700             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
701             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
702             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
703             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
704             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
705             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
706             self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
707
708             # The below line is a right way to map all plugin functions to geomBuilder,
709             # but AdvancedOperations are already mapped, that is why this line is commented
710             # and presents here only as an axample
711             #self.AdvOp    = self.GetPluginOperations (self.myStudyId, "AdvancedEngine")
712
713             # self.AdvOp is used by functions MakePipeTShape*, MakeDividedDisk, etc.
714             self.AdvOp = GEOM._objref_GEOM_Gen.GetPluginOperations (self, self.myStudyId, "AdvancedEngine")
715
716             # set GEOM as root in the use case tree
717             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
718             self.myUseCaseBuilder.SetRootCurrent()
719             self.myUseCaseBuilder.Append(self.father)
720             pass
721
722         def GetPluginOperations(self, studyID, libraryName):
723             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
724             if op:
725                 # bind methods of operations to self
726                 methods = op.__class__.__dict__['__methods__']
727                 avoid_methods = self.BasicOp.__class__.__dict__['__methods__']
728                 for meth_name in methods:
729                     if not meth_name in avoid_methods: # avoid basic methods
730                         function = getattr(op.__class__, meth_name)
731                         if callable(function):
732                             #self.__dict__[meth_name] = self.__PluginOperation(op, function)
733                             self.__dict__[meth_name] = PluginOperation(op, function)
734             return op
735
736         ## Enable / disable results auto-publishing
737         # 
738         #  The automatic publishing is managed in the following way:
739         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
740         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
741         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
742         #  value passed as parameter has the same effect.
743         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
744         #  maximum number of sub-shapes allowed for publishing is set to specified value.
745         #
746         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
747         #  @ingroup l1_publish_data
748         def addToStudyAuto(self, maxNbSubShapes=-1):
749             """
750             Enable / disable results auto-publishing
751
752             The automatic publishing is managed in the following way:
753             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
754             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
755             maximum number of sub-shapes allowed for publishing is unlimited; any negative
756             value passed as parameter has the same effect.
757             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
758             maximum number of sub-shapes allowed for publishing is set to this value.
759
760             Parameters:
761                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
762
763             Example of usage:
764                 geompy.addToStudyAuto()   # enable auto-publishing
765                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
766                 geompy.addToStudyAuto(0)  # disable auto-publishing
767             """
768             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
769             pass
770
771         ## Dump component to the Python script
772         #  This method overrides IDL function to allow default values for the parameters.
773         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
774             """
775             Dump component to the Python script
776             This method overrides IDL function to allow default values for the parameters.
777             """
778             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
779
780         ## Get name for sub-shape aSubObj of shape aMainObj
781         #
782         # @ref swig_SubShapeName "Example"
783         def SubShapeName(self,aSubObj, aMainObj):
784             """
785             Get name for sub-shape aSubObj of shape aMainObj
786             """
787             # Example: see GEOM_TestAll.py
788
789             #aSubId  = orb.object_to_string(aSubObj)
790             #aMainId = orb.object_to_string(aMainObj)
791             #index = gg.getIndexTopology(aSubId, aMainId)
792             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
793             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
794             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
795             return name
796
797         ## Publish in study aShape with name aName
798         #
799         #  \param aShape the shape to be published
800         #  \param aName  the name for the shape
801         #  \param doRestoreSubShapes if True, finds and publishes also
802         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
803         #         and published sub-shapes of arguments
804         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
805         #                                                  these arguments description
806         #  \return study entry of the published shape in form of string
807         #
808         #  @ingroup l1_publish_data
809         #  @ref swig_all_addtostudy "Example"
810         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
811                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
812             """
813             Publish in study aShape with name aName
814
815             Parameters:
816                 aShape the shape to be published
817                 aName  the name for the shape
818                 doRestoreSubShapes if True, finds and publishes also
819                                    sub-shapes of aShape, corresponding to its arguments
820                                    and published sub-shapes of arguments
821                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
822                                                          these arguments description
823
824             Returns:
825                 study entry of the published shape in form of string
826
827             Example of usage:
828                 id_block1 = geompy.addToStudy(Block1, "Block 1")
829             """
830             # Example: see GEOM_TestAll.py
831             try:
832                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
833                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
834                 if doRestoreSubShapes:
835                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
836                                             theFindMethod, theInheritFirstArg, True )
837             except:
838                 print "addToStudy() failed"
839                 return ""
840             return aShape.GetStudyEntry()
841
842         ## Publish in study aShape with name aName as sub-object of previously published aFather
843         #  \param aFather previously published object
844         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
845         #  \param aName  the name for the shape
846         #
847         #  \return study entry of the published shape in form of string
848         #
849         #  @ingroup l1_publish_data
850         #  @ref swig_all_addtostudyInFather "Example"
851         def addToStudyInFather(self, aFather, aShape, aName):
852             """
853             Publish in study aShape with name aName as sub-object of previously published aFather
854
855             Parameters:
856                 aFather previously published object
857                 aShape the shape to be published as sub-object of aFather
858                 aName  the name for the shape
859
860             Returns:
861                 study entry of the published shape in form of string
862             """
863             # Example: see GEOM_TestAll.py
864             try:
865                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
866                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
867             except:
868                 print "addToStudyInFather() failed"
869                 return ""
870             return aShape.GetStudyEntry()
871
872         ## Unpublish object in study
873         #
874         #  \param obj the object to be unpublished
875         def hideInStudy(self, obj):
876             """
877             Unpublish object in study
878
879             Parameters:
880                 obj the object to be unpublished
881             """
882             ior = salome.orb.object_to_string(obj)
883             aSObject = self.myStudy.FindObjectIOR(ior)
884             if aSObject is not None:
885                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
886                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
887                 drwAttribute.SetDrawable(False)
888                 pass
889
890         # end of l1_geomBuilder_auxiliary
891         ## @}
892
893         ## @addtogroup l3_restore_ss
894         ## @{
895
896         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
897         #  To be used from python scripts out of addToStudy() (non-default usage)
898         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
899         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
900         #                   If this list is empty, all operation arguments will be published
901         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
902         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
903         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
904         #                            Do not publish sub-shapes in place of arguments, but only
905         #                            in place of sub-shapes of the first argument,
906         #                            because the whole shape corresponds to the first argument.
907         #                            Mainly to be used after transformations, but it also can be
908         #                            usefull after partition with one object shape, and some other
909         #                            operations, where only the first argument has to be considered.
910         #                            If theObject has only one argument shape, this flag is automatically
911         #                            considered as True, not regarding really passed value.
912         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
913         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
914         #  \return list of published sub-shapes
915         #
916         #  @ref tui_restore_prs_params "Example"
917         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
918                               theInheritFirstArg=False, theAddPrefix=True):
919             """
920             Publish sub-shapes, standing for arguments and sub-shapes of arguments
921             To be used from python scripts out of geompy.addToStudy (non-default usage)
922
923             Parameters:
924                 theObject published GEOM.GEOM_Object, arguments of which will be published
925                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
926                           If this list is empty, all operation arguments will be published
927                 theFindMethod method to search sub-shapes, corresponding to arguments and
928                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
929                 theInheritFirstArg set properties of the first argument for theObject.
930                                    Do not publish sub-shapes in place of arguments, but only
931                                    in place of sub-shapes of the first argument,
932                                    because the whole shape corresponds to the first argument.
933                                    Mainly to be used after transformations, but it also can be
934                                    usefull after partition with one object shape, and some other
935                                    operations, where only the first argument has to be considered.
936                                    If theObject has only one argument shape, this flag is automatically
937                                    considered as True, not regarding really passed value.
938                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
939                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
940             Returns:
941                 list of published sub-shapes
942             """
943             # Example: see GEOM_TestAll.py
944             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
945                                           theFindMethod, theInheritFirstArg, theAddPrefix)
946
947         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
948         #  To be used from python scripts out of addToStudy() (non-default usage)
949         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
950         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
951         #                   If this list is empty, all operation arguments will be published
952         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
953         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
954         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
955         #                            Do not publish sub-shapes in place of arguments, but only
956         #                            in place of sub-shapes of the first argument,
957         #                            because the whole shape corresponds to the first argument.
958         #                            Mainly to be used after transformations, but it also can be
959         #                            usefull after partition with one object shape, and some other
960         #                            operations, where only the first argument has to be considered.
961         #                            If theObject has only one argument shape, this flag is automatically
962         #                            considered as True, not regarding really passed value.
963         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
964         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
965         #  \return list of published sub-shapes
966         #
967         #  @ref tui_restore_prs_params "Example"
968         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
969                                    theInheritFirstArg=False, theAddPrefix=True):
970             """
971             Publish sub-shapes, standing for arguments and sub-shapes of arguments
972             To be used from python scripts out of geompy.addToStudy() (non-default usage)
973
974             Parameters:
975                 theObject published GEOM.GEOM_Object, arguments of which will be published
976                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
977                           If this list is empty, all operation arguments will be published
978                 theFindMethod method to search sub-shapes, corresponding to arguments and
979                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
980                 theInheritFirstArg set properties of the first argument for theObject.
981                                    Do not publish sub-shapes in place of arguments, but only
982                                    in place of sub-shapes of the first argument,
983                                    because the whole shape corresponds to the first argument.
984                                    Mainly to be used after transformations, but it also can be
985                                    usefull after partition with one object shape, and some other
986                                    operations, where only the first argument has to be considered.
987                                    If theObject has only one argument shape, this flag is automatically
988                                    considered as True, not regarding really passed value.
989                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
990                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
991
992             Returns: 
993                 list of published sub-shapes
994             """
995             # Example: see GEOM_TestAll.py
996             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
997                                                theFindMethod, theInheritFirstArg, theAddPrefix)
998
999         # end of l3_restore_ss
1000         ## @}
1001
1002         ## @addtogroup l3_basic_go
1003         ## @{
1004
1005         ## Create point by three coordinates.
1006         #  @param theX The X coordinate of the point.
1007         #  @param theY The Y coordinate of the point.
1008         #  @param theZ The Z coordinate of the point.
1009         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created point.
1014         #
1015         #  @ref tui_creation_point "Example"
1016         def MakeVertex(self, theX, theY, theZ, theName=None):
1017             """
1018             Create point by three coordinates.
1019
1020             Parameters:
1021                 theX The X coordinate of the point.
1022                 theY The Y coordinate of the point.
1023                 theZ The Z coordinate of the point.
1024                 theName Object name; when specified, this parameter is used
1025                         for result publication in the study. Otherwise, if automatic
1026                         publication is switched on, default value is used for result name.
1027                 
1028             Returns: 
1029                 New GEOM.GEOM_Object, containing the created point.
1030             """
1031             # Example: see GEOM_TestAll.py
1032             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1033             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1034             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1035             anObj.SetParameters(Parameters)
1036             self._autoPublish(anObj, theName, "vertex")
1037             return anObj
1038
1039         ## Create a point, distant from the referenced point
1040         #  on the given distances along the coordinate axes.
1041         #  @param theReference The referenced point.
1042         #  @param theX Displacement from the referenced point along OX axis.
1043         #  @param theY Displacement from the referenced point along OY axis.
1044         #  @param theZ Displacement from the referenced point along OZ axis.
1045         #  @param theName Object name; when specified, this parameter is used
1046         #         for result publication in the study. Otherwise, if automatic
1047         #         publication is switched on, default value is used for result name.
1048         #
1049         #  @return New GEOM.GEOM_Object, containing the created point.
1050         #
1051         #  @ref tui_creation_point "Example"
1052         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1053             """
1054             Create a point, distant from the referenced point
1055             on the given distances along the coordinate axes.
1056
1057             Parameters:
1058                 theReference The referenced point.
1059                 theX Displacement from the referenced point along OX axis.
1060                 theY Displacement from the referenced point along OY axis.
1061                 theZ Displacement from the referenced point along OZ axis.
1062                 theName Object name; when specified, this parameter is used
1063                         for result publication in the study. Otherwise, if automatic
1064                         publication is switched on, default value is used for result name.
1065
1066             Returns:
1067                 New GEOM.GEOM_Object, containing the created point.
1068             """
1069             # Example: see GEOM_TestAll.py
1070             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1071             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1072             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1073             anObj.SetParameters(Parameters)
1074             self._autoPublish(anObj, theName, "vertex")
1075             return anObj
1076
1077         ## Create a point, corresponding to the given parameter on the given curve.
1078         #  @param theRefCurve The referenced curve.
1079         #  @param theParameter Value of parameter on the referenced curve.
1080         #  @param theName Object name; when specified, this parameter is used
1081         #         for result publication in the study. Otherwise, if automatic
1082         #         publication is switched on, default value is used for result name.
1083         #
1084         #  @return New GEOM.GEOM_Object, containing the created point.
1085         #
1086         #  @ref tui_creation_point "Example"
1087         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1088             """
1089             Create a point, corresponding to the given parameter on the given curve.
1090
1091             Parameters:
1092                 theRefCurve The referenced curve.
1093                 theParameter Value of parameter on the referenced curve.
1094                 theName Object name; when specified, this parameter is used
1095                         for result publication in the study. Otherwise, if automatic
1096                         publication is switched on, default value is used for result name.
1097
1098             Returns:
1099                 New GEOM.GEOM_Object, containing the created point.
1100
1101             Example of usage:
1102                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1103             """
1104             # Example: see GEOM_TestAll.py
1105             theParameter, Parameters = ParseParameters(theParameter)
1106             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1107             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1108             anObj.SetParameters(Parameters)
1109             self._autoPublish(anObj, theName, "vertex")
1110             return anObj
1111
1112         ## Create a point by projection give coordinates on the given curve
1113         #  @param theRefCurve The referenced curve.
1114         #  @param theX X-coordinate in 3D space
1115         #  @param theY Y-coordinate in 3D space
1116         #  @param theZ Z-coordinate in 3D space
1117         #  @param theName Object name; when specified, this parameter is used
1118         #         for result publication in the study. Otherwise, if automatic
1119         #         publication is switched on, default value is used for result name.
1120         #
1121         #  @return New GEOM.GEOM_Object, containing the created point.
1122         #
1123         #  @ref tui_creation_point "Example"
1124         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1125             """
1126             Create a point by projection give coordinates on the given curve
1127             
1128             Parameters:
1129                 theRefCurve The referenced curve.
1130                 theX X-coordinate in 3D space
1131                 theY Y-coordinate in 3D space
1132                 theZ Z-coordinate in 3D space
1133                 theName Object name; when specified, this parameter is used
1134                         for result publication in the study. Otherwise, if automatic
1135                         publication is switched on, default value is used for result name.
1136
1137             Returns:
1138                 New GEOM.GEOM_Object, containing the created point.
1139
1140             Example of usage:
1141                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1142             """
1143             # Example: see GEOM_TestAll.py
1144             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1145             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1146             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1147             anObj.SetParameters(Parameters)
1148             self._autoPublish(anObj, theName, "vertex")
1149             return anObj
1150
1151         ## Create a point, corresponding to the given length on the given curve.
1152         #  @param theRefCurve The referenced curve.
1153         #  @param theLength Length on the referenced curve. It can be negative.
1154         #  @param theStartPoint Point allowing to choose the direction for the calculation
1155         #                       of the length. If None, start from the first point of theRefCurve.
1156         #  @param theName Object name; when specified, this parameter is used
1157         #         for result publication in the study. Otherwise, if automatic
1158         #         publication is switched on, default value is used for result name.
1159         #
1160         #  @return New GEOM.GEOM_Object, containing the created point.
1161         #
1162         #  @ref tui_creation_point "Example"
1163         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1164             """
1165             Create a point, corresponding to the given length on the given curve.
1166
1167             Parameters:
1168                 theRefCurve The referenced curve.
1169                 theLength Length on the referenced curve. It can be negative.
1170                 theStartPoint Point allowing to choose the direction for the calculation
1171                               of the length. If None, start from the first point of theRefCurve.
1172                 theName Object name; when specified, this parameter is used
1173                         for result publication in the study. Otherwise, if automatic
1174                         publication is switched on, default value is used for result name.
1175
1176             Returns:
1177                 New GEOM.GEOM_Object, containing the created point.
1178             """
1179             # Example: see GEOM_TestAll.py
1180             theLength, Parameters = ParseParameters(theLength)
1181             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1182             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1183             anObj.SetParameters(Parameters)
1184             self._autoPublish(anObj, theName, "vertex")
1185             return anObj
1186
1187         ## Create a point, corresponding to the given parameters on the
1188         #    given surface.
1189         #  @param theRefSurf The referenced surface.
1190         #  @param theUParameter Value of U-parameter on the referenced surface.
1191         #  @param theVParameter Value of V-parameter on the referenced surface.
1192         #  @param theName Object name; when specified, this parameter is used
1193         #         for result publication in the study. Otherwise, if automatic
1194         #         publication is switched on, default value is used for result name.
1195         #
1196         #  @return New GEOM.GEOM_Object, containing the created point.
1197         #
1198         #  @ref swig_MakeVertexOnSurface "Example"
1199         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1200             """
1201             Create a point, corresponding to the given parameters on the
1202             given surface.
1203
1204             Parameters:
1205                 theRefSurf The referenced surface.
1206                 theUParameter Value of U-parameter on the referenced surface.
1207                 theVParameter Value of V-parameter on the referenced surface.
1208                 theName Object name; when specified, this parameter is used
1209                         for result publication in the study. Otherwise, if automatic
1210                         publication is switched on, default value is used for result name.
1211
1212             Returns:
1213                 New GEOM.GEOM_Object, containing the created point.
1214
1215             Example of usage:
1216                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1217             """
1218             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1219             # Example: see GEOM_TestAll.py
1220             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1221             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1222             anObj.SetParameters(Parameters);
1223             self._autoPublish(anObj, theName, "vertex")
1224             return anObj
1225
1226         ## Create a point by projection give coordinates on the given surface
1227         #  @param theRefSurf The referenced surface.
1228         #  @param theX X-coordinate in 3D space
1229         #  @param theY Y-coordinate in 3D space
1230         #  @param theZ Z-coordinate in 3D space
1231         #  @param theName Object name; when specified, this parameter is used
1232         #         for result publication in the study. Otherwise, if automatic
1233         #         publication is switched on, default value is used for result name.
1234         #
1235         #  @return New GEOM.GEOM_Object, containing the created point.
1236         #
1237         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1238         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1239             """
1240             Create a point by projection give coordinates on the given surface
1241
1242             Parameters:
1243                 theRefSurf The referenced surface.
1244                 theX X-coordinate in 3D space
1245                 theY Y-coordinate in 3D space
1246                 theZ Z-coordinate in 3D space
1247                 theName Object name; when specified, this parameter is used
1248                         for result publication in the study. Otherwise, if automatic
1249                         publication is switched on, default value is used for result name.
1250
1251             Returns:
1252                 New GEOM.GEOM_Object, containing the created point.
1253
1254             Example of usage:
1255                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1256             """
1257             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1258             # Example: see GEOM_TestAll.py
1259             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1260             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1261             anObj.SetParameters(Parameters);
1262             self._autoPublish(anObj, theName, "vertex")
1263             return anObj
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         #  @param theFace The referenced face.
1271         #  @param theName Object name; when specified, this parameter is used
1272         #         for result publication in the study. Otherwise, if automatic
1273         #         publication is switched on, default value is used for result name.
1274         #
1275         #  @return New GEOM.GEOM_Object, containing the created point.
1276         #
1277         #  @ref swig_MakeVertexInsideFace "Example"
1278         def MakeVertexInsideFace (self, theFace, theName=None):
1279             """
1280             Create a point, which lays on the given face.
1281             The point will lay in arbitrary place of the face.
1282             The only condition on it is a non-zero distance to the face boundary.
1283             Such point can be used to uniquely identify the face inside any
1284             shape in case, when the shape does not contain overlapped faces.
1285
1286             Parameters:
1287                 theFace The referenced face.
1288                 theName Object name; when specified, this parameter is used
1289                         for result publication in the study. Otherwise, if automatic
1290                         publication is switched on, default value is used for result name.
1291
1292             Returns:
1293                 New GEOM.GEOM_Object, containing the created point.
1294
1295             Example of usage:
1296                 p_on_face = geompy.MakeVertexInsideFace(Face)
1297             """
1298             # Example: see GEOM_TestAll.py
1299             anObj = self.BasicOp.MakePointOnFace(theFace)
1300             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1301             self._autoPublish(anObj, theName, "vertex")
1302             return anObj
1303
1304         ## Create a point on intersection of two lines.
1305         #  @param theRefLine1, theRefLine2 The referenced lines.
1306         #  @param theName Object name; when specified, this parameter is used
1307         #         for result publication in the study. Otherwise, if automatic
1308         #         publication is switched on, default value is used for result name.
1309         #
1310         #  @return New GEOM.GEOM_Object, containing the created point.
1311         #
1312         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1313         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1314             """
1315             Create a point on intersection of two lines.
1316
1317             Parameters:
1318                 theRefLine1, theRefLine2 The referenced lines.
1319                 theName Object name; when specified, this parameter is used
1320                         for result publication in the study. Otherwise, if automatic
1321                         publication is switched on, default value is used for result name.
1322
1323             Returns:
1324                 New GEOM.GEOM_Object, containing the created point.
1325             """
1326             # Example: see GEOM_TestAll.py
1327             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1328             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1329             self._autoPublish(anObj, theName, "vertex")
1330             return anObj
1331
1332         ## Create a tangent, corresponding to the given parameter on the given curve.
1333         #  @param theRefCurve The referenced curve.
1334         #  @param theParameter Value of parameter on the referenced curve.
1335         #  @param theName Object name; when specified, this parameter is used
1336         #         for result publication in the study. Otherwise, if automatic
1337         #         publication is switched on, default value is used for result name.
1338         #
1339         #  @return New GEOM.GEOM_Object, containing the created tangent.
1340         #
1341         #  @ref swig_MakeTangentOnCurve "Example"
1342         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1343             """
1344             Create a tangent, corresponding to the given parameter on the given curve.
1345
1346             Parameters:
1347                 theRefCurve The referenced curve.
1348                 theParameter Value of parameter on the referenced curve.
1349                 theName Object name; when specified, this parameter is used
1350                         for result publication in the study. Otherwise, if automatic
1351                         publication is switched on, default value is used for result name.
1352
1353             Returns:
1354                 New GEOM.GEOM_Object, containing the created tangent.
1355
1356             Example of usage:
1357                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1358             """
1359             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1360             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1361             self._autoPublish(anObj, theName, "tangent")
1362             return anObj
1363
1364         ## Create a tangent plane, corresponding to the given parameter on the given face.
1365         #  @param theFace The face for which tangent plane should be built.
1366         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1367         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1368         #  @param theTrimSize the size of plane.
1369         #  @param theName Object name; when specified, this parameter is used
1370         #         for result publication in the study. Otherwise, if automatic
1371         #         publication is switched on, default value is used for result name.
1372         #
1373         #  @return New GEOM.GEOM_Object, containing the created tangent.
1374         #
1375         #  @ref swig_MakeTangentPlaneOnFace "Example"
1376         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1377             """
1378             Create a tangent plane, corresponding to the given parameter on the given face.
1379
1380             Parameters:
1381                 theFace The face for which tangent plane should be built.
1382                 theParameterV vertical value of the center point (0.0 - 1.0).
1383                 theParameterU horisontal value of the center point (0.0 - 1.0).
1384                 theTrimSize the size of plane.
1385                 theName Object name; when specified, this parameter is used
1386                         for result publication in the study. Otherwise, if automatic
1387                         publication is switched on, default value is used for result name.
1388
1389            Returns: 
1390                 New GEOM.GEOM_Object, containing the created tangent.
1391
1392            Example of usage:
1393                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1394             """
1395             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1396             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1397             self._autoPublish(anObj, theName, "tangent")
1398             return anObj
1399
1400         ## Create a vector with the given components.
1401         #  @param theDX X component of the vector.
1402         #  @param theDY Y component of the vector.
1403         #  @param theDZ Z component of the vector.
1404         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created vector.
1409         #
1410         #  @ref tui_creation_vector "Example"
1411         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1412             """
1413             Create a vector with the given components.
1414
1415             Parameters:
1416                 theDX X component of the vector.
1417                 theDY Y component of the vector.
1418                 theDZ Z component of the vector.
1419                 theName Object name; when specified, this parameter is used
1420                         for result publication in the study. Otherwise, if automatic
1421                         publication is switched on, default value is used for result name.
1422
1423             Returns:     
1424                 New GEOM.GEOM_Object, containing the created vector.
1425             """
1426             # Example: see GEOM_TestAll.py
1427             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1428             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1429             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1430             anObj.SetParameters(Parameters)
1431             self._autoPublish(anObj, theName, "vector")
1432             return anObj
1433
1434         ## Create a vector between two points.
1435         #  @param thePnt1 Start point for the vector.
1436         #  @param thePnt2 End point for the vector.
1437         #  @param theName Object name; when specified, this parameter is used
1438         #         for result publication in the study. Otherwise, if automatic
1439         #         publication is switched on, default value is used for result name.
1440         #
1441         #  @return New GEOM.GEOM_Object, containing the created vector.
1442         #
1443         #  @ref tui_creation_vector "Example"
1444         def MakeVector(self, thePnt1, thePnt2, theName=None):
1445             """
1446             Create a vector between two points.
1447
1448             Parameters:
1449                 thePnt1 Start point for the vector.
1450                 thePnt2 End point for the vector.
1451                 theName Object name; when specified, this parameter is used
1452                         for result publication in the study. Otherwise, if automatic
1453                         publication is switched on, default value is used for result name.
1454
1455             Returns:        
1456                 New GEOM.GEOM_Object, containing the created vector.
1457             """
1458             # Example: see GEOM_TestAll.py
1459             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1460             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1461             self._autoPublish(anObj, theName, "vector")
1462             return anObj
1463
1464         ## Create a line, passing through the given point
1465         #  and parrallel to the given direction
1466         #  @param thePnt Point. The resulting line will pass through it.
1467         #  @param theDir Direction. The resulting line will be parallel to it.
1468         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created line.
1473         #
1474         #  @ref tui_creation_line "Example"
1475         def MakeLine(self, thePnt, theDir, theName=None):
1476             """
1477             Create a line, passing through the given point
1478             and parrallel to the given direction
1479
1480             Parameters:
1481                 thePnt Point. The resulting line will pass through it.
1482                 theDir Direction. The resulting line will be parallel to it.
1483                 theName Object name; when specified, this parameter is used
1484                         for result publication in the study. Otherwise, if automatic
1485                         publication is switched on, default value is used for result name.
1486
1487             Returns:
1488                 New GEOM.GEOM_Object, containing the created line.
1489             """
1490             # Example: see GEOM_TestAll.py
1491             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1492             RaiseIfFailed("MakeLine", self.BasicOp)
1493             self._autoPublish(anObj, theName, "line")
1494             return anObj
1495
1496         ## Create a line, passing through the given points
1497         #  @param thePnt1 First of two points, defining the line.
1498         #  @param thePnt2 Second of two points, defining the line.
1499         #  @param theName Object name; when specified, this parameter is used
1500         #         for result publication in the study. Otherwise, if automatic
1501         #         publication is switched on, default value is used for result name.
1502         #
1503         #  @return New GEOM.GEOM_Object, containing the created line.
1504         #
1505         #  @ref tui_creation_line "Example"
1506         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1507             """
1508             Create a line, passing through the given points
1509
1510             Parameters:
1511                 thePnt1 First of two points, defining the line.
1512                 thePnt2 Second of two points, defining the line.
1513                 theName Object name; when specified, this parameter is used
1514                         for result publication in the study. Otherwise, if automatic
1515                         publication is switched on, default value is used for result name.
1516
1517             Returns:
1518                 New GEOM.GEOM_Object, containing the created line.
1519             """
1520             # Example: see GEOM_TestAll.py
1521             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1522             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1523             self._autoPublish(anObj, theName, "line")
1524             return anObj
1525
1526         ## Create a line on two faces intersection.
1527         #  @param theFace1 First of two faces, defining the line.
1528         #  @param theFace2 Second of two faces, defining the line.
1529         #  @param theName Object name; when specified, this parameter is used
1530         #         for result publication in the study. Otherwise, if automatic
1531         #         publication is switched on, default value is used for result name.
1532         #
1533         #  @return New GEOM.GEOM_Object, containing the created line.
1534         #
1535         #  @ref swig_MakeLineTwoFaces "Example"
1536         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1537             """
1538             Create a line on two faces intersection.
1539
1540             Parameters:
1541                 theFace1 First of two faces, defining the line.
1542                 theFace2 Second of two faces, defining the line.
1543                 theName Object name; when specified, this parameter is used
1544                         for result publication in the study. Otherwise, if automatic
1545                         publication is switched on, default value is used for result name.
1546
1547             Returns:
1548                 New GEOM.GEOM_Object, containing the created line.
1549             """
1550             # Example: see GEOM_TestAll.py
1551             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1552             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1553             self._autoPublish(anObj, theName, "line")
1554             return anObj
1555
1556         ## Create a plane, passing through the given point
1557         #  and normal to the given vector.
1558         #  @param thePnt Point, the plane has to pass through.
1559         #  @param theVec Vector, defining the plane normal direction.
1560         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1561         #  @param theName Object name; when specified, this parameter is used
1562         #         for result publication in the study. Otherwise, if automatic
1563         #         publication is switched on, default value is used for result name.
1564         #
1565         #  @return New GEOM.GEOM_Object, containing the created plane.
1566         #
1567         #  @ref tui_creation_plane "Example"
1568         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1569             """
1570             Create a plane, passing through the given point
1571             and normal to the given vector.
1572
1573             Parameters:
1574                 thePnt Point, the plane has to pass through.
1575                 theVec Vector, defining the plane normal direction.
1576                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1577                 theName Object name; when specified, this parameter is used
1578                         for result publication in the study. Otherwise, if automatic
1579                         publication is switched on, default value is used for result name.
1580
1581             Returns:    
1582                 New GEOM.GEOM_Object, containing the created plane.
1583             """
1584             # Example: see GEOM_TestAll.py
1585             theTrimSize, Parameters = ParseParameters(theTrimSize);
1586             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1587             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1588             anObj.SetParameters(Parameters)
1589             self._autoPublish(anObj, theName, "plane")
1590             return anObj
1591
1592         ## Create a plane, passing through the three given points
1593         #  @param thePnt1 First of three points, defining the plane.
1594         #  @param thePnt2 Second of three points, defining the plane.
1595         #  @param thePnt3 Fird of three points, defining the plane.
1596         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1597         #  @param theName Object name; when specified, this parameter is used
1598         #         for result publication in the study. Otherwise, if automatic
1599         #         publication is switched on, default value is used for result name.
1600         #
1601         #  @return New GEOM.GEOM_Object, containing the created plane.
1602         #
1603         #  @ref tui_creation_plane "Example"
1604         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1605             """
1606             Create a plane, passing through the three given points
1607
1608             Parameters:
1609                 thePnt1 First of three points, defining the plane.
1610                 thePnt2 Second of three points, defining the plane.
1611                 thePnt3 Fird of three points, defining the plane.
1612                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1613                 theName Object name; when specified, this parameter is used
1614                         for result publication in the study. Otherwise, if automatic
1615                         publication is switched on, default value is used for result name.
1616
1617             Returns:
1618                 New GEOM.GEOM_Object, containing the created plane.
1619             """
1620             # Example: see GEOM_TestAll.py
1621             theTrimSize, Parameters = ParseParameters(theTrimSize);
1622             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1623             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1624             anObj.SetParameters(Parameters)
1625             self._autoPublish(anObj, theName, "plane")
1626             return anObj
1627
1628         ## Create a plane, similar to the existing one, but with another size of representing face.
1629         #  @param theFace Referenced plane or LCS(Marker).
1630         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1631         #  @param theName Object name; when specified, this parameter is used
1632         #         for result publication in the study. Otherwise, if automatic
1633         #         publication is switched on, default value is used for result name.
1634         #
1635         #  @return New GEOM.GEOM_Object, containing the created plane.
1636         #
1637         #  @ref tui_creation_plane "Example"
1638         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1639             """
1640             Create a plane, similar to the existing one, but with another size of representing face.
1641
1642             Parameters:
1643                 theFace Referenced plane or LCS(Marker).
1644                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1645                 theName Object name; when specified, this parameter is used
1646                         for result publication in the study. Otherwise, if automatic
1647                         publication is switched on, default value is used for result name.
1648
1649             Returns:
1650                 New GEOM.GEOM_Object, containing the created plane.
1651             """
1652             # Example: see GEOM_TestAll.py
1653             theTrimSize, Parameters = ParseParameters(theTrimSize);
1654             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1655             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1656             anObj.SetParameters(Parameters)
1657             self._autoPublish(anObj, theName, "plane")
1658             return anObj
1659
1660         ## Create a plane, passing through the 2 vectors
1661         #  with center in a start point of the first vector.
1662         #  @param theVec1 Vector, defining center point and plane direction.
1663         #  @param theVec2 Vector, defining the plane normal direction.
1664         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1665         #  @param theName Object name; when specified, this parameter is used
1666         #         for result publication in the study. Otherwise, if automatic
1667         #         publication is switched on, default value is used for result name.
1668         #
1669         #  @return New GEOM.GEOM_Object, containing the created plane.
1670         #
1671         #  @ref tui_creation_plane "Example"
1672         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1673             """
1674             Create a plane, passing through the 2 vectors
1675             with center in a start point of the first vector.
1676
1677             Parameters:
1678                 theVec1 Vector, defining center point and plane direction.
1679                 theVec2 Vector, defining the plane normal direction.
1680                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1681                 theName Object name; when specified, this parameter is used
1682                         for result publication in the study. Otherwise, if automatic
1683                         publication is switched on, default value is used for result name.
1684
1685             Returns: 
1686                 New GEOM.GEOM_Object, containing the created plane.
1687             """
1688             # Example: see GEOM_TestAll.py
1689             theTrimSize, Parameters = ParseParameters(theTrimSize);
1690             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1691             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1692             anObj.SetParameters(Parameters)
1693             self._autoPublish(anObj, theName, "plane")
1694             return anObj
1695
1696         ## Create a plane, based on a Local coordinate system.
1697         #  @param theLCS  coordinate system, defining plane.
1698         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1699         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1700         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created plane.
1705         #
1706         #  @ref tui_creation_plane "Example"
1707         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1708             """
1709             Create a plane, based on a Local coordinate system.
1710
1711            Parameters: 
1712                 theLCS  coordinate system, defining plane.
1713                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1714                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1715                 theName Object name; when specified, this parameter is used
1716                         for result publication in the study. Otherwise, if automatic
1717                         publication is switched on, default value is used for result name.
1718
1719             Returns: 
1720                 New GEOM.GEOM_Object, containing the created plane.
1721             """
1722             # Example: see GEOM_TestAll.py
1723             theTrimSize, Parameters = ParseParameters(theTrimSize);
1724             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1725             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1726             anObj.SetParameters(Parameters)
1727             self._autoPublish(anObj, theName, "plane")
1728             return anObj
1729
1730         ## Create a local coordinate system.
1731         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1732         #  @param XDX,XDY,XDZ Three components of OX direction
1733         #  @param YDX,YDY,YDZ Three components of OY direction
1734         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1739         #
1740         #  @ref swig_MakeMarker "Example"
1741         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1742             """
1743             Create a local coordinate system.
1744
1745             Parameters: 
1746                 OX,OY,OZ Three coordinates of coordinate system origin.
1747                 XDX,XDY,XDZ Three components of OX direction
1748                 YDX,YDY,YDZ Three components of OY direction
1749                 theName Object name; when specified, this parameter is used
1750                         for result publication in the study. Otherwise, if automatic
1751                         publication is switched on, default value is used for result name.
1752
1753             Returns: 
1754                 New GEOM.GEOM_Object, containing the created coordinate system.
1755             """
1756             # Example: see GEOM_TestAll.py
1757             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1758             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1759             RaiseIfFailed("MakeMarker", self.BasicOp)
1760             anObj.SetParameters(Parameters)
1761             self._autoPublish(anObj, theName, "lcs")
1762             return anObj
1763
1764         ## Create a local coordinate system from shape.
1765         #  @param theShape The initial shape to detect the coordinate system.
1766         #  @param theName Object name; when specified, this parameter is used
1767         #         for result publication in the study. Otherwise, if automatic
1768         #         publication is switched on, default value is used for result name.
1769         #
1770         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1771         #
1772         #  @ref tui_creation_lcs "Example"
1773         def MakeMarkerFromShape(self, theShape, theName=None):
1774             """
1775             Create a local coordinate system from shape.
1776
1777             Parameters:
1778                 theShape The initial shape to detect the coordinate system.
1779                 theName Object name; when specified, this parameter is used
1780                         for result publication in the study. Otherwise, if automatic
1781                         publication is switched on, default value is used for result name.
1782                 
1783             Returns: 
1784                 New GEOM.GEOM_Object, containing the created coordinate system.
1785             """
1786             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1787             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1788             self._autoPublish(anObj, theName, "lcs")
1789             return anObj
1790
1791         ## Create a local coordinate system from point and two vectors.
1792         #  @param theOrigin Point of coordinate system origin.
1793         #  @param theXVec Vector of X direction
1794         #  @param theYVec Vector of Y direction
1795         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1800         #
1801         #  @ref tui_creation_lcs "Example"
1802         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1803             """
1804             Create a local coordinate system from point and two vectors.
1805
1806             Parameters:
1807                 theOrigin Point of coordinate system origin.
1808                 theXVec Vector of X direction
1809                 theYVec Vector of Y direction
1810                 theName Object name; when specified, this parameter is used
1811                         for result publication in the study. Otherwise, if automatic
1812                         publication is switched on, default value is used for result name.
1813
1814             Returns: 
1815                 New GEOM.GEOM_Object, containing the created coordinate system.
1816
1817             """
1818             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1819             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1820             self._autoPublish(anObj, theName, "lcs")
1821             return anObj
1822
1823         # end of l3_basic_go
1824         ## @}
1825
1826         ## @addtogroup l4_curves
1827         ## @{
1828
1829         ##  Create an arc of circle, passing through three given points.
1830         #  @param thePnt1 Start point of the arc.
1831         #  @param thePnt2 Middle point of the arc.
1832         #  @param thePnt3 End point of the arc.
1833         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created arc.
1838         #
1839         #  @ref swig_MakeArc "Example"
1840         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1841             """
1842             Create an arc of circle, passing through three given points.
1843
1844             Parameters:
1845                 thePnt1 Start point of the arc.
1846                 thePnt2 Middle point of the arc.
1847                 thePnt3 End point of the arc.
1848                 theName Object name; when specified, this parameter is used
1849                         for result publication in the study. Otherwise, if automatic
1850                         publication is switched on, default value is used for result name.
1851
1852             Returns: 
1853                 New GEOM.GEOM_Object, containing the created arc.
1854             """
1855             # Example: see GEOM_TestAll.py
1856             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1857             RaiseIfFailed("MakeArc", self.CurvesOp)
1858             self._autoPublish(anObj, theName, "arc")
1859             return anObj
1860
1861         ##  Create an arc of circle from a center and 2 points.
1862         #  @param thePnt1 Center of the arc
1863         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1864         #  @param thePnt3 End point of the arc (Gives also a direction)
1865         #  @param theSense Orientation of the arc
1866         #  @param theName Object name; when specified, this parameter is used
1867         #         for result publication in the study. Otherwise, if automatic
1868         #         publication is switched on, default value is used for result name.
1869         #
1870         #  @return New GEOM.GEOM_Object, containing the created arc.
1871         #
1872         #  @ref swig_MakeArc "Example"
1873         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1874             """
1875             Create an arc of circle from a center and 2 points.
1876
1877             Parameters:
1878                 thePnt1 Center of the arc
1879                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1880                 thePnt3 End point of the arc (Gives also a direction)
1881                 theSense Orientation of the arc
1882                 theName Object name; when specified, this parameter is used
1883                         for result publication in the study. Otherwise, if automatic
1884                         publication is switched on, default value is used for result name.
1885
1886             Returns:
1887                 New GEOM.GEOM_Object, containing the created arc.
1888             """
1889             # Example: see GEOM_TestAll.py
1890             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1891             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1892             self._autoPublish(anObj, theName, "arc")
1893             return anObj
1894
1895         ##  Create an arc of ellipse, of center and two points.
1896         #  @param theCenter Center of the arc.
1897         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1898         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1899         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created arc.
1904         #
1905         #  @ref swig_MakeArc "Example"
1906         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
1907             """
1908             Create an arc of ellipse, of center and two points.
1909
1910             Parameters:
1911                 theCenter Center of the arc.
1912                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1913                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1914                 theName Object name; when specified, this parameter is used
1915                         for result publication in the study. Otherwise, if automatic
1916                         publication is switched on, default value is used for result name.
1917
1918             Returns:
1919                 New GEOM.GEOM_Object, containing the created arc.
1920             """
1921             # Example: see GEOM_TestAll.py
1922             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
1923             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
1924             self._autoPublish(anObj, theName, "arc")
1925             return anObj
1926
1927         ## Create a circle with given center, normal vector and radius.
1928         #  @param thePnt Circle center.
1929         #  @param theVec Vector, normal to the plane of the circle.
1930         #  @param theR Circle radius.
1931         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created circle.
1936         #
1937         #  @ref tui_creation_circle "Example"
1938         def MakeCircle(self, thePnt, theVec, theR, theName=None):
1939             """
1940             Create a circle with given center, normal vector and radius.
1941
1942             Parameters:
1943                 thePnt Circle center.
1944                 theVec Vector, normal to the plane of the circle.
1945                 theR Circle radius.
1946                 theName Object name; when specified, this parameter is used
1947                         for result publication in the study. Otherwise, if automatic
1948                         publication is switched on, default value is used for result name.
1949
1950             Returns:
1951                 New GEOM.GEOM_Object, containing the created circle.
1952             """
1953             # Example: see GEOM_TestAll.py
1954             theR, Parameters = ParseParameters(theR)
1955             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
1956             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1957             anObj.SetParameters(Parameters)
1958             self._autoPublish(anObj, theName, "circle")
1959             return anObj
1960
1961         ## Create a circle with given radius.
1962         #  Center of the circle will be in the origin of global
1963         #  coordinate system and normal vector will be codirected with Z axis
1964         #  @param theR Circle radius.
1965         #  @param theName Object name; when specified, this parameter is used
1966         #         for result publication in the study. Otherwise, if automatic
1967         #         publication is switched on, default value is used for result name.
1968         #
1969         #  @return New GEOM.GEOM_Object, containing the created circle.
1970         def MakeCircleR(self, theR, theName=None):
1971             """
1972             Create a circle with given radius.
1973             Center of the circle will be in the origin of global
1974             coordinate system and normal vector will be codirected with Z axis
1975
1976             Parameters:
1977                 theR Circle radius.
1978                 theName Object name; when specified, this parameter is used
1979                         for result publication in the study. Otherwise, if automatic
1980                         publication is switched on, default value is used for result name.
1981
1982             Returns:
1983                 New GEOM.GEOM_Object, containing the created circle.
1984             """
1985             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
1986             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1987             self._autoPublish(anObj, theName, "circle")
1988             return anObj
1989
1990         ## Create a circle, passing through three given points
1991         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1992         #  @param theName Object name; when specified, this parameter is used
1993         #         for result publication in the study. Otherwise, if automatic
1994         #         publication is switched on, default value is used for result name.
1995         #
1996         #  @return New GEOM.GEOM_Object, containing the created circle.
1997         #
1998         #  @ref tui_creation_circle "Example"
1999         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2000             """
2001             Create a circle, passing through three given points
2002
2003             Parameters:
2004                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2005                 theName Object name; when specified, this parameter is used
2006                         for result publication in the study. Otherwise, if automatic
2007                         publication is switched on, default value is used for result name.
2008
2009             Returns:
2010                 New GEOM.GEOM_Object, containing the created circle.
2011             """
2012             # Example: see GEOM_TestAll.py
2013             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2014             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2015             self._autoPublish(anObj, theName, "circle")
2016             return anObj
2017
2018         ## Create a circle, with given point1 as center,
2019         #  passing through the point2 as radius and laying in the plane,
2020         #  defined by all three given points.
2021         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2022         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created circle.
2027         #
2028         #  @ref swig_MakeCircle "Example"
2029         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2030             """
2031             Create a circle, with given point1 as center,
2032             passing through the point2 as radius and laying in the plane,
2033             defined by all three given points.
2034
2035             Parameters:
2036                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2037                 theName Object name; when specified, this parameter is used
2038                         for result publication in the study. Otherwise, if automatic
2039                         publication is switched on, default value is used for result name.
2040
2041             Returns:
2042                 New GEOM.GEOM_Object, containing the created circle.
2043             """
2044             # Example: see GEOM_example6.py
2045             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2046             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2047             self._autoPublish(anObj, theName, "circle")
2048             return anObj
2049
2050         ## Create an ellipse with given center, normal vector and radiuses.
2051         #  @param thePnt Ellipse center.
2052         #  @param theVec Vector, normal to the plane of the ellipse.
2053         #  @param theRMajor Major ellipse radius.
2054         #  @param theRMinor Minor ellipse radius.
2055         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2056         #  @param theName Object name; when specified, this parameter is used
2057         #         for result publication in the study. Otherwise, if automatic
2058         #         publication is switched on, default value is used for result name.
2059         #
2060         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2061         #
2062         #  @ref tui_creation_ellipse "Example"
2063         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2064             """
2065             Create an ellipse with given center, normal vector and radiuses.
2066
2067             Parameters:
2068                 thePnt Ellipse center.
2069                 theVec Vector, normal to the plane of the ellipse.
2070                 theRMajor Major ellipse radius.
2071                 theRMinor Minor ellipse radius.
2072                 theVecMaj Vector, direction of the ellipse's main axis.
2073                 theName Object name; when specified, this parameter is used
2074                         for result publication in the study. Otherwise, if automatic
2075                         publication is switched on, default value is used for result name.
2076
2077             Returns:    
2078                 New GEOM.GEOM_Object, containing the created ellipse.
2079             """
2080             # Example: see GEOM_TestAll.py
2081             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2082             if theVecMaj is not None:
2083                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2084             else:
2085                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2086                 pass
2087             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2088             anObj.SetParameters(Parameters)
2089             self._autoPublish(anObj, theName, "ellipse")
2090             return anObj
2091
2092         ## Create an ellipse with given radiuses.
2093         #  Center of the ellipse will be in the origin of global
2094         #  coordinate system and normal vector will be codirected with Z axis
2095         #  @param theRMajor Major ellipse radius.
2096         #  @param theRMinor Minor ellipse radius.
2097         #  @param theName Object name; when specified, this parameter is used
2098         #         for result publication in the study. Otherwise, if automatic
2099         #         publication is switched on, default value is used for result name.
2100         #
2101         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2102         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2103             """
2104             Create an ellipse with given radiuses.
2105             Center of the ellipse will be in the origin of global
2106             coordinate system and normal vector will be codirected with Z axis
2107
2108             Parameters:
2109                 theRMajor Major ellipse radius.
2110                 theRMinor Minor ellipse radius.
2111                 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             Returns:
2116             New GEOM.GEOM_Object, containing the created ellipse.
2117             """
2118             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2119             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2120             self._autoPublish(anObj, theName, "ellipse")
2121             return anObj
2122
2123         ## Create a polyline on the set of points.
2124         #  @param thePoints Sequence of points for the polyline.
2125         #  @param theIsClosed If True, build a closed wire.
2126         #  @param theName Object name; when specified, this parameter is used
2127         #         for result publication in the study. Otherwise, if automatic
2128         #         publication is switched on, default value is used for result name.
2129         #
2130         #  @return New GEOM.GEOM_Object, containing the created polyline.
2131         #
2132         #  @ref tui_creation_curve "Example"
2133         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2134             """
2135             Create a polyline on the set of points.
2136
2137             Parameters:
2138                 thePoints Sequence of points for the polyline.
2139                 theIsClosed If True, build a closed wire.
2140                 theName Object name; when specified, this parameter is used
2141                         for result publication in the study. Otherwise, if automatic
2142                         publication is switched on, default value is used for result name.
2143
2144             Returns:
2145                 New GEOM.GEOM_Object, containing the created polyline.
2146             """
2147             # Example: see GEOM_TestAll.py
2148             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2149             RaiseIfFailed("MakePolyline", self.CurvesOp)
2150             self._autoPublish(anObj, theName, "polyline")
2151             return anObj
2152
2153         ## Create bezier curve on the set of points.
2154         #  @param thePoints Sequence of points for the bezier curve.
2155         #  @param theIsClosed If True, build a closed curve.
2156         #  @param theName Object name; when specified, this parameter is used
2157         #         for result publication in the study. Otherwise, if automatic
2158         #         publication is switched on, default value is used for result name.
2159         #
2160         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2161         #
2162         #  @ref tui_creation_curve "Example"
2163         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2164             """
2165             Create bezier curve on the set of points.
2166
2167             Parameters:
2168                 thePoints Sequence of points for the bezier curve.
2169                 theIsClosed If True, build a closed curve.
2170                 theName Object name; when specified, this parameter is used
2171                         for result publication in the study. Otherwise, if automatic
2172                         publication is switched on, default value is used for result name.
2173
2174             Returns:
2175                 New GEOM.GEOM_Object, containing the created bezier curve.
2176             """
2177             # Example: see GEOM_TestAll.py
2178             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2179             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2180             self._autoPublish(anObj, theName, "bezier")
2181             return anObj
2182
2183         ## Create B-Spline curve on the set of points.
2184         #  @param thePoints Sequence of points for the B-Spline curve.
2185         #  @param theIsClosed If True, build a closed curve.
2186         #  @param theDoReordering If TRUE, the algo does not follow the order of
2187         #                         \a thePoints but searches for the closest vertex.
2188         #  @param theName Object name; when specified, this parameter is used
2189         #         for result publication in the study. Otherwise, if automatic
2190         #         publication is switched on, default value is used for result name.
2191         #
2192         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2193         #
2194         #  @ref tui_creation_curve "Example"
2195         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2196             """
2197             Create B-Spline curve on the set of points.
2198
2199             Parameters:
2200                 thePoints Sequence of points for the B-Spline curve.
2201                 theIsClosed If True, build a closed curve.
2202                 theDoReordering If True, the algo does not follow the order of
2203                                 thePoints but searches for the closest vertex.
2204                 theName Object name; when specified, this parameter is used
2205                         for result publication in the study. Otherwise, if automatic
2206                         publication is switched on, default value is used for result name.
2207
2208             Returns:                     
2209                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2210             """
2211             # Example: see GEOM_TestAll.py
2212             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2213             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2214             self._autoPublish(anObj, theName, "bspline")
2215             return anObj
2216
2217         ## Create B-Spline curve on the set of points.
2218         #  @param thePoints Sequence of points for the B-Spline curve.
2219         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2220         #  @param theLastVec Vector object, defining the curve direction at its last point.
2221         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2226         #
2227         #  @ref tui_creation_curve "Example"
2228         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2229             """
2230             Create B-Spline curve on the set of points.
2231
2232             Parameters:
2233                 thePoints Sequence of points for the B-Spline curve.
2234                 theFirstVec Vector object, defining the curve direction at its first point.
2235                 theLastVec Vector object, defining the curve direction at its last point.
2236                 theName Object name; when specified, this parameter is used
2237                         for result publication in the study. Otherwise, if automatic
2238                         publication is switched on, default value is used for result name.
2239
2240             Returns:                     
2241                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2242             """
2243             # Example: see GEOM_TestAll.py
2244             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2245             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2246             self._autoPublish(anObj, theName, "bspline")
2247             return anObj
2248
2249         ## Creates a curve using the parametric definition of the basic points.
2250         #  @param thexExpr parametric equation of the coordinates X.
2251         #  @param theyExpr parametric equation of the coordinates Y.
2252         #  @param thezExpr parametric equation of the coordinates Z.
2253         #  @param theParamMin the minimal value of the parameter.
2254         #  @param theParamMax the maximum value of the parameter.
2255         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2256         #  @param theCurveType the type of the curve,
2257         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2258         #  @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.
2259         #  @param theName Object name; when specified, this parameter is used
2260         #         for result publication in the study. Otherwise, if automatic
2261         #         publication is switched on, default value is used for result name.
2262         #
2263         #  @return New GEOM.GEOM_Object, containing the created curve.
2264         #
2265         #  @ref tui_creation_curve "Example"
2266         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2267                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2268             """
2269             Creates a curve using the parametric definition of the basic points.
2270
2271             Parameters:
2272                 thexExpr parametric equation of the coordinates X.
2273                 theyExpr parametric equation of the coordinates Y.
2274                 thezExpr parametric equation of the coordinates Z.
2275                 theParamMin the minimal value of the parameter.
2276                 theParamMax the maximum value of the parameter.
2277                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2278                 theCurveType the type of the curve,
2279                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2280                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2281                              method is used which can lead to a bug.
2282                 theName Object name; when specified, this parameter is used
2283                         for result publication in the study. Otherwise, if automatic
2284                         publication is switched on, default value is used for result name.
2285
2286             Returns:
2287                 New GEOM.GEOM_Object, containing the created curve.
2288             """
2289             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2290             if theNewMethod:
2291               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2292             else:
2293               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
2294             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2295             anObj.SetParameters(Parameters)
2296             self._autoPublish(anObj, theName, "curve")
2297             return anObj
2298
2299         # end of l4_curves
2300         ## @}
2301
2302         ## @addtogroup l3_sketcher
2303         ## @{
2304
2305         ## Create a sketcher (wire or face), following the textual description,
2306         #  passed through <VAR>theCommand</VAR> argument. \n
2307         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2308         #  Format of the description string have to be the following:
2309         #
2310         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2311         #
2312         #  Where:
2313         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2314         #  - CMD is one of
2315         #     - "R angle" : Set the direction by angle
2316         #     - "D dx dy" : Set the direction by DX & DY
2317         #     .
2318         #       \n
2319         #     - "TT x y" : Create segment by point at X & Y
2320         #     - "T dx dy" : Create segment by point with DX & DY
2321         #     - "L length" : Create segment by direction & Length
2322         #     - "IX x" : Create segment by direction & Intersect. X
2323         #     - "IY y" : Create segment by direction & Intersect. Y
2324         #     .
2325         #       \n
2326         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2327         #     - "AA x y": Create arc by point at X & Y
2328         #     - "A dx dy" : Create arc by point with DX & DY
2329         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2330         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2331         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2332         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2333         #     .
2334         #       \n
2335         #     - "WW" : Close Wire (to finish)
2336         #     - "WF" : Close Wire and build face (to finish)
2337         #     .
2338         #        \n
2339         #  - Flag1 (= reverse) is 0 or 2 ...
2340         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2341         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2342         #     .
2343         #        \n
2344         #  - Flag2 (= control tolerance) is 0 or 1 ...
2345         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2346         #     - if 1 the wire is built only if the end point is on the arc
2347         #       with a tolerance of 10^-7 on the distance else the creation fails
2348         #
2349         #  @param theCommand String, defining the sketcher in local
2350         #                    coordinates of the working plane.
2351         #  @param theWorkingPlane Nine double values, defining origin,
2352         #                         OZ and OX directions of the working plane.
2353         #  @param theName Object name; when specified, this parameter is used
2354         #         for result publication in the study. Otherwise, if automatic
2355         #         publication is switched on, default value is used for result name.
2356         #
2357         #  @return New GEOM.GEOM_Object, containing the created wire.
2358         #
2359         #  @ref tui_sketcher_page "Example"
2360         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2361             """
2362             Create a sketcher (wire or face), following the textual description, passed
2363             through theCommand argument.
2364             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2365             Format of the description string have to be the following:
2366                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2367             Where:
2368             - x1, y1 are coordinates of the first sketcher point (zero by default),
2369             - CMD is one of
2370                - "R angle" : Set the direction by angle
2371                - "D dx dy" : Set the direction by DX & DY
2372                
2373                - "TT x y" : Create segment by point at X & Y
2374                - "T dx dy" : Create segment by point with DX & DY
2375                - "L length" : Create segment by direction & Length
2376                - "IX x" : Create segment by direction & Intersect. X
2377                - "IY y" : Create segment by direction & Intersect. Y
2378
2379                - "C radius length" : Create arc by direction, radius and length(in degree)
2380                - "AA x y": Create arc by point at X & Y
2381                - "A dx dy" : Create arc by point with DX & DY
2382                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2383                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2384                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2385                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2386
2387                - "WW" : Close Wire (to finish)
2388                - "WF" : Close Wire and build face (to finish)
2389             
2390             - Flag1 (= reverse) is 0 or 2 ...
2391                - if 0 the drawn arc is the one of lower angle (< Pi)
2392                - if 2 the drawn arc ius the one of greater angle (> Pi)
2393         
2394             - Flag2 (= control tolerance) is 0 or 1 ...
2395                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2396                - if 1 the wire is built only if the end point is on the arc
2397                  with a tolerance of 10^-7 on the distance else the creation fails
2398
2399             Parameters:
2400                 theCommand String, defining the sketcher in local
2401                            coordinates of the working plane.
2402                 theWorkingPlane Nine double values, defining origin,
2403                                 OZ and OX directions of the working plane.
2404                 theName Object name; when specified, this parameter is used
2405                         for result publication in the study. Otherwise, if automatic
2406                         publication is switched on, default value is used for result name.
2407
2408             Returns:
2409                 New GEOM.GEOM_Object, containing the created wire.
2410             """
2411             # Example: see GEOM_TestAll.py
2412             theCommand,Parameters = ParseSketcherCommand(theCommand)
2413             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2414             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2415             anObj.SetParameters(Parameters)
2416             self._autoPublish(anObj, theName, "wire")
2417             return anObj
2418
2419         ## Create a sketcher (wire or face), following the textual description,
2420         #  passed through <VAR>theCommand</VAR> argument. \n
2421         #  For format of the description string see MakeSketcher() method.\n
2422         #  @param theCommand String, defining the sketcher in local
2423         #                    coordinates of the working plane.
2424         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2425         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created wire.
2430         #
2431         #  @ref tui_sketcher_page "Example"
2432         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2433             """
2434             Create a sketcher (wire or face), following the textual description,
2435             passed through theCommand argument.
2436             For format of the description string see geompy.MakeSketcher() method.
2437
2438             Parameters:
2439                 theCommand String, defining the sketcher in local
2440                            coordinates of the working plane.
2441                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2442                 theName Object name; when specified, this parameter is used
2443                         for result publication in the study. Otherwise, if automatic
2444                         publication is switched on, default value is used for result name.
2445
2446             Returns:
2447                 New GEOM.GEOM_Object, containing the created wire.
2448             """
2449             theCommand,Parameters = ParseSketcherCommand(theCommand)
2450             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2451             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2452             anObj.SetParameters(Parameters)
2453             self._autoPublish(anObj, theName, "wire")
2454             return anObj
2455
2456         ## Obtain a 2D sketcher interface
2457         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface      
2458         def Sketcher2D (self):
2459             """
2460             Obtain a 2D sketcher interface.
2461
2462             Example of usage:
2463                sk = geompy.Sketcher2D()
2464                sk.addPoint(20, 20)
2465                sk.addSegmentRelative(15, 70)
2466                sk.addSegmentPerpY(50)
2467                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2468                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2469                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2470                sk.close()
2471                Sketch_1 = sk.wire(geomObj_1)
2472             """
2473             sk = Sketcher2D (self)
2474             return sk
2475         
2476         ## Create a sketcher wire, following the numerical description,
2477         #  passed through <VAR>theCoordinates</VAR> argument. \n
2478         #  @param theCoordinates double values, defining points to create a wire,
2479         #                                                      passing from it.
2480         #  @param theName Object name; when specified, this parameter is used
2481         #         for result publication in the study. Otherwise, if automatic
2482         #         publication is switched on, default value is used for result name.
2483         #
2484         #  @return New GEOM.GEOM_Object, containing the created wire.
2485         #
2486         #  @ref tui_3dsketcher_page "Example"
2487         def Make3DSketcher(self, theCoordinates, theName=None):
2488             """
2489             Create a sketcher wire, following the numerical description,
2490             passed through theCoordinates argument.
2491
2492             Parameters:
2493                 theCoordinates double values, defining points to create a wire,
2494                                passing from it.
2495                 theName Object name; when specified, this parameter is used
2496                         for result publication in the study. Otherwise, if automatic
2497                         publication is switched on, default value is used for result name.
2498
2499             Returns:
2500                 New GEOM_Object, containing the created wire.
2501             """
2502             theCoordinates,Parameters = ParseParameters(theCoordinates)
2503             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2504             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2505             anObj.SetParameters(Parameters)
2506             self._autoPublish(anObj, theName, "wire")
2507             return anObj
2508
2509         ## Obtain a 3D sketcher interface
2510         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2511         #
2512         #  @ref tui_3dsketcher_page "Example"
2513         def Sketcher3D (self):
2514             """
2515             Obtain a 3D sketcher interface.
2516
2517             Example of usage:
2518                 sk = geompy.Sketcher3D()
2519                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2520                 sk.addPointsRelative(0, 0, 130)
2521                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2522                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2523                 sk.close()
2524                 a3D_Sketcher_1 = sk.wire()
2525             """
2526             sk = Sketcher3D (self)
2527             return sk
2528
2529         # end of l3_sketcher
2530         ## @}
2531
2532         ## @addtogroup l3_3d_primitives
2533         ## @{
2534
2535         ## Create a box by coordinates of two opposite vertices.
2536         #
2537         #  @param x1,y1,z1 double values, defining first point it.
2538         #  @param x2,y2,z2 double values, defining first point it.
2539         #  @param theName Object name; when specified, this parameter is used
2540         #         for result publication in the study. Otherwise, if automatic
2541         #         publication is switched on, default value is used for result name.
2542         #
2543         #  @return New GEOM.GEOM_Object, containing the created box.
2544         #
2545         #  @ref tui_creation_box "Example"
2546         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2547             """
2548             Create a box by coordinates of two opposite vertices.
2549             
2550             Parameters:
2551                 x1,y1,z1 double values, defining first point.
2552                 x2,y2,z2 double values, defining second point.
2553                 theName Object name; when specified, this parameter is used
2554                         for result publication in the study. Otherwise, if automatic
2555                         publication is switched on, default value is used for result name.
2556                 
2557             Returns:
2558                 New GEOM.GEOM_Object, containing the created box.
2559             """
2560             # Example: see GEOM_TestAll.py
2561             pnt1 = self.MakeVertex(x1,y1,z1)
2562             pnt2 = self.MakeVertex(x2,y2,z2)
2563             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2564             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2565
2566         ## Create a box with specified dimensions along the coordinate axes
2567         #  and with edges, parallel to the coordinate axes.
2568         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2569         #  @param theDX Length of Box edges, parallel to OX axis.
2570         #  @param theDY Length of Box edges, parallel to OY axis.
2571         #  @param theDZ Length of Box edges, parallel to OZ axis.
2572         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created box.
2577         #
2578         #  @ref tui_creation_box "Example"
2579         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2580             """
2581             Create a box with specified dimensions along the coordinate axes
2582             and with edges, parallel to the coordinate axes.
2583             Center of the box will be at point (DX/2, DY/2, DZ/2).
2584
2585             Parameters:
2586                 theDX Length of Box edges, parallel to OX axis.
2587                 theDY Length of Box edges, parallel to OY axis.
2588                 theDZ Length of Box edges, parallel to OZ axis.
2589                 theName Object name; when specified, this parameter is used
2590                         for result publication in the study. Otherwise, if automatic
2591                         publication is switched on, default value is used for result name.
2592
2593             Returns:   
2594                 New GEOM.GEOM_Object, containing the created box.
2595             """
2596             # Example: see GEOM_TestAll.py
2597             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2598             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2599             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2600             anObj.SetParameters(Parameters)
2601             self._autoPublish(anObj, theName, "box")
2602             return anObj
2603
2604         ## Create a box with two specified opposite vertices,
2605         #  and with edges, parallel to the coordinate axes
2606         #  @param thePnt1 First of two opposite vertices.
2607         #  @param thePnt2 Second of two opposite vertices.
2608         #  @param theName Object name; when specified, this parameter is used
2609         #         for result publication in the study. Otherwise, if automatic
2610         #         publication is switched on, default value is used for result name.
2611         #
2612         #  @return New GEOM.GEOM_Object, containing the created box.
2613         #
2614         #  @ref tui_creation_box "Example"
2615         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2616             """
2617             Create a box with two specified opposite vertices,
2618             and with edges, parallel to the coordinate axes
2619
2620             Parameters:
2621                 thePnt1 First of two opposite vertices.
2622                 thePnt2 Second of two opposite vertices.
2623                 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             Returns:
2628                 New GEOM.GEOM_Object, containing the created box.
2629             """
2630             # Example: see GEOM_TestAll.py
2631             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2632             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2633             self._autoPublish(anObj, theName, "box")
2634             return anObj
2635
2636         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2637         #  @param theH height of Face.
2638         #  @param theW width of Face.
2639         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2640         #  @param theName Object name; when specified, this parameter is used
2641         #         for result publication in the study. Otherwise, if automatic
2642         #         publication is switched on, default value is used for result name.
2643         #
2644         #  @return New GEOM.GEOM_Object, containing the created face.
2645         #
2646         #  @ref tui_creation_face "Example"
2647         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2648             """
2649             Create a face with specified dimensions with edges parallel to coordinate axes.
2650
2651             Parameters:
2652                 theH height of Face.
2653                 theW width of Face.
2654                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2655                 theName Object name; when specified, this parameter is used
2656                         for result publication in the study. Otherwise, if automatic
2657                         publication is switched on, default value is used for result name.
2658
2659             Returns:
2660                 New GEOM.GEOM_Object, containing the created face.
2661             """
2662             # Example: see GEOM_TestAll.py
2663             theH,theW,Parameters = ParseParameters(theH, theW)
2664             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2665             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2666             anObj.SetParameters(Parameters)
2667             self._autoPublish(anObj, theName, "rectangle")
2668             return anObj
2669
2670         ## Create a face from another plane and two sizes,
2671         #  vertical size and horisontal size.
2672         #  @param theObj   Normale vector to the creating face or
2673         #  the face object.
2674         #  @param theH     Height (vertical size).
2675         #  @param theW     Width (horisontal size).
2676         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created face.
2681         #
2682         #  @ref tui_creation_face "Example"
2683         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2684             """
2685             Create a face from another plane and two sizes,
2686             vertical size and horisontal size.
2687
2688             Parameters:
2689                 theObj   Normale vector to the creating face or
2690                          the face object.
2691                 theH     Height (vertical size).
2692                 theW     Width (horisontal size).
2693                 theName Object name; when specified, this parameter is used
2694                         for result publication in the study. Otherwise, if automatic
2695                         publication is switched on, default value is used for result name.
2696
2697             Returns:
2698                 New GEOM_Object, containing the created face.
2699             """
2700             # Example: see GEOM_TestAll.py
2701             theH,theW,Parameters = ParseParameters(theH, theW)
2702             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2703             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2704             anObj.SetParameters(Parameters)
2705             self._autoPublish(anObj, theName, "rectangle")
2706             return anObj
2707
2708         ## Create a disk with given center, normal vector and radius.
2709         #  @param thePnt Disk center.
2710         #  @param theVec Vector, normal to the plane of the disk.
2711         #  @param theR Disk radius.
2712         #  @param theName Object name; when specified, this parameter is used
2713         #         for result publication in the study. Otherwise, if automatic
2714         #         publication is switched on, default value is used for result name.
2715         #
2716         #  @return New GEOM.GEOM_Object, containing the created disk.
2717         #
2718         #  @ref tui_creation_disk "Example"
2719         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2720             """
2721             Create a disk with given center, normal vector and radius.
2722
2723             Parameters:
2724                 thePnt Disk center.
2725                 theVec Vector, normal to the plane of the disk.
2726                 theR Disk radius.
2727                 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             Returns:    
2732                 New GEOM.GEOM_Object, containing the created disk.
2733             """
2734             # Example: see GEOM_TestAll.py
2735             theR,Parameters = ParseParameters(theR)
2736             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2737             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2738             anObj.SetParameters(Parameters)
2739             self._autoPublish(anObj, theName, "disk")
2740             return anObj
2741
2742         ## Create a disk, passing through three given points
2743         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2744         #  @param theName Object name; when specified, this parameter is used
2745         #         for result publication in the study. Otherwise, if automatic
2746         #         publication is switched on, default value is used for result name.
2747         #
2748         #  @return New GEOM.GEOM_Object, containing the created disk.
2749         #
2750         #  @ref tui_creation_disk "Example"
2751         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2752             """
2753             Create a disk, passing through three given points
2754
2755             Parameters:
2756                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2757                 theName Object name; when specified, this parameter is used
2758                         for result publication in the study. Otherwise, if automatic
2759                         publication is switched on, default value is used for result name.
2760
2761             Returns:    
2762                 New GEOM.GEOM_Object, containing the created disk.
2763             """
2764             # Example: see GEOM_TestAll.py
2765             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2766             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2767             self._autoPublish(anObj, theName, "disk")
2768             return anObj
2769
2770         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2771         #  @param theR Radius of Face.
2772         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2773         #  @param theName Object name; when specified, this parameter is used
2774         #         for result publication in the study. Otherwise, if automatic
2775         #         publication is switched on, default value is used for result name.
2776         #
2777         #  @return New GEOM.GEOM_Object, containing the created disk.
2778         #
2779         #  @ref tui_creation_face "Example"
2780         def MakeDiskR(self, theR, theOrientation, theName=None):
2781             """
2782             Create a disk with specified dimensions along OX-OY coordinate axes.
2783
2784             Parameters:
2785                 theR Radius of Face.
2786                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2787                 theName Object name; when specified, this parameter is used
2788                         for result publication in the study. Otherwise, if automatic
2789                         publication is switched on, default value is used for result name.
2790
2791             Returns: 
2792                 New GEOM.GEOM_Object, containing the created disk.
2793
2794             Example of usage:
2795                 Disk3 = geompy.MakeDiskR(100., 1)
2796             """
2797             # Example: see GEOM_TestAll.py
2798             theR,Parameters = ParseParameters(theR)
2799             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2800             RaiseIfFailed("MakeDiskR", self.PrimOp)
2801             anObj.SetParameters(Parameters)
2802             self._autoPublish(anObj, theName, "disk")
2803             return anObj
2804
2805         ## Create a cylinder with given base point, axis, radius and height.
2806         #  @param thePnt Central point of cylinder base.
2807         #  @param theAxis Cylinder axis.
2808         #  @param theR Cylinder radius.
2809         #  @param theH Cylinder height.
2810         #  @param theName Object name; when specified, this parameter is used
2811         #         for result publication in the study. Otherwise, if automatic
2812         #         publication is switched on, default value is used for result name.
2813         #
2814         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2815         #
2816         #  @ref tui_creation_cylinder "Example"
2817         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2818             """
2819             Create a cylinder with given base point, axis, radius and height.
2820
2821             Parameters:
2822                 thePnt Central point of cylinder base.
2823                 theAxis Cylinder axis.
2824                 theR Cylinder radius.
2825                 theH Cylinder height.
2826                 theName Object name; when specified, this parameter is used
2827                         for result publication in the study. Otherwise, if automatic
2828                         publication is switched on, default value is used for result name.
2829
2830             Returns: 
2831                 New GEOM.GEOM_Object, containing the created cylinder.
2832             """
2833             # Example: see GEOM_TestAll.py
2834             theR,theH,Parameters = ParseParameters(theR, theH)
2835             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
2836             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
2837             anObj.SetParameters(Parameters)
2838             self._autoPublish(anObj, theName, "cylinder")
2839             return anObj
2840
2841         ## Create a cylinder with given radius and height at
2842         #  the origin of coordinate system. Axis of the cylinder
2843         #  will be collinear to the OZ axis of the coordinate system.
2844         #  @param theR Cylinder radius.
2845         #  @param theH Cylinder height.
2846         #  @param theName Object name; when specified, this parameter is used
2847         #         for result publication in the study. Otherwise, if automatic
2848         #         publication is switched on, default value is used for result name.
2849         #
2850         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2851         #
2852         #  @ref tui_creation_cylinder "Example"
2853         def MakeCylinderRH(self, theR, theH, theName=None):
2854             """
2855             Create a cylinder with given radius and height at
2856             the origin of coordinate system. Axis of the cylinder
2857             will be collinear to the OZ axis of the coordinate system.
2858
2859             Parameters:
2860                 theR Cylinder radius.
2861                 theH Cylinder height.
2862                 theName Object name; when specified, this parameter is used
2863                         for result publication in the study. Otherwise, if automatic
2864                         publication is switched on, default value is used for result name.
2865
2866             Returns:    
2867                 New GEOM.GEOM_Object, containing the created cylinder.
2868             """
2869             # Example: see GEOM_TestAll.py
2870             theR,theH,Parameters = ParseParameters(theR, theH)
2871             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
2872             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
2873             anObj.SetParameters(Parameters)
2874             self._autoPublish(anObj, theName, "cylinder")
2875             return anObj
2876
2877         ## Create a sphere with given center and radius.
2878         #  @param thePnt Sphere center.
2879         #  @param theR Sphere radius.
2880         #  @param theName Object name; when specified, this parameter is used
2881         #         for result publication in the study. Otherwise, if automatic
2882         #         publication is switched on, default value is used for result name.
2883         #
2884         #  @return New GEOM.GEOM_Object, containing the created sphere.
2885         #
2886         #  @ref tui_creation_sphere "Example"
2887         def MakeSpherePntR(self, thePnt, theR, theName=None):
2888             """
2889             Create a sphere with given center and radius.
2890
2891             Parameters:
2892                 thePnt Sphere center.
2893                 theR Sphere radius.
2894                 theName Object name; when specified, this parameter is used
2895                         for result publication in the study. Otherwise, if automatic
2896                         publication is switched on, default value is used for result name.
2897
2898             Returns:    
2899                 New GEOM.GEOM_Object, containing the created sphere.            
2900             """
2901             # Example: see GEOM_TestAll.py
2902             theR,Parameters = ParseParameters(theR)
2903             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
2904             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
2905             anObj.SetParameters(Parameters)
2906             self._autoPublish(anObj, theName, "sphere")
2907             return anObj
2908
2909         ## Create a sphere with given center and radius.
2910         #  @param x,y,z Coordinates of sphere center.
2911         #  @param theR Sphere radius.
2912         #  @param theName Object name; when specified, this parameter is used
2913         #         for result publication in the study. Otherwise, if automatic
2914         #         publication is switched on, default value is used for result name.
2915         #
2916         #  @return New GEOM.GEOM_Object, containing the created sphere.
2917         #
2918         #  @ref tui_creation_sphere "Example"
2919         def MakeSphere(self, x, y, z, theR, theName=None):
2920             """
2921             Create a sphere with given center and radius.
2922
2923             Parameters: 
2924                 x,y,z Coordinates of sphere center.
2925                 theR Sphere radius.
2926                 theName Object name; when specified, this parameter is used
2927                         for result publication in the study. Otherwise, if automatic
2928                         publication is switched on, default value is used for result name.
2929
2930             Returns:
2931                 New GEOM.GEOM_Object, containing the created sphere.
2932             """
2933             # Example: see GEOM_TestAll.py
2934             point = self.MakeVertex(x, y, z)
2935             # note: auto-publishing is done in self.MakeSpherePntR()
2936             anObj = self.MakeSpherePntR(point, theR, theName)
2937             return anObj
2938
2939         ## Create a sphere with given radius at the origin of coordinate system.
2940         #  @param theR Sphere radius.
2941         #  @param theName Object name; when specified, this parameter is used
2942         #         for result publication in the study. Otherwise, if automatic
2943         #         publication is switched on, default value is used for result name.
2944         #
2945         #  @return New GEOM.GEOM_Object, containing the created sphere.
2946         #
2947         #  @ref tui_creation_sphere "Example"
2948         def MakeSphereR(self, theR, theName=None):
2949             """
2950             Create a sphere with given radius at the origin of coordinate system.
2951
2952             Parameters: 
2953                 theR Sphere radius.
2954                 theName Object name; when specified, this parameter is used
2955                         for result publication in the study. Otherwise, if automatic
2956                         publication is switched on, default value is used for result name.
2957
2958             Returns:
2959                 New GEOM.GEOM_Object, containing the created sphere.            
2960             """
2961             # Example: see GEOM_TestAll.py
2962             theR,Parameters = ParseParameters(theR)
2963             anObj = self.PrimOp.MakeSphereR(theR)
2964             RaiseIfFailed("MakeSphereR", self.PrimOp)
2965             anObj.SetParameters(Parameters)
2966             self._autoPublish(anObj, theName, "sphere")
2967             return anObj
2968
2969         ## Create a cone with given base point, axis, height and radiuses.
2970         #  @param thePnt Central point of the first cone base.
2971         #  @param theAxis Cone axis.
2972         #  @param theR1 Radius of the first cone base.
2973         #  @param theR2 Radius of the second cone base.
2974         #    \note If both radiuses are non-zero, the cone will be truncated.
2975         #    \note If the radiuses are equal, a cylinder will be created instead.
2976         #  @param theH Cone height.
2977         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created cone.
2982         #
2983         #  @ref tui_creation_cone "Example"
2984         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
2985             """
2986             Create a cone with given base point, axis, height and radiuses.
2987
2988             Parameters: 
2989                 thePnt Central point of the first cone base.
2990                 theAxis Cone axis.
2991                 theR1 Radius of the first cone base.
2992                 theR2 Radius of the second cone base.
2993                 theH Cone height.
2994                 theName Object name; when specified, this parameter is used
2995                         for result publication in the study. Otherwise, if automatic
2996                         publication is switched on, default value is used for result name.
2997
2998             Note:
2999                 If both radiuses are non-zero, the cone will be truncated.
3000                 If the radiuses are equal, a cylinder will be created instead.
3001
3002             Returns:
3003                 New GEOM.GEOM_Object, containing the created cone.
3004             """
3005             # Example: see GEOM_TestAll.py
3006             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3007             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3008             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3009             anObj.SetParameters(Parameters)
3010             self._autoPublish(anObj, theName, "cone")
3011             return anObj
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         #  @param theR1 Radius of the first cone base.
3017         #  @param theR2 Radius of the second cone base.
3018         #    \note If both radiuses are non-zero, the cone will be truncated.
3019         #    \note If the radiuses are equal, a cylinder will be created instead.
3020         #  @param theH Cone height.
3021         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created cone.
3026         #
3027         #  @ref tui_creation_cone "Example"
3028         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3029             """
3030             Create a cone with given height and radiuses at
3031             the origin of coordinate system. Axis of the cone will
3032             be collinear to the OZ axis of the coordinate system.
3033
3034             Parameters: 
3035                 theR1 Radius of the first cone base.
3036                 theR2 Radius of the second cone base.
3037                 theH Cone height.
3038                 theName Object name; when specified, this parameter is used
3039                         for result publication in the study. Otherwise, if automatic
3040                         publication is switched on, default value is used for result name.
3041
3042             Note:
3043                 If both radiuses are non-zero, the cone will be truncated.
3044                 If the radiuses are equal, a cylinder will be created instead.
3045
3046             Returns:
3047                 New GEOM.GEOM_Object, containing the created cone.
3048             """
3049             # Example: see GEOM_TestAll.py
3050             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3051             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3052             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3053             anObj.SetParameters(Parameters)
3054             self._autoPublish(anObj, theName, "cone")
3055             return anObj
3056
3057         ## Create a torus with given center, normal vector and radiuses.
3058         #  @param thePnt Torus central point.
3059         #  @param theVec Torus axis of symmetry.
3060         #  @param theRMajor Torus major radius.
3061         #  @param theRMinor Torus minor radius.
3062         #  @param theName Object name; when specified, this parameter is used
3063         #         for result publication in the study. Otherwise, if automatic
3064         #         publication is switched on, default value is used for result name.
3065         #
3066         #  @return New GEOM.GEOM_Object, containing the created torus.
3067         #
3068         #  @ref tui_creation_torus "Example"
3069         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3070             """
3071             Create a torus with given center, normal vector and radiuses.
3072
3073             Parameters: 
3074                 thePnt Torus central point.
3075                 theVec Torus axis of symmetry.
3076                 theRMajor Torus major radius.
3077                 theRMinor Torus minor radius.
3078                 theName Object name; when specified, this parameter is used
3079                         for result publication in the study. Otherwise, if automatic
3080                         publication is switched on, default value is used for result name.
3081
3082            Returns:
3083                 New GEOM.GEOM_Object, containing the created torus.
3084             """
3085             # Example: see GEOM_TestAll.py
3086             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3087             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3088             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3089             anObj.SetParameters(Parameters)
3090             self._autoPublish(anObj, theName, "torus")
3091             return anObj
3092
3093         ## Create a torus with given radiuses at the origin of coordinate system.
3094         #  @param theRMajor Torus major radius.
3095         #  @param theRMinor Torus minor radius.
3096         #  @param theName Object name; when specified, this parameter is used
3097         #         for result publication in the study. Otherwise, if automatic
3098         #         publication is switched on, default value is used for result name.
3099         #
3100         #  @return New GEOM.GEOM_Object, containing the created torus.
3101         #
3102         #  @ref tui_creation_torus "Example"
3103         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3104             """
3105            Create a torus with given radiuses at the origin of coordinate system.
3106
3107            Parameters: 
3108                 theRMajor Torus major radius.
3109                 theRMinor Torus minor radius.
3110                 theName Object name; when specified, this parameter is used
3111                         for result publication in the study. Otherwise, if automatic
3112                         publication is switched on, default value is used for result name.
3113
3114            Returns:
3115                 New GEOM.GEOM_Object, containing the created torus.            
3116             """
3117             # Example: see GEOM_TestAll.py
3118             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3119             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3120             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3121             anObj.SetParameters(Parameters)
3122             self._autoPublish(anObj, theName, "torus")
3123             return anObj
3124
3125         # end of l3_3d_primitives
3126         ## @}
3127
3128         ## @addtogroup l3_complex
3129         ## @{
3130
3131         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3132         #  @param theBase Base shape to be extruded.
3133         #  @param thePoint1 First end of extrusion vector.
3134         #  @param thePoint2 Second end of extrusion vector.
3135         #  @param theScaleFactor Use it to make prism with scaled second base.
3136         #                        Nagative value means not scaled second base.
3137         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created prism.
3142         #
3143         #  @ref tui_creation_prism "Example"
3144         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3145             """
3146             Create a shape by extrusion of the base shape along a vector, defined by two points.
3147
3148             Parameters: 
3149                 theBase Base shape to be extruded.
3150                 thePoint1 First end of extrusion vector.
3151                 thePoint2 Second end of extrusion vector.
3152                 theScaleFactor Use it to make prism with scaled second base.
3153                                Nagative value means not scaled second base.
3154                 theName Object name; when specified, this parameter is used
3155                         for result publication in the study. Otherwise, if automatic
3156                         publication is switched on, default value is used for result name.
3157
3158             Returns:
3159                 New GEOM.GEOM_Object, containing the created prism.
3160             """
3161             # Example: see GEOM_TestAll.py
3162             anObj = None
3163             Parameters = ""
3164             if theScaleFactor > 0:
3165                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3166                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3167             else:
3168                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3169             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3170             anObj.SetParameters(Parameters)
3171             self._autoPublish(anObj, theName, "prism")
3172             return anObj
3173
3174         ## Create a shape by extrusion of the base shape along a
3175         #  vector, defined by two points, in 2 Ways (forward/backward).
3176         #  @param theBase Base shape to be extruded.
3177         #  @param thePoint1 First end of extrusion vector.
3178         #  @param thePoint2 Second end of extrusion vector.
3179         #  @param theName Object name; when specified, this parameter is used
3180         #         for result publication in the study. Otherwise, if automatic
3181         #         publication is switched on, default value is used for result name.
3182         #
3183         #  @return New GEOM.GEOM_Object, containing the created prism.
3184         #
3185         #  @ref tui_creation_prism "Example"
3186         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3187             """
3188             Create a shape by extrusion of the base shape along a
3189             vector, defined by two points, in 2 Ways (forward/backward).
3190
3191             Parameters: 
3192                 theBase Base shape to be extruded.
3193                 thePoint1 First end of extrusion vector.
3194                 thePoint2 Second end of extrusion vector.
3195                 theName Object name; when specified, this parameter is used
3196                         for result publication in the study. Otherwise, if automatic
3197                         publication is switched on, default value is used for result name.
3198
3199             Returns:
3200                 New GEOM.GEOM_Object, containing the created prism.
3201             """
3202             # Example: see GEOM_TestAll.py
3203             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3204             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3205             self._autoPublish(anObj, theName, "prism")
3206             return anObj
3207
3208         ## Create a shape by extrusion of the base shape along the vector,
3209         #  i.e. all the space, transfixed by the base shape during its translation
3210         #  along the vector on the given distance.
3211         #  @param theBase Base shape to be extruded.
3212         #  @param theVec Direction of extrusion.
3213         #  @param theH Prism dimension along theVec.
3214         #  @param theScaleFactor Use it to make prism with scaled second base.
3215         #                        Negative value means not scaled second base.
3216         #  @param theName Object name; when specified, this parameter is used
3217         #         for result publication in the study. Otherwise, if automatic
3218         #         publication is switched on, default value is used for result name.
3219         #
3220         #  @return New GEOM.GEOM_Object, containing the created prism.
3221         #
3222         #  @ref tui_creation_prism "Example"
3223         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3224             """
3225             Create a shape by extrusion of the base shape along the vector,
3226             i.e. all the space, transfixed by the base shape during its translation
3227             along the vector on the given distance.
3228
3229             Parameters: 
3230                 theBase Base shape to be extruded.
3231                 theVec Direction of extrusion.
3232                 theH Prism dimension along theVec.
3233                 theScaleFactor Use it to make prism with scaled second base.
3234                                Negative value means not scaled second base.
3235                 theName Object name; when specified, this parameter is used
3236                         for result publication in the study. Otherwise, if automatic
3237                         publication is switched on, default value is used for result name.
3238
3239             Returns:
3240                 New GEOM.GEOM_Object, containing the created prism.
3241             """
3242             # Example: see GEOM_TestAll.py
3243             anObj = None
3244             Parameters = ""
3245             if theScaleFactor > 0:
3246                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3247                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3248             else:
3249                 theH,Parameters = ParseParameters(theH)
3250                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3251             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3252             anObj.SetParameters(Parameters)
3253             self._autoPublish(anObj, theName, "prism")
3254             return anObj
3255
3256         ## Create a shape by extrusion of the base shape along the vector,
3257         #  i.e. all the space, transfixed by the base shape during its translation
3258         #  along the vector on the given distance in 2 Ways (forward/backward).
3259         #  @param theBase Base shape to be extruded.
3260         #  @param theVec Direction of extrusion.
3261         #  @param theH Prism dimension along theVec in forward direction.
3262         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created prism.
3267         #
3268         #  @ref tui_creation_prism "Example"
3269         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3270             """
3271             Create a shape by extrusion of the base shape along the vector,
3272             i.e. all the space, transfixed by the base shape during its translation
3273             along the vector on the given distance in 2 Ways (forward/backward).
3274
3275             Parameters:
3276                 theBase Base shape to be extruded.
3277                 theVec Direction of extrusion.
3278                 theH Prism dimension along theVec in forward direction.
3279                 theName Object name; when specified, this parameter is used
3280                         for result publication in the study. Otherwise, if automatic
3281                         publication is switched on, default value is used for result name.
3282
3283             Returns:
3284                 New GEOM.GEOM_Object, containing the created prism.
3285             """
3286             # Example: see GEOM_TestAll.py
3287             theH,Parameters = ParseParameters(theH)
3288             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3289             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3290             anObj.SetParameters(Parameters)
3291             self._autoPublish(anObj, theName, "prism")
3292             return anObj
3293
3294         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3295         #  @param theBase Base shape to be extruded.
3296         #  @param theDX, theDY, theDZ Directions of extrusion.
3297         #  @param theScaleFactor Use it to make prism with scaled second base.
3298         #                        Nagative value means not scaled second base.
3299         #  @param theName Object name; when specified, this parameter is used
3300         #         for result publication in the study. Otherwise, if automatic
3301         #         publication is switched on, default value is used for result name.
3302         #
3303         #  @return New GEOM.GEOM_Object, containing the created prism.
3304         #
3305         #  @ref tui_creation_prism "Example"
3306         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3307             """
3308             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3309
3310             Parameters:
3311                 theBase Base shape to be extruded.
3312                 theDX, theDY, theDZ Directions of extrusion.
3313                 theScaleFactor Use it to make prism with scaled second base.
3314                                Nagative value means not scaled second base.
3315                 theName Object name; when specified, this parameter is used
3316                         for result publication in the study. Otherwise, if automatic
3317                         publication is switched on, default value is used for result name.
3318
3319             Returns: 
3320                 New GEOM.GEOM_Object, containing the created prism.
3321             """
3322             # Example: see GEOM_TestAll.py
3323             anObj = None
3324             Parameters = ""
3325             if theScaleFactor > 0:
3326                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3327                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3328             else:
3329                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3330                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3331             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3332             anObj.SetParameters(Parameters)
3333             self._autoPublish(anObj, theName, "prism")
3334             return anObj
3335
3336         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3337         #  i.e. all the space, transfixed by the base shape during its translation
3338         #  along the vector on the given distance in 2 Ways (forward/backward).
3339         #  @param theBase Base shape to be extruded.
3340         #  @param theDX, theDY, theDZ Directions of extrusion.
3341         #  @param theName Object name; when specified, this parameter is used
3342         #         for result publication in the study. Otherwise, if automatic
3343         #         publication is switched on, default value is used for result name.
3344         #
3345         #  @return New GEOM.GEOM_Object, containing the created prism.
3346         #
3347         #  @ref tui_creation_prism "Example"
3348         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3349             """
3350             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3351             i.e. all the space, transfixed by the base shape during its translation
3352             along the vector on the given distance in 2 Ways (forward/backward).
3353
3354             Parameters:
3355                 theBase Base shape to be extruded.
3356                 theDX, theDY, theDZ Directions of extrusion.
3357                 theName Object name; when specified, this parameter is used
3358                         for result publication in the study. Otherwise, if automatic
3359                         publication is switched on, default value is used for result name.
3360
3361             Returns:
3362                 New GEOM.GEOM_Object, containing the created prism.
3363             """
3364             # Example: see GEOM_TestAll.py
3365             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3366             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3367             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3368             anObj.SetParameters(Parameters)
3369             self._autoPublish(anObj, theName, "prism")
3370             return anObj
3371
3372         ## Create a shape by revolution of the base shape around the axis
3373         #  on the given angle, i.e. all the space, transfixed by the base
3374         #  shape during its rotation around the axis on the given angle.
3375         #  @param theBase Base shape to be rotated.
3376         #  @param theAxis Rotation axis.
3377         #  @param theAngle Rotation angle in radians.
3378         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created revolution.
3383         #
3384         #  @ref tui_creation_revolution "Example"
3385         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3386             """
3387             Create a shape by revolution of the base shape around the axis
3388             on the given angle, i.e. all the space, transfixed by the base
3389             shape during its rotation around the axis on the given angle.
3390
3391             Parameters:
3392                 theBase Base shape to be rotated.
3393                 theAxis Rotation axis.
3394                 theAngle Rotation angle in radians.
3395                 theName Object name; when specified, this parameter is used
3396                         for result publication in the study. Otherwise, if automatic
3397                         publication is switched on, default value is used for result name.
3398
3399             Returns: 
3400                 New GEOM.GEOM_Object, containing the created revolution.
3401             """
3402             # Example: see GEOM_TestAll.py
3403             theAngle,Parameters = ParseParameters(theAngle)
3404             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3405             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3406             anObj.SetParameters(Parameters)
3407             self._autoPublish(anObj, theName, "revolution")
3408             return anObj
3409
3410         ## Create a shape by revolution of the base shape around the axis
3411         #  on the given angle, i.e. all the space, transfixed by the base
3412         #  shape during its rotation around the axis on the given angle in
3413         #  both directions (forward/backward)
3414         #  @param theBase Base shape to be rotated.
3415         #  @param theAxis Rotation axis.
3416         #  @param theAngle Rotation angle in radians.
3417         #  @param theName Object name; when specified, this parameter is used
3418         #         for result publication in the study. Otherwise, if automatic
3419         #         publication is switched on, default value is used for result name.
3420         #
3421         #  @return New GEOM.GEOM_Object, containing the created revolution.
3422         #
3423         #  @ref tui_creation_revolution "Example"
3424         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3425             """
3426             Create a shape by revolution of the base shape around the axis
3427             on the given angle, i.e. all the space, transfixed by the base
3428             shape during its rotation around the axis on the given angle in
3429             both directions (forward/backward).
3430
3431             Parameters:
3432                 theBase Base shape to be rotated.
3433                 theAxis Rotation axis.
3434                 theAngle Rotation angle in radians.
3435                 theName Object name; when specified, this parameter is used
3436                         for result publication in the study. Otherwise, if automatic
3437                         publication is switched on, default value is used for result name.
3438
3439             Returns: 
3440                 New GEOM.GEOM_Object, containing the created revolution.
3441             """
3442             theAngle,Parameters = ParseParameters(theAngle)
3443             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3444             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3445             anObj.SetParameters(Parameters)
3446             self._autoPublish(anObj, theName, "revolution")
3447             return anObj
3448
3449         ## Create a filling from the given compound of contours.
3450         #  @param theShape the compound of contours
3451         #  @param theMinDeg a minimal degree of BSpline surface to create
3452         #  @param theMaxDeg a maximal degree of BSpline surface to create
3453         #  @param theTol2D a 2d tolerance to be reached
3454         #  @param theTol3D a 3d tolerance to be reached
3455         #  @param theNbIter a number of iteration of approximation algorithm
3456         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3457         #  @param isApprox if True, BSpline curves are generated in the process
3458         #                  of surface construction. By default it is False, that means
3459         #                  the surface is created using given curves. The usage of
3460         #                  Approximation makes the algorithm work slower, but allows
3461         #                  building the surface for rather complex cases.
3462         #  @param theName Object name; when specified, this parameter is used
3463         #         for result publication in the study. Otherwise, if automatic
3464         #         publication is switched on, default value is used for result name.
3465         #
3466         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3467         #
3468         #  @ref tui_creation_filling "Example"
3469         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3470                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3471             """
3472             Create a filling from the given compound of contours.
3473
3474             Parameters:
3475                 theShape the compound of contours
3476                 theMinDeg a minimal degree of BSpline surface to create
3477                 theMaxDeg a maximal degree of BSpline surface to create
3478                 theTol2D a 2d tolerance to be reached
3479                 theTol3D a 3d tolerance to be reached
3480                 theNbIter a number of iteration of approximation algorithm
3481                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3482                 isApprox if True, BSpline curves are generated in the process
3483                          of surface construction. By default it is False, that means
3484                          the surface is created using given curves. The usage of
3485                          Approximation makes the algorithm work slower, but allows
3486                          building the surface for rather complex cases
3487                 theName Object name; when specified, this parameter is used
3488                         for result publication in the study. Otherwise, if automatic
3489                         publication is switched on, default value is used for result name.
3490
3491             Returns: 
3492                 New GEOM.GEOM_Object, containing the created filling surface.
3493
3494             Example of usage:
3495                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3496             """
3497             # Example: see GEOM_TestAll.py
3498             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3499             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3500                                             theTol2D, theTol3D, theNbIter,
3501                                             theMethod, isApprox)
3502             RaiseIfFailed("MakeFilling", self.PrimOp)
3503             anObj.SetParameters(Parameters)
3504             self._autoPublish(anObj, theName, "filling")
3505             return anObj
3506
3507
3508         ## Create a filling from the given compound of contours.
3509         #  This method corresponds to MakeFilling with isApprox=True
3510         #  @param theShape the compound of contours
3511         #  @param theMinDeg a minimal degree of BSpline surface to create
3512         #  @param theMaxDeg a maximal degree of BSpline surface to create
3513         #  @param theTol3D a 3d tolerance to be reached
3514         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3519         #
3520         #  @ref tui_creation_filling "Example"
3521         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3522             """
3523             Create a filling from the given compound of contours.
3524             This method corresponds to MakeFilling with isApprox=True
3525
3526             Parameters:
3527                 theShape the compound of contours
3528                 theMinDeg a minimal degree of BSpline surface to create
3529                 theMaxDeg a maximal degree of BSpline surface to create
3530                 theTol3D a 3d tolerance to be reached
3531                 theName Object name; when specified, this parameter is used
3532                         for result publication in the study. Otherwise, if automatic
3533                         publication is switched on, default value is used for result name.
3534
3535             Returns: 
3536                 New GEOM.GEOM_Object, containing the created filling surface.
3537
3538             Example of usage:
3539                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3540             """
3541             # Example: see GEOM_TestAll.py
3542             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3543             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3544                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3545             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3546             anObj.SetParameters(Parameters)
3547             self._autoPublish(anObj, theName, "filling")
3548             return anObj
3549
3550         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3551         #  @param theSeqSections - set of specified sections.
3552         #  @param theModeSolid - mode defining building solid or shell
3553         #  @param thePreci - precision 3D used for smoothing
3554         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3555         #  @param theName Object name; when specified, this parameter is used
3556         #         for result publication in the study. Otherwise, if automatic
3557         #         publication is switched on, default value is used for result name.
3558         #
3559         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3560         #
3561         #  @ref swig_todo "Example"
3562         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3563             """
3564             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3565
3566             Parameters:
3567                 theSeqSections - set of specified sections.
3568                 theModeSolid - mode defining building solid or shell
3569                 thePreci - precision 3D used for smoothing
3570                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3571                 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             Returns:
3576                 New GEOM.GEOM_Object, containing the created shell or solid.
3577             """
3578             # Example: see GEOM_TestAll.py
3579             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3580             RaiseIfFailed("MakeThruSections", self.PrimOp)
3581             self._autoPublish(anObj, theName, "filling")
3582             return anObj
3583
3584         ## Create a shape by extrusion of the base shape along
3585         #  the path shape. The path shape can be a wire or an edge.
3586         #  @param theBase Base shape to be extruded.
3587         #  @param thePath Path shape to extrude the base shape along it.
3588         #  @param theName Object name; when specified, this parameter is used
3589         #         for result publication in the study. Otherwise, if automatic
3590         #         publication is switched on, default value is used for result name.
3591         #
3592         #  @return New GEOM.GEOM_Object, containing the created pipe.
3593         #
3594         #  @ref tui_creation_pipe "Example"
3595         def MakePipe(self, theBase, thePath, theName=None):
3596             """
3597             Create a shape by extrusion of the base shape along
3598             the path shape. The path shape can be a wire or an edge.
3599
3600             Parameters:
3601                 theBase Base shape to be extruded.
3602                 thePath Path shape to extrude the base shape along it.
3603                 theName Object name; when specified, this parameter is used
3604                         for result publication in the study. Otherwise, if automatic
3605                         publication is switched on, default value is used for result name.
3606
3607             Returns:
3608                 New GEOM.GEOM_Object, containing the created pipe.
3609             """
3610             # Example: see GEOM_TestAll.py
3611             anObj = self.PrimOp.MakePipe(theBase, thePath)
3612             RaiseIfFailed("MakePipe", self.PrimOp)
3613             self._autoPublish(anObj, theName, "pipe")
3614             return anObj
3615
3616         ## Create a shape by extrusion of the profile shape along
3617         #  the path shape. The path shape can be a wire or an edge.
3618         #  the several profiles can be specified in the several locations of path.
3619         #  @param theSeqBases - list of  Bases shape to be extruded.
3620         #  @param theLocations - list of locations on the path corresponding
3621         #                        specified list of the Bases shapes. Number of locations
3622         #                        should be equal to number of bases or list of locations can be empty.
3623         #  @param thePath - Path shape to extrude the base shape along it.
3624         #  @param theWithContact - the mode defining that the section is translated to be in
3625         #                          contact with the spine.
3626         #  @param theWithCorrection - defining that the section is rotated to be
3627         #                             orthogonal to the spine tangent in the correspondent point
3628         #  @param theName Object name; when specified, this parameter is used
3629         #         for result publication in the study. Otherwise, if automatic
3630         #         publication is switched on, default value is used for result name.
3631         #
3632         #  @return New GEOM.GEOM_Object, containing the created pipe.
3633         #
3634         #  @ref tui_creation_pipe_with_diff_sec "Example"
3635         def MakePipeWithDifferentSections(self, theSeqBases,
3636                                           theLocations, thePath,
3637                                           theWithContact, theWithCorrection, theName=None):
3638             """
3639             Create a shape by extrusion of the profile shape along
3640             the path shape. The path shape can be a wire or an edge.
3641             the several profiles can be specified in the several locations of path.
3642
3643             Parameters:
3644                 theSeqBases - list of  Bases shape to be extruded.
3645                 theLocations - list of locations on the path corresponding
3646                                specified list of the Bases shapes. Number of locations
3647                                should be equal to number of bases or list of locations can be empty.
3648                 thePath - Path shape to extrude the base shape along it.
3649                 theWithContact - the mode defining that the section is translated to be in
3650                                  contact with the spine(0/1)
3651                 theWithCorrection - defining that the section is rotated to be
3652                                     orthogonal to the spine tangent in the correspondent point (0/1)
3653                 theName Object name; when specified, this parameter is used
3654                         for result publication in the study. Otherwise, if automatic
3655                         publication is switched on, default value is used for result name.
3656
3657             Returns:
3658                 New GEOM.GEOM_Object, containing the created pipe.
3659             """
3660             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3661                                                               theLocations, thePath,
3662                                                               theWithContact, theWithCorrection)
3663             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3664             self._autoPublish(anObj, theName, "pipe")
3665             return anObj
3666
3667         ## Create a shape by extrusion of the profile shape along
3668         #  the path shape. The path shape can be a wire or a edge.
3669         #  the several profiles can be specified in the several locations of path.
3670         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3671         #                       shell or face. If number of faces in neighbour sections
3672         #                       aren't coincided result solid between such sections will
3673         #                       be created using external boundaries of this shells.
3674         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3675         #                          This list is used for searching correspondences between
3676         #                          faces in the sections. Size of this list must be equal
3677         #                          to size of list of base shapes.
3678         #  @param theLocations - list of locations on the path corresponding
3679         #                        specified list of the Bases shapes. Number of locations
3680         #                        should be equal to number of bases. First and last
3681         #                        locations must be coincided with first and last vertexes
3682         #                        of path correspondingly.
3683         #  @param thePath - Path shape to extrude the base shape along it.
3684         #  @param theWithContact - the mode defining that the section is translated to be in
3685         #                          contact with the spine.
3686         #  @param theWithCorrection - defining that the section is rotated to be
3687         #                             orthogonal to the spine tangent in the correspondent point
3688         #  @param theName Object name; when specified, this parameter is used
3689         #         for result publication in the study. Otherwise, if automatic
3690         #         publication is switched on, default value is used for result name.
3691         #
3692         #  @return New GEOM.GEOM_Object, containing the created solids.
3693         #
3694         #  @ref tui_creation_pipe_with_shell_sec "Example"
3695         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3696                                       theLocations, thePath,
3697                                       theWithContact, theWithCorrection, theName=None):
3698             """
3699             Create a shape by extrusion of the profile shape along
3700             the path shape. The path shape can be a wire or a edge.
3701             the several profiles can be specified in the several locations of path.
3702
3703             Parameters:
3704                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3705                               shell or face. If number of faces in neighbour sections
3706                               aren't coincided result solid between such sections will
3707                               be created using external boundaries of this shells.
3708                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3709                                  This list is used for searching correspondences between
3710                                  faces in the sections. Size of this list must be equal
3711                                  to size of list of base shapes.
3712                 theLocations - list of locations on the path corresponding
3713                                specified list of the Bases shapes. Number of locations
3714                                should be equal to number of bases. First and last
3715                                locations must be coincided with first and last vertexes
3716                                of path correspondingly.
3717                 thePath - Path shape to extrude the base shape along it.
3718                 theWithContact - the mode defining that the section is translated to be in
3719                                  contact with the spine (0/1)
3720                 theWithCorrection - defining that the section is rotated to be
3721                                     orthogonal to the spine tangent in the correspondent point (0/1)
3722                 theName Object name; when specified, this parameter is used
3723                         for result publication in the study. Otherwise, if automatic
3724                         publication is switched on, default value is used for result name.
3725
3726             Returns:                           
3727                 New GEOM.GEOM_Object, containing the created solids.
3728             """
3729             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
3730                                                           theLocations, thePath,
3731                                                           theWithContact, theWithCorrection)
3732             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3733             self._autoPublish(anObj, theName, "pipe")
3734             return anObj
3735
3736         ## Create a shape by extrusion of the profile shape along
3737         #  the path shape. This function is used only for debug pipe
3738         #  functionality - it is a version of function MakePipeWithShellSections()
3739         #  which give a possibility to recieve information about
3740         #  creating pipe between each pair of sections step by step.
3741         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
3742                                              theLocations, thePath,
3743                                              theWithContact, theWithCorrection, theName=None):
3744             """
3745             Create a shape by extrusion of the profile shape along
3746             the path shape. This function is used only for debug pipe
3747             functionality - it is a version of previous function
3748             geompy.MakePipeWithShellSections() which give a possibility to
3749             recieve information about creating pipe between each pair of
3750             sections step by step.
3751             """
3752             res = []
3753             nbsect = len(theSeqBases)
3754             nbsubsect = len(theSeqSubBases)
3755             #print "nbsect = ",nbsect
3756             for i in range(1,nbsect):
3757                 #print "  i = ",i
3758                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
3759                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
3760                 tmpSeqSubBases = []
3761                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
3762                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
3763                                                               tmpLocations, thePath,
3764                                                               theWithContact, theWithCorrection)
3765                 if self.PrimOp.IsDone() == 0:
3766                     print "Problems with pipe creation between ",i," and ",i+1," sections"
3767                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3768                     break
3769                 else:
3770                     print "Pipe between ",i," and ",i+1," sections is OK"
3771                     res.append(anObj)
3772                     pass
3773                 pass
3774
3775             resc = self.MakeCompound(res)
3776             #resc = self.MakeSewing(res, 0.001)
3777             #print "resc: ",resc
3778             self._autoPublish(resc, theName, "pipe")
3779             return resc
3780
3781         ## Create solids between given sections
3782         #  @param theSeqBases - list of sections (shell or face).
3783         #  @param theLocations - list of corresponding vertexes
3784         #  @param theName Object name; when specified, this parameter is used
3785         #         for result publication in the study. Otherwise, if automatic
3786         #         publication is switched on, default value is used for result name.
3787         #
3788         #  @return New GEOM.GEOM_Object, containing the created solids.
3789         #
3790         #  @ref tui_creation_pipe_without_path "Example"
3791         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
3792             """
3793             Create solids between given sections
3794
3795             Parameters:
3796                 theSeqBases - list of sections (shell or face).
3797                 theLocations - list of corresponding vertexes
3798                 theName Object name; when specified, this parameter is used
3799                         for result publication in the study. Otherwise, if automatic
3800                         publication is switched on, default value is used for result name.
3801
3802             Returns:
3803                 New GEOM.GEOM_Object, containing the created solids.
3804             """
3805             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
3806             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
3807             self._autoPublish(anObj, theName, "pipe")
3808             return anObj
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         #  @param theBase Base shape to be extruded.
3814         #  @param thePath Path shape to extrude the base shape along it.
3815         #  @param theVec Vector defines a constant binormal direction to keep the
3816         #                same angle beetween the direction and the sections
3817         #                along the sweep surface.
3818         #  @param theName Object name; when specified, this parameter is used
3819         #         for result publication in the study. Otherwise, if automatic
3820         #         publication is switched on, default value is used for result name.
3821         #
3822         #  @return New GEOM.GEOM_Object, containing the created pipe.
3823         #
3824         #  @ref tui_creation_pipe "Example"
3825         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
3826             """
3827             Create a shape by extrusion of the base shape along
3828             the path shape with constant bi-normal direction along the given vector.
3829             The path shape can be a wire or an edge.
3830
3831             Parameters:
3832                 theBase Base shape to be extruded.
3833                 thePath Path shape to extrude the base shape along it.
3834                 theVec Vector defines a constant binormal direction to keep the
3835                        same angle beetween the direction and the sections
3836                        along the sweep surface.
3837                 theName Object name; when specified, this parameter is used
3838                         for result publication in the study. Otherwise, if automatic
3839                         publication is switched on, default value is used for result name.
3840
3841             Returns:              
3842                 New GEOM.GEOM_Object, containing the created pipe.
3843             """
3844             # Example: see GEOM_TestAll.py
3845             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
3846             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
3847             self._autoPublish(anObj, theName, "pipe")
3848             return anObj
3849               
3850         ## Makes a thick solid from a face or a shell
3851         #  @param theShape Face or Shell to be thicken
3852         #  @param theThickness Thickness of the resulting solid
3853         #  @param theName Object name; when specified, this parameter is used
3854         #         for result publication in the study. Otherwise, if automatic
3855         #         publication is switched on, default value is used for result name.
3856         #
3857         #  @return New GEOM.GEOM_Object, containing the created solid
3858         #
3859         def MakeThickSolid(self, theShape, theThickness, theName=None):
3860             """
3861             Make a thick solid from a face or a shell
3862
3863             Parameters:
3864                  theShape Face or Shell to be thicken
3865                  theThickness Thickness of the resulting solid
3866                  theName Object name; when specified, this parameter is used
3867                  for result publication in the study. Otherwise, if automatic
3868                  publication is switched on, default value is used for result name.
3869                  
3870             Returns:
3871                 New GEOM.GEOM_Object, containing the created solid
3872             """
3873             # Example: see GEOM_TestAll.py
3874             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
3875             RaiseIfFailed("MakeThickening", self.PrimOp)
3876             self._autoPublish(anObj, theName, "pipe")
3877             return anObj
3878             
3879
3880         ## Modifies a face or a shell to make it a thick solid
3881         #  @param theShape Face or Shell to be thicken
3882         #  @param theThickness Thickness of the resulting solid
3883         #
3884         #  @return The modified shape
3885         #
3886         def Thicken(self, theShape, theThickness):
3887             """
3888             Modifies a face or a shell to make it a thick solid
3889
3890             Parameters:
3891                 theBase Base shape to be extruded.
3892                 thePath Path shape to extrude the base shape along it.
3893                 theName Object name; when specified, this parameter is used
3894                         for result publication in the study. Otherwise, if automatic
3895                         publication is switched on, default value is used for result name.
3896
3897             Returns:
3898                 The modified shape
3899             """
3900             # Example: see GEOM_TestAll.py
3901             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
3902             RaiseIfFailed("MakeThickening", self.PrimOp)
3903             return anObj
3904
3905         ## Build a middle path of a pipe-like shape.
3906         #  The path shape can be a wire or an edge.
3907         #  @param theShape It can be closed or unclosed pipe-like shell
3908         #                  or a pipe-like solid.
3909         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
3910         #                            should be wires or faces of theShape.
3911         #  @param theName Object name; when specified, this parameter is used
3912         #         for result publication in the study. Otherwise, if automatic
3913         #         publication is switched on, default value is used for result name.
3914         #
3915         #  @note It is not assumed that exact or approximate copy of theShape
3916         #        can be obtained by applying existing Pipe operation on the
3917         #        resulting "Path" wire taking theBase1 as the base - it is not
3918         #        always possible; though in some particular cases it might work
3919         #        it is not guaranteed. Thus, RestorePath function should not be
3920         #        considered as an exact reverse operation of the Pipe.
3921         #
3922         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3923         #                                source pipe's "path".
3924         #
3925         #  @ref tui_creation_pipe_path "Example"
3926         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
3927             """
3928             Build a middle path of a pipe-like shape.
3929             The path shape can be a wire or an edge.
3930
3931             Parameters:
3932                 theShape It can be closed or unclosed pipe-like shell
3933                          or a pipe-like solid.
3934                 theBase1, theBase2 Two bases of the supposed pipe. This
3935                                    should be wires or faces of theShape.
3936                 theName Object name; when specified, this parameter is used
3937                         for result publication in the study. Otherwise, if automatic
3938                         publication is switched on, default value is used for result name.
3939
3940             Returns:
3941                 New GEOM_Object, containing an edge or wire that represent
3942                                  source pipe's path.
3943             """
3944             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
3945             RaiseIfFailed("RestorePath", self.PrimOp)
3946             self._autoPublish(anObj, theName, "path")
3947             return anObj
3948
3949         ## Build a middle path of a pipe-like shape.
3950         #  The path shape can be a wire or an edge.
3951         #  @param theShape It can be closed or unclosed pipe-like shell
3952         #                  or a pipe-like solid.
3953         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
3954         #                                should be lists of edges of theShape.
3955         #  @param theName Object name; when specified, this parameter is used
3956         #         for result publication in the study. Otherwise, if automatic
3957         #         publication is switched on, default value is used for result name.
3958         #
3959         #  @note It is not assumed that exact or approximate copy of theShape
3960         #        can be obtained by applying existing Pipe operation on the
3961         #        resulting "Path" wire taking theBase1 as the base - it is not
3962         #        always possible; though in some particular cases it might work
3963         #        it is not guaranteed. Thus, RestorePath function should not be
3964         #        considered as an exact reverse operation of the Pipe.
3965         #
3966         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3967         #                                source pipe's "path".
3968         #
3969         #  @ref tui_creation_pipe_path "Example"
3970         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
3971             """
3972             Build a middle path of a pipe-like shape.
3973             The path shape can be a wire or an edge.
3974
3975             Parameters:
3976                 theShape It can be closed or unclosed pipe-like shell
3977                          or a pipe-like solid.
3978                 listEdges1, listEdges2 Two bases of the supposed pipe. This
3979                                        should be lists of edges of theShape.
3980                 theName Object name; when specified, this parameter is used
3981                         for result publication in the study. Otherwise, if automatic
3982                         publication is switched on, default value is used for result name.
3983
3984             Returns:
3985                 New GEOM_Object, containing an edge or wire that represent
3986                                  source pipe's path.
3987             """
3988             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
3989             RaiseIfFailed("RestorePath", self.PrimOp)
3990             self._autoPublish(anObj, theName, "path")
3991             return anObj
3992
3993         # end of l3_complex
3994         ## @}
3995
3996         ## @addtogroup l3_advanced
3997         ## @{
3998
3999         ## Create a linear edge with specified ends.
4000         #  @param thePnt1 Point for the first end of edge.
4001         #  @param thePnt2 Point for the second end of edge.
4002         #  @param theName Object name; when specified, this parameter is used
4003         #         for result publication in the study. Otherwise, if automatic
4004         #         publication is switched on, default value is used for result name.
4005         #
4006         #  @return New GEOM.GEOM_Object, containing the created edge.
4007         #
4008         #  @ref tui_creation_edge "Example"
4009         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4010             """
4011             Create a linear edge with specified ends.
4012
4013             Parameters:
4014                 thePnt1 Point for the first end of edge.
4015                 thePnt2 Point for the second end of edge.
4016                 theName Object name; when specified, this parameter is used
4017                         for result publication in the study. Otherwise, if automatic
4018                         publication is switched on, default value is used for result name.
4019
4020             Returns:           
4021                 New GEOM.GEOM_Object, containing the created edge.
4022             """
4023             # Example: see GEOM_TestAll.py
4024             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4025             RaiseIfFailed("MakeEdge", self.ShapesOp)
4026             self._autoPublish(anObj, theName, "edge")
4027             return anObj
4028
4029         ## Create a new edge, corresponding to the given length on the given curve.
4030         #  @param theRefCurve The referenced curve (edge).
4031         #  @param theLength Length on the referenced curve. It can be negative.
4032         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4033         #                       at the end of \a theRefCurve, close to the selected point.
4034         #                       If None, start from the first point of \a theRefCurve.
4035         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created edge.
4040         #
4041         #  @ref tui_creation_edge "Example"
4042         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4043             """
4044             Create a new edge, corresponding to the given length on the given curve.
4045
4046             Parameters:
4047                 theRefCurve The referenced curve (edge).
4048                 theLength Length on the referenced curve. It can be negative.
4049                 theStartPoint Any point can be selected for it, the new edge will begin
4050                               at the end of theRefCurve, close to the selected point.
4051                               If None, start from the first point of theRefCurve.
4052                 theName Object name; when specified, this parameter is used
4053                         for result publication in the study. Otherwise, if automatic
4054                         publication is switched on, default value is used for result name.
4055
4056             Returns:              
4057                 New GEOM.GEOM_Object, containing the created edge.
4058             """
4059             # Example: see GEOM_TestAll.py
4060             theLength, Parameters = ParseParameters(theLength)
4061             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4062             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4063             anObj.SetParameters(Parameters)
4064             self._autoPublish(anObj, theName, "edge")
4065             return anObj
4066
4067         ## Create an edge from specified wire.
4068         #  @param theWire source Wire
4069         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4070         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4071         #  @param theName Object name; when specified, this parameter is used
4072         #         for result publication in the study. Otherwise, if automatic
4073         #         publication is switched on, default value is used for result name.
4074         #
4075         #  @return New GEOM.GEOM_Object, containing the created edge.
4076         #
4077         #  @ref tui_creation_edge "Example"
4078         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4079             """
4080             Create an edge from specified wire.
4081
4082             Parameters:
4083                 theWire source Wire
4084                 theLinearTolerance linear tolerance value (default = 1e-07)
4085                 theAngularTolerance angular tolerance value (default = 1e-12)
4086                 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             Returns:
4091                 New GEOM.GEOM_Object, containing the created edge.
4092             """
4093             # Example: see GEOM_TestAll.py
4094             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4095             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4096             self._autoPublish(anObj, theName, "edge")
4097             return anObj
4098
4099         ## Create a wire from the set of edges and wires.
4100         #  @param theEdgesAndWires List of edges and/or wires.
4101         #  @param theTolerance Maximum distance between vertices, that will be merged.
4102         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4103         #  @param theName Object name; when specified, this parameter is used
4104         #         for result publication in the study. Otherwise, if automatic
4105         #         publication is switched on, default value is used for result name.
4106         #
4107         #  @return New GEOM.GEOM_Object, containing the created wire.
4108         #
4109         #  @ref tui_creation_wire "Example"
4110         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4111             """
4112             Create a wire from the set of edges and wires.
4113
4114             Parameters:
4115                 theEdgesAndWires List of edges and/or wires.
4116                 theTolerance Maximum distance between vertices, that will be merged.
4117                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4118                 theName Object name; when specified, this parameter is used
4119                         for result publication in the study. Otherwise, if automatic
4120                         publication is switched on, default value is used for result name.
4121
4122             Returns:                    
4123                 New GEOM.GEOM_Object, containing the created wire.
4124             """
4125             # Example: see GEOM_TestAll.py
4126             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4127             RaiseIfFailed("MakeWire", self.ShapesOp)
4128             self._autoPublish(anObj, theName, "wire")
4129             return anObj
4130
4131         ## Create a face on the given wire.
4132         #  @param theWire closed Wire or Edge to build the face on.
4133         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4134         #                        If the tolerance of the obtained planar face is less
4135         #                        than 1e-06, this face will be returned, otherwise the
4136         #                        algorithm tries to build any suitable face on the given
4137         #                        wire and prints a warning message.
4138         #  @param theName Object name; when specified, this parameter is used
4139         #         for result publication in the study. Otherwise, if automatic
4140         #         publication is switched on, default value is used for result name.
4141         #
4142         #  @return New GEOM.GEOM_Object, containing the created face.
4143         #
4144         #  @ref tui_creation_face "Example"
4145         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4146             """
4147             Create a face on the given wire.
4148
4149             Parameters:
4150                 theWire closed Wire or Edge to build the face on.
4151                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4152                                If the tolerance of the obtained planar face is less
4153                                than 1e-06, this face will be returned, otherwise the
4154                                algorithm tries to build any suitable face on the given
4155                                wire and prints a warning message.
4156                 theName Object name; when specified, this parameter is used
4157                         for result publication in the study. Otherwise, if automatic
4158                         publication is switched on, default value is used for result name.
4159
4160             Returns:
4161                 New GEOM.GEOM_Object, containing the created face.
4162             """
4163             # Example: see GEOM_TestAll.py
4164             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4165             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4166                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4167             else:
4168                 RaiseIfFailed("MakeFace", self.ShapesOp)
4169             self._autoPublish(anObj, theName, "face")
4170             return anObj
4171
4172         ## Create a face on the given wires set.
4173         #  @param theWires List of closed wires or edges to build the face on.
4174         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4175         #                        If the tolerance of the obtained planar face is less
4176         #                        than 1e-06, this face will be returned, otherwise the
4177         #                        algorithm tries to build any suitable face on the given
4178         #                        wire and prints a warning message.
4179         #  @param theName Object name; when specified, this parameter is used
4180         #         for result publication in the study. Otherwise, if automatic
4181         #         publication is switched on, default value is used for result name.
4182         #
4183         #  @return New GEOM.GEOM_Object, containing the created face.
4184         #
4185         #  @ref tui_creation_face "Example"
4186         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4187             """
4188             Create a face on the given wires set.
4189
4190             Parameters:
4191                 theWires List of closed wires or edges to build the face on.
4192                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4193                                If the tolerance of the obtained planar face is less
4194                                than 1e-06, this face will be returned, otherwise the
4195                                algorithm tries to build any suitable face on the given
4196                                wire and prints a warning message.
4197                 theName Object name; when specified, this parameter is used
4198                         for result publication in the study. Otherwise, if automatic
4199                         publication is switched on, default value is used for result name.
4200
4201             Returns: 
4202                 New GEOM.GEOM_Object, containing the created face.
4203             """
4204             # Example: see GEOM_TestAll.py
4205             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4206             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4207                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4208             else:
4209                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4210             self._autoPublish(anObj, theName, "face")
4211             return anObj
4212
4213         ## See MakeFaceWires() method for details.
4214         #
4215         #  @ref tui_creation_face "Example 1"
4216         #  \n @ref swig_MakeFaces  "Example 2"
4217         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4218             """
4219             See geompy.MakeFaceWires() method for details.
4220             """
4221             # Example: see GEOM_TestOthers.py
4222             # note: auto-publishing is done in self.MakeFaceWires()
4223             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4224             return anObj
4225
4226         ## Create a shell from the set of faces and shells.
4227         #  @param theFacesAndShells List of faces and/or shells.
4228         #  @param theName Object name; when specified, this parameter is used
4229         #         for result publication in the study. Otherwise, if automatic
4230         #         publication is switched on, default value is used for result name.
4231         #
4232         #  @return New GEOM.GEOM_Object, containing the created shell.
4233         #
4234         #  @ref tui_creation_shell "Example"
4235         def MakeShell(self, theFacesAndShells, theName=None):
4236             """
4237             Create a shell from the set of faces and shells.
4238
4239             Parameters:
4240                 theFacesAndShells List of faces and/or shells.
4241                 theName Object name; when specified, this parameter is used
4242                         for result publication in the study. Otherwise, if automatic
4243                         publication is switched on, default value is used for result name.
4244
4245             Returns:
4246                 New GEOM.GEOM_Object, containing the created shell.
4247             """
4248             # Example: see GEOM_TestAll.py
4249             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4250             RaiseIfFailed("MakeShell", self.ShapesOp)
4251             self._autoPublish(anObj, theName, "shell")
4252             return anObj
4253
4254         ## Create a solid, bounded by the given shells.
4255         #  @param theShells Sequence of bounding shells.
4256         #  @param theName Object name; when specified, this parameter is used
4257         #         for result publication in the study. Otherwise, if automatic
4258         #         publication is switched on, default value is used for result name.
4259         #
4260         #  @return New GEOM.GEOM_Object, containing the created solid.
4261         #
4262         #  @ref tui_creation_solid "Example"
4263         def MakeSolid(self, theShells, theName=None):
4264             """
4265             Create a solid, bounded by the given shells.
4266
4267             Parameters:
4268                 theShells Sequence of bounding shells.
4269                 theName Object name; when specified, this parameter is used
4270                         for result publication in the study. Otherwise, if automatic
4271                         publication is switched on, default value is used for result name.
4272
4273             Returns:
4274                 New GEOM.GEOM_Object, containing the created solid.
4275             """
4276             # Example: see GEOM_TestAll.py
4277             if len(theShells) == 1:
4278                 descr = self.MeasuOp.IsGoodForSolid(theShells[0])
4279                 #if len(descr) > 0:
4280                 #    raise RuntimeError, "MakeSolidShells : " + descr
4281                 if descr == "WRN_SHAPE_UNCLOSED":
4282                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4283             anObj = self.ShapesOp.MakeSolidShells(theShells)
4284             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4285             self._autoPublish(anObj, theName, "solid")
4286             return anObj
4287
4288         ## Create a compound of the given shapes.
4289         #  @param theShapes List of shapes to put in compound.
4290         #  @param theName Object name; when specified, this parameter is used
4291         #         for result publication in the study. Otherwise, if automatic
4292         #         publication is switched on, default value is used for result name.
4293         #
4294         #  @return New GEOM.GEOM_Object, containing the created compound.
4295         #
4296         #  @ref tui_creation_compound "Example"
4297         def MakeCompound(self, theShapes, theName=None):
4298             """
4299             Create a compound of the given shapes.
4300
4301             Parameters:
4302                 theShapes List of shapes to put in compound.
4303                 theName Object name; when specified, this parameter is used
4304                         for result publication in the study. Otherwise, if automatic
4305                         publication is switched on, default value is used for result name.
4306
4307             Returns:
4308                 New GEOM.GEOM_Object, containing the created compound.
4309             """
4310             # Example: see GEOM_TestAll.py
4311             anObj = self.ShapesOp.MakeCompound(theShapes)
4312             RaiseIfFailed("MakeCompound", self.ShapesOp)
4313             self._autoPublish(anObj, theName, "compound")
4314             return anObj
4315
4316         # end of l3_advanced
4317         ## @}
4318
4319         ## @addtogroup l2_measure
4320         ## @{
4321
4322         ## Gives quantity of faces in the given shape.
4323         #  @param theShape Shape to count faces of.
4324         #  @return Quantity of faces.
4325         #
4326         #  @ref swig_NumberOf "Example"
4327         def NumberOfFaces(self, theShape):
4328             """
4329             Gives quantity of faces in the given shape.
4330
4331             Parameters:
4332                 theShape Shape to count faces of.
4333
4334             Returns:    
4335                 Quantity of faces.
4336             """
4337             # Example: see GEOM_TestOthers.py
4338             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4339             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4340             return nb_faces
4341
4342         ## Gives quantity of edges in the given shape.
4343         #  @param theShape Shape to count edges of.
4344         #  @return Quantity of edges.
4345         #
4346         #  @ref swig_NumberOf "Example"
4347         def NumberOfEdges(self, theShape):
4348             """
4349             Gives quantity of edges in the given shape.
4350
4351             Parameters:
4352                 theShape Shape to count edges of.
4353
4354             Returns:    
4355                 Quantity of edges.
4356             """
4357             # Example: see GEOM_TestOthers.py
4358             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4359             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4360             return nb_edges
4361
4362         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4363         #  @param theShape Shape to count sub-shapes of.
4364         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4365         #  @return Quantity of sub-shapes of given type.
4366         #
4367         #  @ref swig_NumberOf "Example"
4368         def NumberOfSubShapes(self, theShape, theShapeType):
4369             """
4370             Gives quantity of sub-shapes of type theShapeType in the given shape.
4371
4372             Parameters:
4373                 theShape Shape to count sub-shapes of.
4374                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4375
4376             Returns:
4377                 Quantity of sub-shapes of given type.
4378             """
4379             # Example: see GEOM_TestOthers.py
4380             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4381             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4382             return nb_ss
4383
4384         ## Gives quantity of solids in the given shape.
4385         #  @param theShape Shape to count solids in.
4386         #  @return Quantity of solids.
4387         #
4388         #  @ref swig_NumberOf "Example"
4389         def NumberOfSolids(self, theShape):
4390             """
4391             Gives quantity of solids in the given shape.
4392
4393             Parameters:
4394                 theShape Shape to count solids in.
4395
4396             Returns:
4397                 Quantity of solids.
4398             """
4399             # Example: see GEOM_TestOthers.py
4400             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4401             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4402             return nb_solids
4403
4404         # end of l2_measure
4405         ## @}
4406
4407         ## @addtogroup l3_healing
4408         ## @{
4409
4410         ## Reverses an orientation the given shape.
4411         #  @param theShape Shape to be reversed.
4412         #  @param theName Object name; when specified, this parameter is used
4413         #         for result publication in the study. Otherwise, if automatic
4414         #         publication is switched on, default value is used for result name.
4415         #
4416         #  @return The reversed copy of theShape.
4417         #
4418         #  @ref swig_ChangeOrientation "Example"
4419         def ChangeOrientation(self, theShape, theName=None):
4420             """
4421             Reverses an orientation the given shape.
4422
4423             Parameters:
4424                 theShape Shape to be reversed.
4425                 theName Object name; when specified, this parameter is used
4426                         for result publication in the study. Otherwise, if automatic
4427                         publication is switched on, default value is used for result name.
4428
4429             Returns:   
4430                 The reversed copy of theShape.
4431             """
4432             # Example: see GEOM_TestAll.py
4433             anObj = self.ShapesOp.ChangeOrientation(theShape)
4434             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4435             self._autoPublish(anObj, theName, "reversed")
4436             return anObj
4437
4438         ## See ChangeOrientation() method for details.
4439         #
4440         #  @ref swig_OrientationChange "Example"
4441         def OrientationChange(self, theShape, theName=None):
4442             """
4443             See geompy.ChangeOrientation method for details.
4444             """
4445             # Example: see GEOM_TestOthers.py
4446             # note: auto-publishing is done in self.ChangeOrientation()
4447             anObj = self.ChangeOrientation(theShape, theName)
4448             return anObj
4449
4450         # end of l3_healing
4451         ## @}
4452
4453         ## @addtogroup l4_obtain
4454         ## @{
4455
4456         ## Retrieve all free faces from the given shape.
4457         #  Free face is a face, which is not shared between two shells of the shape.
4458         #  @param theShape Shape to find free faces in.
4459         #  @return List of IDs of all free faces, contained in theShape.
4460         #
4461         #  @ref tui_measurement_tools_page "Example"
4462         def GetFreeFacesIDs(self,theShape):
4463             """
4464             Retrieve all free faces from the given shape.
4465             Free face is a face, which is not shared between two shells of the shape.
4466
4467             Parameters:
4468                 theShape Shape to find free faces in.
4469
4470             Returns:
4471                 List of IDs of all free faces, contained in theShape.
4472             """
4473             # Example: see GEOM_TestOthers.py
4474             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4475             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4476             return anIDs
4477
4478         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4479         #  @param theShape1 Shape to find sub-shapes in.
4480         #  @param theShape2 Shape to find shared sub-shapes with.
4481         #  @param theShapeType Type of sub-shapes to be retrieved.
4482         #  @param theName Object name; when specified, this parameter is used
4483         #         for result publication in the study. Otherwise, if automatic
4484         #         publication is switched on, default value is used for result name.
4485         #
4486         #  @return List of sub-shapes of theShape1, shared with theShape2.
4487         #
4488         #  @ref swig_GetSharedShapes "Example"
4489         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4490             """
4491             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4492
4493             Parameters:
4494                 theShape1 Shape to find sub-shapes in.
4495                 theShape2 Shape to find shared sub-shapes with.
4496                 theShapeType Type of sub-shapes to be retrieved.
4497                 theName Object name; when specified, this parameter is used
4498                         for result publication in the study. Otherwise, if automatic
4499                         publication is switched on, default value is used for result name.
4500
4501             Returns:
4502                 List of sub-shapes of theShape1, shared with theShape2.
4503             """
4504             # Example: see GEOM_TestOthers.py
4505             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4506             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4507             self._autoPublish(aList, theName, "shared")
4508             return aList
4509
4510         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4511         #  @param theShapes Shapes to find common sub-shapes of.
4512         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4513         #  @param theName Object name; when specified, this parameter is used
4514         #         for result publication in the study. Otherwise, if automatic
4515         #         publication is switched on, default value is used for result name.
4516         #
4517         #  @return List of objects, that are sub-shapes of all given shapes.
4518         #
4519         #  @ref swig_GetSharedShapes "Example"
4520         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4521             """
4522             Get all sub-shapes, shared by all shapes in the list theShapes.
4523
4524             Parameters:
4525                 theShapes Shapes to find common sub-shapes of.
4526                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4527                 theName Object name; when specified, this parameter is used
4528                         for result publication in the study. Otherwise, if automatic
4529                         publication is switched on, default value is used for result name.
4530
4531             Returns:    
4532                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4533             """
4534             # Example: see GEOM_TestOthers.py
4535             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4536             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4537             self._autoPublish(aList, theName, "shared")
4538             return aList
4539
4540         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4541         #  situated relatively the specified plane by the certain way,
4542         #  defined through <VAR>theState</VAR> parameter.
4543         #  @param theShape Shape to find sub-shapes of.
4544         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4545         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4546         #                direction and location of the plane to find shapes on.
4547         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4548         #  @param theName Object name; when specified, this parameter is used
4549         #         for result publication in the study. Otherwise, if automatic
4550         #         publication is switched on, default value is used for result name.
4551         #
4552         #  @return List of all found sub-shapes.
4553         #
4554         #  @ref swig_GetShapesOnPlane "Example"
4555         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4556             """
4557             Find in theShape all sub-shapes of type theShapeType,
4558             situated relatively the specified plane by the certain way,
4559             defined through theState parameter.
4560
4561             Parameters:
4562                 theShape Shape to find sub-shapes of.
4563                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4564                 theAx1 Vector (or line, or linear edge), specifying normal
4565                        direction and location of the plane to find shapes on.
4566                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4567                 theName Object name; when specified, this parameter is used
4568                         for result publication in the study. Otherwise, if automatic
4569                         publication is switched on, default value is used for result name.
4570
4571             Returns:
4572                 List of all found sub-shapes.
4573             """
4574             # Example: see GEOM_TestOthers.py
4575             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4576             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4577             self._autoPublish(aList, theName, "shapeOnPlane")
4578             return aList
4579
4580         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4581         #  situated relatively the specified plane by the certain way,
4582         #  defined through <VAR>theState</VAR> parameter.
4583         #  @param theShape Shape to find sub-shapes of.
4584         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4585         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4586         #                direction and location of the plane to find shapes on.
4587         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4588         #
4589         #  @return List of all found sub-shapes indices.
4590         #
4591         #  @ref swig_GetShapesOnPlaneIDs "Example"
4592         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4593             """
4594             Find in theShape all sub-shapes of type theShapeType,
4595             situated relatively the specified plane by the certain way,
4596             defined through theState parameter.
4597
4598             Parameters:
4599                 theShape Shape to find sub-shapes of.
4600                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4601                 theAx1 Vector (or line, or linear edge), specifying normal
4602                        direction and location of the plane to find shapes on.
4603                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4604
4605             Returns:
4606                 List of all found sub-shapes indices.
4607             """
4608             # Example: see GEOM_TestOthers.py
4609             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4610             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4611             return aList
4612
4613         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4614         #  situated relatively the specified plane by the certain way,
4615         #  defined through <VAR>theState</VAR> parameter.
4616         #  @param theShape Shape to find sub-shapes of.
4617         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4618         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4619         #                direction of the plane to find shapes on.
4620         #  @param thePnt Point specifying location of the plane to find shapes on.
4621         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4622         #  @param theName Object name; when specified, this parameter is used
4623         #         for result publication in the study. Otherwise, if automatic
4624         #         publication is switched on, default value is used for result name.
4625         #
4626         #  @return List of all found sub-shapes.
4627         #
4628         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4629         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4630             """
4631             Find in theShape all sub-shapes of type theShapeType,
4632             situated relatively the specified plane by the certain way,
4633             defined through theState parameter.
4634
4635             Parameters:
4636                 theShape Shape to find sub-shapes of.
4637                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4638                 theAx1 Vector (or line, or linear edge), specifying normal
4639                        direction and location of the plane to find shapes on.
4640                 thePnt Point specifying location of the plane to find shapes on.
4641                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4642                 theName Object name; when specified, this parameter is used
4643                         for result publication in the study. Otherwise, if automatic
4644                         publication is switched on, default value is used for result name.
4645
4646             Returns:
4647                 List of all found sub-shapes.
4648             """
4649             # Example: see GEOM_TestOthers.py
4650             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4651                                                                theAx1, thePnt, theState)
4652             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4653             self._autoPublish(aList, theName, "shapeOnPlane")
4654             return aList
4655
4656         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4657         #  situated relatively the specified plane by the certain way,
4658         #  defined through <VAR>theState</VAR> parameter.
4659         #  @param theShape Shape to find sub-shapes of.
4660         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4661         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4662         #                direction of the plane to find shapes on.
4663         #  @param thePnt Point specifying location of the plane to find shapes on.
4664         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4665         #
4666         #  @return List of all found sub-shapes indices.
4667         #
4668         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4669         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4670             """
4671             Find in theShape all sub-shapes of type theShapeType,
4672             situated relatively the specified plane by the certain way,
4673             defined through theState parameter.
4674
4675             Parameters:
4676                 theShape Shape to find sub-shapes of.
4677                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4678                 theAx1 Vector (or line, or linear edge), specifying normal
4679                        direction and location of the plane to find shapes on.
4680                 thePnt Point specifying location of the plane to find shapes on.
4681                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4682
4683             Returns:
4684                 List of all found sub-shapes indices.
4685             """
4686             # Example: see GEOM_TestOthers.py
4687             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4688                                                                   theAx1, thePnt, theState)
4689             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4690             return aList
4691
4692         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4693         #  the specified cylinder by the certain way, defined through \a theState parameter.
4694         #  @param theShape Shape to find sub-shapes of.
4695         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4696         #  @param theAxis Vector (or line, or linear edge), specifying
4697         #                 axis of the cylinder to find shapes on.
4698         #  @param theRadius Radius of the cylinder to find shapes on.
4699         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4700         #  @param theName Object name; when specified, this parameter is used
4701         #         for result publication in the study. Otherwise, if automatic
4702         #         publication is switched on, default value is used for result name.
4703         #
4704         #  @return List of all found sub-shapes.
4705         #
4706         #  @ref swig_GetShapesOnCylinder "Example"
4707         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
4708             """
4709             Find in theShape all sub-shapes of type theShapeType, situated relatively
4710             the specified cylinder by the certain way, defined through theState parameter.
4711
4712             Parameters:
4713                 theShape Shape to find sub-shapes of.
4714                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4715                 theAxis Vector (or line, or linear edge), specifying
4716                         axis of the cylinder to find shapes on.
4717                 theRadius Radius of the cylinder to find shapes on.
4718                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4719                 theName Object name; when specified, this parameter is used
4720                         for result publication in the study. Otherwise, if automatic
4721                         publication is switched on, default value is used for result name.
4722
4723             Returns:
4724                 List of all found sub-shapes.
4725             """
4726             # Example: see GEOM_TestOthers.py
4727             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
4728             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
4729             self._autoPublish(aList, theName, "shapeOnCylinder")
4730             return aList
4731
4732         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4733         #  the specified cylinder by the certain way, defined through \a theState parameter.
4734         #  @param theShape Shape to find sub-shapes of.
4735         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4736         #  @param theAxis Vector (or line, or linear edge), specifying
4737         #                 axis of the cylinder to find shapes on.
4738         #  @param theRadius Radius of the cylinder to find shapes on.
4739         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4740         #
4741         #  @return List of all found sub-shapes indices.
4742         #
4743         #  @ref swig_GetShapesOnCylinderIDs "Example"
4744         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
4745             """
4746             Find in theShape all sub-shapes of type theShapeType, situated relatively
4747             the specified cylinder by the certain way, defined through theState parameter.
4748
4749             Parameters:
4750                 theShape Shape to find sub-shapes of.
4751                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4752                 theAxis Vector (or line, or linear edge), specifying
4753                         axis of the cylinder to find shapes on.
4754                 theRadius Radius of the cylinder to find shapes on.
4755                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4756
4757             Returns:
4758                 List of all found sub-shapes indices.
4759             """
4760             # Example: see GEOM_TestOthers.py
4761             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
4762             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
4763             return aList
4764
4765         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4766         #  the specified cylinder by the certain way, defined through \a theState parameter.
4767         #  @param theShape Shape to find sub-shapes of.
4768         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4769         #  @param theAxis Vector (or line, or linear edge), specifying
4770         #                 axis of the cylinder to find shapes on.
4771         #  @param thePnt Point specifying location of the bottom of the cylinder.
4772         #  @param theRadius Radius of the cylinder to find shapes on.
4773         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4774         #  @param theName Object name; when specified, this parameter is used
4775         #         for result publication in the study. Otherwise, if automatic
4776         #         publication is switched on, default value is used for result name.
4777         #
4778         #  @return List of all found sub-shapes.
4779         #
4780         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
4781         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
4782             """
4783             Find in theShape all sub-shapes of type theShapeType, situated relatively
4784             the specified cylinder by the certain way, defined through theState parameter.
4785
4786             Parameters:
4787                 theShape Shape to find sub-shapes of.
4788                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4789                 theAxis Vector (or line, or linear edge), specifying
4790                         axis of the cylinder to find shapes on.
4791                 theRadius Radius of the cylinder to find shapes on.
4792                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4793                 theName Object name; when specified, this parameter is used
4794                         for result publication in the study. Otherwise, if automatic
4795                         publication is switched on, default value is used for result name.
4796
4797             Returns:
4798                 List of all found sub-shapes.
4799             """
4800             # Example: see GEOM_TestOthers.py
4801             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4802             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
4803             self._autoPublish(aList, theName, "shapeOnCylinder")
4804             return aList
4805
4806         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4807         #  the specified cylinder by the certain way, defined through \a theState parameter.
4808         #  @param theShape Shape to find sub-shapes of.
4809         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4810         #  @param theAxis Vector (or line, or linear edge), specifying
4811         #                 axis of the cylinder to find shapes on.
4812         #  @param thePnt Point specifying location of the bottom of the cylinder.
4813         #  @param theRadius Radius of the cylinder to find shapes on.
4814         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4815         #
4816         #  @return List of all found sub-shapes indices
4817         #
4818         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
4819         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
4820             """
4821             Find in theShape all sub-shapes of type theShapeType, situated relatively
4822             the specified cylinder by the certain way, defined through theState parameter.
4823
4824             Parameters:
4825                 theShape Shape to find sub-shapes of.
4826                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4827                 theAxis Vector (or line, or linear edge), specifying
4828                         axis of the cylinder to find shapes on.
4829                 theRadius Radius of the cylinder to find shapes on.
4830                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4831
4832             Returns:
4833                 List of all found sub-shapes indices.            
4834             """
4835             # Example: see GEOM_TestOthers.py
4836             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4837             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
4838             return aList
4839
4840         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4841         #  the specified sphere by the certain way, defined through \a theState parameter.
4842         #  @param theShape Shape to find sub-shapes of.
4843         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4844         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4845         #  @param theRadius Radius of the sphere to find shapes on.
4846         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4847         #  @param theName Object name; when specified, this parameter is used
4848         #         for result publication in the study. Otherwise, if automatic
4849         #         publication is switched on, default value is used for result name.
4850         #
4851         #  @return List of all found sub-shapes.
4852         #
4853         #  @ref swig_GetShapesOnSphere "Example"
4854         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
4855             """
4856             Find in theShape all sub-shapes of type theShapeType, situated relatively
4857             the specified sphere by the certain way, defined through theState parameter.
4858
4859             Parameters:
4860                 theShape Shape to find sub-shapes of.
4861                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4862                 theCenter Point, specifying center of the sphere to find shapes on.
4863                 theRadius Radius of the sphere to find shapes on.
4864                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4865                 theName Object name; when specified, this parameter is used
4866                         for result publication in the study. Otherwise, if automatic
4867                         publication is switched on, default value is used for result name.
4868
4869             Returns:
4870                 List of all found sub-shapes.
4871             """
4872             # Example: see GEOM_TestOthers.py
4873             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
4874             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
4875             self._autoPublish(aList, theName, "shapeOnSphere")
4876             return aList
4877
4878         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4879         #  the specified sphere by the certain way, defined through \a theState parameter.
4880         #  @param theShape Shape to find sub-shapes of.
4881         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4882         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4883         #  @param theRadius Radius of the sphere to find shapes on.
4884         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4885         #
4886         #  @return List of all found sub-shapes indices.
4887         #
4888         #  @ref swig_GetShapesOnSphereIDs "Example"
4889         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
4890             """
4891             Find in theShape all sub-shapes of type theShapeType, situated relatively
4892             the specified sphere by the certain way, defined through theState parameter.
4893
4894             Parameters:
4895                 theShape Shape to find sub-shapes of.
4896                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4897                 theCenter Point, specifying center of the sphere to find shapes on.
4898                 theRadius Radius of the sphere to find shapes on.
4899                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4900
4901             Returns:
4902                 List of all found sub-shapes indices.
4903             """
4904             # Example: see GEOM_TestOthers.py
4905             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
4906             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
4907             return aList
4908
4909         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4910         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4911         #  @param theShape Shape to find sub-shapes of.
4912         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4913         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4914         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4915         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4916         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4917         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4918         #  @param theName Object name; when specified, this parameter is used
4919         #         for result publication in the study. Otherwise, if automatic
4920         #         publication is switched on, default value is used for result name.
4921         #
4922         #  @return List of all found sub-shapes.
4923         #
4924         #  @ref swig_GetShapesOnQuadrangle "Example"
4925         def GetShapesOnQuadrangle(self, theShape, theShapeType,
4926                                   theTopLeftPoint, theTopRigthPoint,
4927                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
4928             """
4929             Find in theShape all sub-shapes of type theShapeType, situated relatively
4930             the specified quadrangle by the certain way, defined through theState parameter.
4931
4932             Parameters:
4933                 theShape Shape to find sub-shapes of.
4934                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4935                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4936                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4937                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4938                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4939                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4940                 theName Object name; when specified, this parameter is used
4941                         for result publication in the study. Otherwise, if automatic
4942                         publication is switched on, default value is used for result name.
4943
4944             Returns:
4945                 List of all found sub-shapes.
4946             """
4947             # Example: see GEOM_TestOthers.py
4948             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
4949                                                         theTopLeftPoint, theTopRigthPoint,
4950                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
4951             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
4952             self._autoPublish(aList, theName, "shapeOnQuadrangle")
4953             return aList
4954
4955         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4956         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4957         #  @param theShape Shape to find sub-shapes of.
4958         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4959         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4960         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4961         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4962         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4963         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4964         #
4965         #  @return List of all found sub-shapes indices.
4966         #
4967         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
4968         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
4969                                      theTopLeftPoint, theTopRigthPoint,
4970                                      theBottomLeftPoint, theBottomRigthPoint, theState):
4971             """
4972             Find in theShape all sub-shapes of type theShapeType, situated relatively
4973             the specified quadrangle by the certain way, defined through theState parameter.
4974
4975             Parameters:
4976                 theShape Shape to find sub-shapes of.
4977                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4978                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4979                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4980                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4981                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4982                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4983
4984             Returns:
4985                 List of all found sub-shapes indices.
4986             """
4987
4988             # Example: see GEOM_TestOthers.py
4989             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
4990                                                            theTopLeftPoint, theTopRigthPoint,
4991                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
4992             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
4993             return aList
4994
4995         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4996         #  the specified \a theBox by the certain way, defined through \a theState parameter.
4997         #  @param theBox Shape for relative comparing.
4998         #  @param theShape Shape to find sub-shapes of.
4999         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5000         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5001         #  @param 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         #  @return List of all found sub-shapes.
5006         #
5007         #  @ref swig_GetShapesOnBox "Example"
5008         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5009             """
5010             Find in theShape all sub-shapes of type theShapeType, situated relatively
5011             the specified theBox by the certain way, defined through theState parameter.
5012
5013             Parameters:
5014                 theBox Shape for relative comparing.
5015                 theShape Shape to find sub-shapes of.
5016                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5017                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5018                 theName Object name; when specified, this parameter is used
5019                         for result publication in the study. Otherwise, if automatic
5020                         publication is switched on, default value is used for result name.
5021
5022             Returns:
5023                 List of all found sub-shapes.
5024             """
5025             # Example: see GEOM_TestOthers.py
5026             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5027             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5028             self._autoPublish(aList, theName, "shapeOnBox")
5029             return aList
5030
5031         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5032         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5033         #  @param theBox Shape for relative comparing.
5034         #  @param theShape Shape to find sub-shapes of.
5035         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5036         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5037         #
5038         #  @return List of all found sub-shapes indices.
5039         #
5040         #  @ref swig_GetShapesOnBoxIDs "Example"
5041         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5042             """
5043             Find in theShape all sub-shapes of type theShapeType, situated relatively
5044             the specified theBox by the certain way, defined through theState parameter.
5045
5046             Parameters:
5047                 theBox Shape for relative comparing.
5048                 theShape Shape to find sub-shapes of.
5049                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5050                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5051
5052             Returns:
5053                 List of all found sub-shapes indices.
5054             """
5055             # Example: see GEOM_TestOthers.py
5056             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5057             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5058             return aList
5059
5060         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5061         #  situated relatively the specified \a theCheckShape by the
5062         #  certain way, defined through \a theState parameter.
5063         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5064         #  @param theShape Shape to find sub-shapes of.
5065         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
5066         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5067         #  @param theName Object name; when specified, this parameter is used
5068         #         for result publication in the study. Otherwise, if automatic
5069         #         publication is switched on, default value is used for result name.
5070         #
5071         #  @return List of all found sub-shapes.
5072         #
5073         #  @ref swig_GetShapesOnShape "Example"
5074         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5075             """
5076             Find in theShape all sub-shapes of type theShapeType,
5077             situated relatively the specified theCheckShape by the
5078             certain way, defined through theState parameter.
5079
5080             Parameters:
5081                 theCheckShape Shape for relative comparing. It must be a solid.
5082                 theShape Shape to find sub-shapes of.
5083                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5084                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5085                 theName Object name; when specified, this parameter is used
5086                         for result publication in the study. Otherwise, if automatic
5087                         publication is switched on, default value is used for result name.
5088
5089             Returns:
5090                 List of all found sub-shapes.
5091             """
5092             # Example: see GEOM_TestOthers.py
5093             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5094                                                    theShapeType, theState)
5095             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5096             self._autoPublish(aList, theName, "shapeOnShape")
5097             return aList
5098
5099         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5100         #  situated relatively the specified \a theCheckShape by the
5101         #  certain way, defined through \a theState parameter.
5102         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5103         #  @param theShape Shape to find sub-shapes of.
5104         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5105         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5106         #  @param theName Object name; when specified, this parameter is used
5107         #         for result publication in the study. Otherwise, if automatic
5108         #         publication is switched on, default value is used for result name.
5109         #
5110         #  @return All found sub-shapes as compound.
5111         #
5112         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5113         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5114             """
5115             Find in theShape all sub-shapes of type theShapeType,
5116             situated relatively the specified theCheckShape by the
5117             certain way, defined through theState parameter.
5118
5119             Parameters:
5120                 theCheckShape Shape for relative comparing. It must be a solid.
5121                 theShape Shape to find sub-shapes of.
5122                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5123                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5124                 theName Object name; when specified, this parameter is used
5125                         for result publication in the study. Otherwise, if automatic
5126                         publication is switched on, default value is used for result name.
5127
5128             Returns:
5129                 All found sub-shapes as compound.
5130             """
5131             # Example: see GEOM_TestOthers.py
5132             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5133                                                              theShapeType, theState)
5134             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5135             self._autoPublish(anObj, theName, "shapeOnShape")
5136             return anObj
5137
5138         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5139         #  situated relatively the specified \a theCheckShape by the
5140         #  certain way, defined through \a theState parameter.
5141         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5142         #  @param theShape Shape to find sub-shapes of.
5143         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5144         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5145         #
5146         #  @return List of all found sub-shapes indices.
5147         #
5148         #  @ref swig_GetShapesOnShapeIDs "Example"
5149         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5150             """
5151             Find in theShape all sub-shapes of type theShapeType,
5152             situated relatively the specified theCheckShape by the
5153             certain way, defined through theState parameter.
5154
5155             Parameters:
5156                 theCheckShape Shape for relative comparing. It must be a solid.
5157                 theShape Shape to find sub-shapes of.
5158                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5159                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5160
5161             Returns:
5162                 List of all found sub-shapes indices.
5163             """
5164             # Example: see GEOM_TestOthers.py
5165             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5166                                                       theShapeType, theState)
5167             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5168             return aList
5169
5170         ## Get sub-shape(s) of theShapeWhere, which are
5171         #  coincident with \a theShapeWhat or could be a part of it.
5172         #  @param theShapeWhere Shape to find sub-shapes of.
5173         #  @param theShapeWhat Shape, specifying what to find.
5174         #  @param isNewImplementation implementation of GetInPlace functionality
5175         #             (default = False, old alghorithm based on shape properties)
5176         #  @param theName Object name; when specified, this parameter is used
5177         #         for result publication in the study. Otherwise, if automatic
5178         #         publication is switched on, default value is used for result name.
5179         #
5180         #  @return Group of all found sub-shapes or a single found sub-shape.
5181         #
5182         #  @note This function has a restriction on argument shapes.
5183         #        If \a theShapeWhere has curved parts with significantly
5184         #        outstanding centres (i.e. the mass centre of a part is closer to
5185         #        \a theShapeWhat than to the part), such parts will not be found.
5186         #        @image html get_in_place_lost_part.png
5187         #
5188         #  @ref swig_GetInPlace "Example"
5189         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5190             """
5191             Get sub-shape(s) of theShapeWhere, which are
5192             coincident with  theShapeWhat or could be a part of it.
5193
5194             Parameters:
5195                 theShapeWhere Shape to find sub-shapes of.
5196                 theShapeWhat Shape, specifying what to find.
5197                 isNewImplementation Implementation of GetInPlace functionality
5198                                     (default = False, old alghorithm based on shape properties)
5199                 theName Object name; when specified, this parameter is used
5200                         for result publication in the study. Otherwise, if automatic
5201                         publication is switched on, default value is used for result name.
5202
5203             Returns:
5204                 Group of all found sub-shapes or a single found sub-shape.
5205
5206                 
5207             Note:
5208                 This function has a restriction on argument shapes.
5209                 If theShapeWhere has curved parts with significantly
5210                 outstanding centres (i.e. the mass centre of a part is closer to
5211                 theShapeWhat than to the part), such parts will not be found.
5212             """
5213             # Example: see GEOM_TestOthers.py
5214             anObj = None
5215             if isNewImplementation:
5216                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5217             else:
5218                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5219                 pass
5220             RaiseIfFailed("GetInPlace", self.ShapesOp)
5221             self._autoPublish(anObj, theName, "inplace")
5222             return anObj
5223
5224         ## Get sub-shape(s) of \a theShapeWhere, which are
5225         #  coincident with \a theShapeWhat or could be a part of it.
5226         #
5227         #  Implementation of this method is based on a saved history of an operation,
5228         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5229         #  arguments (an argument shape or a sub-shape of an argument shape).
5230         #  The operation could be the Partition or one of boolean operations,
5231         #  performed on simple shapes (not on compounds).
5232         #
5233         #  @param theShapeWhere Shape to find sub-shapes of.
5234         #  @param theShapeWhat Shape, specifying what to find (must be in the
5235         #                      building history of the ShapeWhere).
5236         #  @param theName Object name; when specified, this parameter is used
5237         #         for result publication in the study. Otherwise, if automatic
5238         #         publication is switched on, default value is used for result name.
5239         #
5240         #  @return Group of all found sub-shapes or a single found sub-shape.
5241         #
5242         #  @ref swig_GetInPlace "Example"
5243         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5244             """
5245             Implementation of this method is based on a saved history of an operation,
5246             produced theShapeWhere. The theShapeWhat must be among this operation's
5247             arguments (an argument shape or a sub-shape of an argument shape).
5248             The operation could be the Partition or one of boolean operations,
5249             performed on simple shapes (not on compounds).
5250
5251             Parameters:
5252                 theShapeWhere Shape to find sub-shapes of.
5253                 theShapeWhat Shape, specifying what to find (must be in the
5254                                 building history of the ShapeWhere).
5255                 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             Returns:
5260                 Group of all found sub-shapes or a single found sub-shape.
5261             """
5262             # Example: see GEOM_TestOthers.py
5263             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5264             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5265             self._autoPublish(anObj, theName, "inplace")
5266             return anObj
5267
5268         ## Get sub-shape of theShapeWhere, which is
5269         #  equal to \a theShapeWhat.
5270         #  @param theShapeWhere Shape to find sub-shape of.
5271         #  @param theShapeWhat Shape, specifying what to find.
5272         #  @param theName Object name; when specified, this parameter is used
5273         #         for result publication in the study. Otherwise, if automatic
5274         #         publication is switched on, default value is used for result name.
5275         #
5276         #  @return New GEOM.GEOM_Object for found sub-shape.
5277         #
5278         #  @ref swig_GetSame "Example"
5279         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5280             """
5281             Get sub-shape of theShapeWhere, which is
5282             equal to theShapeWhat.
5283
5284             Parameters:
5285                 theShapeWhere Shape to find sub-shape of.
5286                 theShapeWhat Shape, specifying what to find.
5287                 theName Object name; when specified, this parameter is used
5288                         for result publication in the study. Otherwise, if automatic
5289                         publication is switched on, default value is used for result name.
5290
5291             Returns:
5292                 New GEOM.GEOM_Object for found sub-shape.
5293             """
5294             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5295             RaiseIfFailed("GetSame", self.ShapesOp)
5296             self._autoPublish(anObj, theName, "sameShape")
5297             return anObj
5298
5299
5300         ## Get sub-shape indices of theShapeWhere, which is
5301         #  equal to \a theShapeWhat.
5302         #  @param theShapeWhere Shape to find sub-shape of.
5303         #  @param theShapeWhat Shape, specifying what to find.
5304         #  @return List of all found sub-shapes indices. 
5305         #
5306         #  @ref swig_GetSame "Example"
5307         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5308             """
5309             Get sub-shape indices of theShapeWhere, which is
5310             equal to theShapeWhat.
5311
5312             Parameters:
5313                 theShapeWhere Shape to find sub-shape of.
5314                 theShapeWhat Shape, specifying what to find.
5315
5316             Returns:
5317                 List of all found sub-shapes indices.
5318             """
5319             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5320             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5321             return anObj
5322
5323
5324         # end of l4_obtain
5325         ## @}
5326
5327         ## @addtogroup l4_access
5328         ## @{
5329
5330         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5331         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5332         #  @param aShape Shape to get sub-shape of.
5333         #  @param ListOfID List of sub-shapes indices.
5334         #  @param theName Object name; when specified, this parameter is used
5335         #         for result publication in the study. Otherwise, if automatic
5336         #         publication is switched on, default value is used for result name.
5337         #
5338         #  @return Found sub-shape.
5339         #
5340         #  @ref swig_all_decompose "Example"
5341         def GetSubShape(self, aShape, ListOfID, theName=None):
5342             """
5343             Obtain a composite sub-shape of aShape, composed from sub-shapes
5344             of aShape, selected by their unique IDs inside aShape
5345
5346             Parameters:
5347                 aShape Shape to get sub-shape of.
5348                 ListOfID List of sub-shapes indices.
5349                 theName Object name; when specified, this parameter is used
5350                         for result publication in the study. Otherwise, if automatic
5351                         publication is switched on, default value is used for result name.
5352
5353             Returns:
5354                 Found sub-shape.
5355             """
5356             # Example: see GEOM_TestAll.py
5357             anObj = self.AddSubShape(aShape,ListOfID)
5358             self._autoPublish(anObj, theName, "subshape")
5359             return anObj
5360
5361         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5362         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5363         #  @param aShape Shape to get sub-shape of.
5364         #  @param aSubShape Sub-shapes of aShape.
5365         #  @return ID of found sub-shape.
5366         #
5367         #  @ref swig_all_decompose "Example"
5368         def GetSubShapeID(self, aShape, aSubShape):
5369             """
5370             Obtain unique ID of sub-shape aSubShape inside aShape
5371             of aShape, selected by their unique IDs inside aShape
5372
5373             Parameters:
5374                aShape Shape to get sub-shape of.
5375                aSubShape Sub-shapes of aShape.
5376
5377             Returns:
5378                ID of found sub-shape.
5379             """
5380             # Example: see GEOM_TestAll.py
5381             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5382             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5383             return anID
5384             
5385         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5386         #  This function is provided for performance purpose. The complexity is O(n) with n
5387         #  the number of subobjects of aShape
5388         #  @param aShape Shape to get sub-shape of.
5389         #  @param aSubShapes Sub-shapes of aShape.
5390         #  @return list of IDs of found sub-shapes.
5391         #
5392         #  @ref swig_all_decompose "Example"
5393         def GetSubShapesIDs(self, aShape, aSubShapes):
5394             """
5395             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5396             This function is provided for performance purpose. The complexity is O(n) with n
5397             the number of subobjects of aShape
5398
5399             Parameters:
5400                aShape Shape to get sub-shape of.
5401                aSubShapes Sub-shapes of aShape.
5402
5403             Returns:
5404                List of IDs of found sub-shape.
5405             """
5406             # Example: see GEOM_TestAll.py
5407             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5408             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5409             return anIDs
5410
5411         # end of l4_access
5412         ## @}
5413
5414         ## @addtogroup l4_decompose
5415         ## @{
5416
5417         ## Get all sub-shapes and groups of \a theShape,
5418         #  that were created already by any other methods.
5419         #  @param theShape Any shape.
5420         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5421         #                       returned, else all found sub-shapes and groups.
5422         #  @return List of existing sub-objects of \a theShape.
5423         #
5424         #  @ref swig_all_decompose "Example"
5425         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5426             """
5427             Get all sub-shapes and groups of theShape,
5428             that were created already by any other methods.
5429
5430             Parameters:
5431                 theShape Any shape.
5432                 theGroupsOnly If this parameter is TRUE, only groups will be
5433                                  returned, else all found sub-shapes and groups.
5434
5435             Returns:
5436                 List of existing sub-objects of theShape.
5437             """
5438             # Example: see GEOM_TestAll.py
5439             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5440             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5441             return ListObj
5442
5443         ## Get all groups of \a theShape,
5444         #  that were created already by any other methods.
5445         #  @param theShape Any shape.
5446         #  @return List of existing groups of \a theShape.
5447         #
5448         #  @ref swig_all_decompose "Example"
5449         def GetGroups(self, theShape):
5450             """
5451             Get all groups of theShape,
5452             that were created already by any other methods.
5453
5454             Parameters:
5455                 theShape Any shape.
5456
5457             Returns:
5458                 List of existing groups of theShape.
5459             """
5460             # Example: see GEOM_TestAll.py
5461             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5462             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5463             return ListObj
5464
5465         ## Explode a shape on sub-shapes of a given type.
5466         #  If the shape itself matches the type, it is also returned.
5467         #  @param aShape Shape to be exploded.
5468         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
5469         #  @param theName Object name; when specified, this parameter is used
5470         #         for result publication in the study. Otherwise, if automatic
5471         #         publication is switched on, default value is used for result name.
5472         #
5473         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5474         #
5475         #  @ref swig_all_decompose "Example"
5476         def SubShapeAll(self, aShape, aType, theName=None):
5477             """
5478             Explode a shape on sub-shapes of a given type.
5479             If the shape itself matches the type, it is also returned.
5480
5481             Parameters:
5482                 aShape Shape to be exploded.
5483                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
5484                 theName Object name; when specified, this parameter is used
5485                         for result publication in the study. Otherwise, if automatic
5486                         publication is switched on, default value is used for result name.
5487
5488             Returns:
5489                 List of sub-shapes of type theShapeType, contained in theShape.
5490             """
5491             # Example: see GEOM_TestAll.py
5492             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5493             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5494             self._autoPublish(ListObj, theName, "subshape")
5495             return ListObj
5496
5497         ## Explode a shape on sub-shapes of a given type.
5498         #  @param aShape Shape to be exploded.
5499         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5500         #  @return List of IDs of sub-shapes.
5501         #
5502         #  @ref swig_all_decompose "Example"
5503         def SubShapeAllIDs(self, aShape, aType):
5504             """
5505             Explode a shape on sub-shapes of a given type.
5506
5507             Parameters:
5508                 aShape Shape to be exploded (see geompy.ShapeType)
5509                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5510
5511             Returns:
5512                 List of IDs of sub-shapes.
5513             """
5514             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5515             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5516             return ListObj
5517
5518         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5519         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
5520         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5521         #  @param aShape Shape to get sub-shape of.
5522         #  @param ListOfInd List of sub-shapes indices.
5523         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5524         #  @param 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         #  @return A compound of sub-shapes of aShape.
5529         #
5530         #  @ref swig_all_decompose "Example"
5531         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5532             """
5533             Obtain a compound of sub-shapes of aShape,
5534             selected by their indices in list of all sub-shapes of type aType.
5535             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5536             
5537             Parameters:
5538                 aShape Shape to get sub-shape of.
5539                 ListOfID List of sub-shapes indices.
5540                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5541                 theName Object name; when specified, this parameter is used
5542                         for result publication in the study. Otherwise, if automatic
5543                         publication is switched on, default value is used for result name.
5544
5545             Returns:
5546                 A compound of sub-shapes of aShape.
5547             """
5548             # Example: see GEOM_TestAll.py
5549             ListOfIDs = []
5550             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5551             for ind in ListOfInd:
5552                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5553             # note: auto-publishing is done in self.GetSubShape()
5554             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5555             return anObj
5556
5557         ## Explode a shape on sub-shapes of a given type.
5558         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5559         #  If the shape itself matches the type, it is also returned.
5560         #  @param aShape Shape to be exploded.
5561         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5562         #  @param theName Object name; when specified, this parameter is used
5563         #         for result publication in the study. Otherwise, if automatic
5564         #         publication is switched on, default value is used for result name.
5565         #
5566         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5567         #
5568         #  @ref swig_SubShapeAllSorted "Example"
5569         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5570             """
5571             Explode a shape on sub-shapes of a given type.
5572             Sub-shapes will be sorted by coordinates of their gravity centers.
5573             If the shape itself matches the type, it is also returned.
5574
5575             Parameters: 
5576                 aShape Shape to be exploded.
5577                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5578                 theName Object name; when specified, this parameter is used
5579                         for result publication in the study. Otherwise, if automatic
5580                         publication is switched on, default value is used for result name.
5581
5582             Returns: 
5583                 List of sub-shapes of type theShapeType, contained in theShape.
5584             """
5585             # Example: see GEOM_TestAll.py
5586             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5587             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5588             self._autoPublish(ListObj, theName, "subshape")
5589             return ListObj
5590
5591         ## Explode a shape on sub-shapes of a given type.
5592         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5593         #  @param aShape Shape to be exploded.
5594         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5595         #  @return List of IDs of sub-shapes.
5596         #
5597         #  @ref swig_all_decompose "Example"
5598         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5599             """
5600             Explode a shape on sub-shapes of a given type.
5601             Sub-shapes will be sorted by coordinates of their gravity centers.
5602
5603             Parameters: 
5604                 aShape Shape to be exploded.
5605                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5606
5607             Returns: 
5608                 List of IDs of sub-shapes.
5609             """
5610             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5611             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5612             return ListIDs
5613
5614         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5615         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5616         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5617         #  @param aShape Shape to get sub-shape of.
5618         #  @param ListOfInd List of sub-shapes indices.
5619         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5620         #  @param 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         #  @return A compound of sub-shapes of aShape.
5625         #
5626         #  @ref swig_all_decompose "Example"
5627         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5628             """
5629             Obtain a compound of sub-shapes of aShape,
5630             selected by they indices in sorted list of all sub-shapes of type aType.
5631             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5632
5633             Parameters:
5634                 aShape Shape to get sub-shape of.
5635                 ListOfID List of sub-shapes indices.
5636                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5637                 theName Object name; when specified, this parameter is used
5638                         for result publication in the study. Otherwise, if automatic
5639                         publication is switched on, default value is used for result name.
5640
5641             Returns:
5642                 A compound of sub-shapes of aShape.
5643             """
5644             # Example: see GEOM_TestAll.py
5645             ListOfIDs = []
5646             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5647             for ind in ListOfInd:
5648                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5649             # note: auto-publishing is done in self.GetSubShape()
5650             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5651             return anObj
5652
5653         ## Extract shapes (excluding the main shape) of given type.
5654         #  @param aShape The shape.
5655         #  @param aType  The shape type (see ShapeType())
5656         #  @param isSorted Boolean flag to switch sorting on/off.
5657         #  @param theName Object name; when specified, this parameter is used
5658         #         for result publication in the study. Otherwise, if automatic
5659         #         publication is switched on, default value is used for result name.
5660         #
5661         #  @return List of sub-shapes of type aType, contained in aShape.
5662         #
5663         #  @ref swig_FilletChamfer "Example"
5664         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
5665             """
5666             Extract shapes (excluding the main shape) of given type.
5667
5668             Parameters:
5669                 aShape The shape.
5670                 aType  The shape type (see geompy.ShapeType)
5671                 isSorted Boolean flag to switch sorting on/off.
5672                 theName Object name; when specified, this parameter is used
5673                         for result publication in the study. Otherwise, if automatic
5674                         publication is switched on, default value is used for result name.
5675
5676             Returns:     
5677                 List of sub-shapes of type aType, contained in aShape.
5678             """
5679             # Example: see GEOM_TestAll.py
5680             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
5681             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
5682             self._autoPublish(ListObj, theName, "subshape")
5683             return ListObj
5684
5685         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
5686         #  @param aShape Main shape.
5687         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
5688         #  @param theName Object name; when specified, this parameter is used
5689         #         for result publication in the study. Otherwise, if automatic
5690         #         publication is switched on, default value is used for result name.
5691         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5692         #
5693         #  @ref swig_all_decompose "Example"
5694         def SubShapes(self, aShape, anIDs, theName=None):
5695             """
5696             Get a set of sub-shapes defined by their unique IDs inside theMainShape
5697
5698             Parameters:
5699                 aShape Main shape.
5700                 anIDs List of unique IDs of sub-shapes inside theMainShape.
5701                 theName Object name; when specified, this parameter is used
5702                         for result publication in the study. Otherwise, if automatic
5703                         publication is switched on, default value is used for result name.
5704
5705             Returns:      
5706                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5707             """
5708             # Example: see GEOM_TestAll.py
5709             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
5710             RaiseIfFailed("SubShapes", self.ShapesOp)
5711             self._autoPublish(ListObj, theName, "subshape")
5712             return ListObj
5713
5714         # end of l4_decompose
5715         ## @}
5716
5717         ## @addtogroup l4_decompose_d
5718         ## @{
5719
5720         ## Deprecated method
5721         #  It works like SubShapeAllSortedCentres(), but wrongly
5722         #  defines centres of faces, shells and solids.
5723         def SubShapeAllSorted(self, aShape, aType, theName=None):
5724             """
5725             Deprecated method
5726             It works like geompy.SubShapeAllSortedCentres, but wrongly
5727             defines centres of faces, shells and solids.
5728             """
5729             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
5730             RaiseIfFailed("MakeExplode", self.ShapesOp)
5731             self._autoPublish(ListObj, theName, "subshape")
5732             return ListObj
5733
5734         ## Deprecated method
5735         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
5736         #  defines centres of faces, shells and solids.
5737         def SubShapeAllSortedIDs(self, aShape, aType):
5738             """
5739             Deprecated method
5740             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
5741             defines centres of faces, shells and solids.
5742             """
5743             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
5744             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5745             return ListIDs
5746
5747         ## Deprecated method
5748         #  It works like SubShapeSortedCentres(), but has a bug
5749         #  (wrongly defines centres of faces, shells and solids).
5750         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
5751             """
5752             Deprecated method
5753             It works like geompy.SubShapeSortedCentres, but has a bug
5754             (wrongly defines centres of faces, shells and solids).
5755             """
5756             ListOfIDs = []
5757             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
5758             for ind in ListOfInd:
5759                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5760             # note: auto-publishing is done in self.GetSubShape()
5761             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5762             return anObj
5763
5764         # end of l4_decompose_d
5765         ## @}
5766
5767         ## @addtogroup l3_healing
5768         ## @{
5769
5770         ## Apply a sequence of Shape Healing operators to the given object.
5771         #  @param theShape Shape to be processed.
5772         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5773         #  @param theParameters List of names of parameters
5774         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5775         #  @param theValues List of values of parameters, in the same order
5776         #                    as parameters are listed in <VAR>theParameters</VAR> list.
5777         #  @param theName Object name; when specified, this parameter is used
5778         #         for result publication in the study. Otherwise, if automatic
5779         #         publication is switched on, default value is used for result name.
5780         #
5781         #  <b> Operators and Parameters: </b> \n
5782         #
5783         #  * \b FixShape - corrects invalid shapes. \n
5784         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
5785         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
5786         #
5787         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
5788         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
5789         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
5790         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
5791         #
5792         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
5793         #    surfaces in segments using a certain angle. \n
5794         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5795         #    if Angle=180, four if Angle=90, etc). \n
5796         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
5797         #
5798         #  * \b SplitClosedFaces - splits closed faces in segments.
5799         #    The number of segments depends on the number of splitting points.\n
5800         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
5801         #
5802         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
5803         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
5804         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
5805         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
5806         #   This and the previous parameters can take the following values:\n
5807         #   \b Parametric \b Continuity \n
5808         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
5809         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
5810         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
5811         #    ruling out sharp edges).\n
5812         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
5813         #       are of the same magnitude).\n
5814         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
5815         #    or surfaces (d/du C(u)) are the same at junction. \n
5816         #   \b Geometric \b Continuity \n
5817         #   \b G1: first derivatives are proportional at junction.\n
5818         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
5819         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
5820         #   \b G2: first and second derivatives are proportional at junction.
5821         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
5822         #    continuity requires that the underlying parameterization was continuous as well.
5823         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
5824         #
5825         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
5826         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
5827         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
5828         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
5829         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
5830         #       with the specified parameters.\n
5831         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
5832         #       with the specified parameters.\n
5833         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
5834         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
5835         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
5836         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
5837         #
5838         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
5839         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
5840         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
5841         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
5842         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
5843         #
5844         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
5845         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
5846         #
5847         #
5848         #  @return New GEOM.GEOM_Object, containing processed shape.
5849         #
5850         #  \n @ref tui_shape_processing "Example"
5851         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
5852             """
5853             Apply a sequence of Shape Healing operators to the given object.
5854
5855             Parameters:
5856                 theShape Shape to be processed.
5857                 theValues List of values of parameters, in the same order
5858                           as parameters are listed in theParameters list.
5859                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5860                 theParameters List of names of parameters
5861                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5862                 theName Object name; when specified, this parameter is used
5863                         for result publication in the study. Otherwise, if automatic
5864                         publication is switched on, default value is used for result name.
5865
5866                 Operators and Parameters:
5867
5868                  * FixShape - corrects invalid shapes.
5869                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
5870                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
5871                  * FixFaceSize - removes small faces, such as spots and strips.
5872                      * FixFaceSize.Tolerance - defines minimum possible face size.
5873                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
5874                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
5875                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
5876                                 in segments using a certain angle.
5877                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5878                                           if Angle=180, four if Angle=90, etc).
5879                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
5880                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
5881                                       splitting points.
5882                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
5883                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
5884                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
5885                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
5886                      * SplitContinuity.CurveContinuity - required continuity for curves.
5887                        This and the previous parameters can take the following values:
5888                        
5889                        Parametric Continuity:
5890                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
5891                                                    coincidental. The curves or surfaces may still meet at an angle,
5892                                                    giving rise to a sharp corner or edge).
5893                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
5894                                                    are parallel, ruling out sharp edges).
5895                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
5896                                                   or surfaces are of the same magnitude).
5897                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
5898                           curves or surfaces (d/du C(u)) are the same at junction.
5899                           
5900                        Geometric Continuity:
5901                        G1: first derivatives are proportional at junction.
5902                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
5903                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
5904                        G2: first and second derivatives are proportional at junction. As the names imply,
5905                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
5906                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
5907                            geometric continuity of order n, but not vice-versa.
5908                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
5909                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
5910                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
5911                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
5912                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
5913                                                         the specified parameters.
5914                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
5915                                                         the specified parameters.
5916                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
5917                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
5918                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
5919                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
5920                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
5921                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
5922                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
5923                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
5924                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
5925                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
5926                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
5927
5928             Returns:
5929                 New GEOM.GEOM_Object, containing processed shape.
5930
5931             Note: For more information look through SALOME Geometry User's Guide->
5932                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
5933             """
5934             # Example: see GEOM_TestHealing.py
5935             theValues,Parameters = ParseList(theValues)
5936             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
5937             # To avoid script failure in case of good argument shape
5938             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
5939                 return theShape
5940             RaiseIfFailed("ProcessShape", self.HealOp)
5941             for string in (theOperators + theParameters):
5942                 Parameters = ":" + Parameters
5943                 pass
5944             anObj.SetParameters(Parameters)
5945             self._autoPublish(anObj, theName, "healed")
5946             return anObj
5947
5948         ## Remove faces from the given object (shape).
5949         #  @param theObject Shape to be processed.
5950         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
5951         #                  removes ALL faces of the given object.
5952         #  @param theName Object name; when specified, this parameter is used
5953         #         for result publication in the study. Otherwise, if automatic
5954         #         publication is switched on, default value is used for result name.
5955         #
5956         #  @return New GEOM.GEOM_Object, containing processed shape.
5957         #
5958         #  @ref tui_suppress_faces "Example"
5959         def SuppressFaces(self, theObject, theFaces, theName=None):
5960             """
5961             Remove faces from the given object (shape).
5962
5963             Parameters:
5964                 theObject Shape to be processed.
5965                 theFaces Indices of faces to be removed, if EMPTY then the method
5966                          removes ALL faces of the given object.
5967                 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             Returns:
5972                 New GEOM.GEOM_Object, containing processed shape.
5973             """
5974             # Example: see GEOM_TestHealing.py
5975             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
5976             RaiseIfFailed("SuppressFaces", self.HealOp)
5977             self._autoPublish(anObj, theName, "suppressFaces")
5978             return anObj
5979
5980         ## Sewing of some shapes into single shape.
5981         #  @param ListShape Shapes to be processed.
5982         #  @param theTolerance Required tolerance value.
5983         #  @param AllowNonManifold Flag that allows non-manifold sewing.
5984         #  @param theName Object name; when specified, this parameter is used
5985         #         for result publication in the study. Otherwise, if automatic
5986         #         publication is switched on, default value is used for result name.
5987         #
5988         #  @return New GEOM.GEOM_Object, containing processed shape.
5989         #
5990         #  @ref tui_sewing "Example"
5991         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
5992             """
5993             Sewing of some shapes into single shape.
5994
5995             Parameters:
5996                 ListShape Shapes to be processed.
5997                 theTolerance Required tolerance value.
5998                 AllowNonManifold Flag that allows non-manifold sewing.
5999                 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             Returns:
6004                 New GEOM.GEOM_Object, containing processed shape.
6005             """
6006             # Example: see GEOM_TestHealing.py
6007             comp = self.MakeCompound(ListShape)
6008             # note: auto-publishing is done in self.Sew()
6009             anObj = self.Sew(comp, theTolerance, AllowNonManifold, theName)
6010             return anObj
6011
6012         ## Sewing of the given object.
6013         #  @param theObject Shape to be processed.
6014         #  @param theTolerance Required tolerance value.
6015         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6016         #  @param theName Object name; when specified, this parameter is used
6017         #         for result publication in the study. Otherwise, if automatic
6018         #         publication is switched on, default value is used for result name.
6019         #
6020         #  @return New GEOM.GEOM_Object, containing processed shape.
6021         def Sew(self, theObject, theTolerance, AllowNonManifold=False, theName=None):
6022             """
6023             Sewing of the given object.
6024
6025             Parameters:
6026                 theObject Shape to be processed.
6027                 theTolerance Required tolerance value.
6028                 AllowNonManifold Flag that allows non-manifold sewing.
6029                 theName Object name; when specified, this parameter is used
6030                         for result publication in the study. Otherwise, if automatic
6031                         publication is switched on, default value is used for result name.
6032
6033             Returns:
6034                 New GEOM.GEOM_Object, containing processed shape.
6035             """
6036             # Example: see MakeSewing() above
6037             theTolerance,Parameters = ParseParameters(theTolerance)
6038             if AllowNonManifold:
6039                 anObj = self.HealOp.SewAllowNonManifold(theObject, theTolerance)
6040             else:
6041                 anObj = self.HealOp.Sew(theObject, theTolerance)
6042             # To avoid script failure in case of good argument shape
6043             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6044                 return theObject
6045             RaiseIfFailed("Sew", self.HealOp)
6046             anObj.SetParameters(Parameters)
6047             self._autoPublish(anObj, theName, "sewed")
6048             return anObj
6049
6050         ## Rebuild the topology of theCompound of solids by removing
6051         #  of the faces that are shared by several solids.
6052         #  @param theCompound Shape to be processed.
6053         #  @param theName Object name; when specified, this parameter is used
6054         #         for result publication in the study. Otherwise, if automatic
6055         #         publication is switched on, default value is used for result name.
6056         #
6057         #  @return New GEOM.GEOM_Object, containing processed shape.
6058         #
6059         #  @ref tui_remove_webs "Example"
6060         def RemoveInternalFaces (self, theCompound, theName=None):
6061             """
6062             Rebuild the topology of theCompound of solids by removing
6063             of the faces that are shared by several solids.
6064
6065             Parameters:
6066                 theCompound Shape to be processed.
6067                 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             Returns:
6072                 New GEOM.GEOM_Object, containing processed shape.
6073             """
6074             # Example: see GEOM_TestHealing.py
6075             anObj = self.HealOp.RemoveInternalFaces(theCompound)
6076             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6077             self._autoPublish(anObj, theName, "removeWebs")
6078             return anObj
6079
6080         ## Remove internal wires and edges from the given object (face).
6081         #  @param theObject Shape to be processed.
6082         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6083         #                  removes ALL internal wires of the given object.
6084         #  @param theName Object name; when specified, this parameter is used
6085         #         for result publication in the study. Otherwise, if automatic
6086         #         publication is switched on, default value is used for result name.
6087         #
6088         #  @return New GEOM.GEOM_Object, containing processed shape.
6089         #
6090         #  @ref tui_suppress_internal_wires "Example"
6091         def SuppressInternalWires(self, theObject, theWires, theName=None):
6092             """
6093             Remove internal wires and edges from the given object (face).
6094
6095             Parameters:
6096                 theObject Shape to be processed.
6097                 theWires Indices of wires to be removed, if EMPTY then the method
6098                          removes ALL internal wires of the given object.
6099                 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             Returns:                
6104                 New GEOM.GEOM_Object, containing processed shape.
6105             """
6106             # Example: see GEOM_TestHealing.py
6107             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6108             RaiseIfFailed("RemoveIntWires", self.HealOp)
6109             self._autoPublish(anObj, theName, "suppressWires")
6110             return anObj
6111
6112         ## Remove internal closed contours (holes) from the given object.
6113         #  @param theObject Shape to be processed.
6114         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6115         #                  removes ALL internal holes of the given object
6116         #  @param theName Object name; when specified, this parameter is used
6117         #         for result publication in the study. Otherwise, if automatic
6118         #         publication is switched on, default value is used for result name.
6119         #
6120         #  @return New GEOM.GEOM_Object, containing processed shape.
6121         #
6122         #  @ref tui_suppress_holes "Example"
6123         def SuppressHoles(self, theObject, theWires, theName=None):
6124             """
6125             Remove internal closed contours (holes) from the given object.
6126
6127             Parameters:
6128                 theObject Shape to be processed.
6129                 theWires Indices of wires to be removed, if EMPTY then the method
6130                          removes ALL internal holes of the given object
6131                 theName Object name; when specified, this parameter is used
6132                         for result publication in the study. Otherwise, if automatic
6133                         publication is switched on, default value is used for result name.
6134
6135             Returns:    
6136                 New GEOM.GEOM_Object, containing processed shape.
6137             """
6138             # Example: see GEOM_TestHealing.py
6139             anObj = self.HealOp.FillHoles(theObject, theWires)
6140             RaiseIfFailed("FillHoles", self.HealOp)
6141             self._autoPublish(anObj, theName, "suppressHoles")
6142             return anObj
6143
6144         ## Close an open wire.
6145         #  @param theObject Shape to be processed.
6146         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6147         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6148         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6149         #                        If False : closure by creation of an edge between ends.
6150         #  @param 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         #  @return New GEOM.GEOM_Object, containing processed shape.
6155         #
6156         #  @ref tui_close_contour "Example"
6157         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6158             """
6159             Close an open wire.
6160
6161             Parameters: 
6162                 theObject Shape to be processed.
6163                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6164                          if [ ], then theObject itself is a wire.
6165                 isCommonVertex If True  : closure by creation of a common vertex,
6166                                If False : closure by creation of an edge between ends.
6167                 theName Object name; when specified, this parameter is used
6168                         for result publication in the study. Otherwise, if automatic
6169                         publication is switched on, default value is used for result name.
6170
6171             Returns:                      
6172                 New GEOM.GEOM_Object, containing processed shape. 
6173             """
6174             # Example: see GEOM_TestHealing.py
6175             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6176             RaiseIfFailed("CloseContour", self.HealOp)
6177             self._autoPublish(anObj, theName, "closeContour")
6178             return anObj
6179
6180         ## Addition of a point to a given edge object.
6181         #  @param theObject Shape to be processed.
6182         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6183         #                      if -1, then theObject itself is the edge.
6184         #  @param theValue Value of parameter on edge or length parameter,
6185         #                  depending on \a isByParameter.
6186         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6187         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6188         #  @param theName Object name; when specified, this parameter is used
6189         #         for result publication in the study. Otherwise, if automatic
6190         #         publication is switched on, default value is used for result name.
6191         #
6192         #  @return New GEOM.GEOM_Object, containing processed shape.
6193         #
6194         #  @ref tui_add_point_on_edge "Example"
6195         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6196             """
6197             Addition of a point to a given edge object.
6198
6199             Parameters: 
6200                 theObject Shape to be processed.
6201                 theEdgeIndex Index of edge to be divided within theObject's shape,
6202                              if -1, then theObject itself is the edge.
6203                 theValue Value of parameter on edge or length parameter,
6204                          depending on isByParameter.
6205                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6206                               if FALSE : theValue is treated as a length parameter [0..1]
6207                 theName Object name; when specified, this parameter is used
6208                         for result publication in the study. Otherwise, if automatic
6209                         publication is switched on, default value is used for result name.
6210
6211             Returns:  
6212                 New GEOM.GEOM_Object, containing processed shape.
6213             """
6214             # Example: see GEOM_TestHealing.py
6215             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6216             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6217             RaiseIfFailed("DivideEdge", self.HealOp)
6218             anObj.SetParameters(Parameters)
6219             self._autoPublish(anObj, theName, "divideEdge")
6220             return anObj
6221
6222         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6223         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6224         #  @param theVertices A list of vertices to suppress. If the list
6225         #                     is empty, all vertices in a wire will be assumed.
6226         #  @param theName Object name; when specified, this parameter is used
6227         #         for result publication in the study. Otherwise, if automatic
6228         #         publication is switched on, default value is used for result name.
6229         #
6230         #  @return New GEOM.GEOM_Object with modified wire.
6231         #
6232         #  @ref tui_fuse_collinear_edges "Example"
6233         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6234             """
6235             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6236
6237             Parameters: 
6238                 theWire Wire to minimize the number of C1 continuous edges in.
6239                 theVertices A list of vertices to suppress. If the list
6240                             is empty, all vertices in a wire will be assumed.
6241                 theName Object name; when specified, this parameter is used
6242                         for result publication in the study. Otherwise, if automatic
6243                         publication is switched on, default value is used for result name.
6244
6245             Returns:  
6246                 New GEOM.GEOM_Object with modified wire.
6247             """
6248             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6249             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6250             self._autoPublish(anObj, theName, "fuseEdges")
6251             return anObj
6252
6253         ## Change orientation of the given object. Updates given shape.
6254         #  @param theObject Shape to be processed.
6255         #  @return Updated <var>theObject</var>
6256         #
6257         #  @ref swig_todo "Example"
6258         def ChangeOrientationShell(self,theObject):
6259             """
6260             Change orientation of the given object. Updates given shape.
6261
6262             Parameters: 
6263                 theObject Shape to be processed.
6264
6265             Returns:  
6266                 Updated theObject
6267             """
6268             theObject = self.HealOp.ChangeOrientation(theObject)
6269             RaiseIfFailed("ChangeOrientation", self.HealOp)
6270             pass
6271
6272         ## Change orientation of the given object.
6273         #  @param theObject Shape to be processed.
6274         #  @param theName Object name; when specified, this parameter is used
6275         #         for result publication in the study. Otherwise, if automatic
6276         #         publication is switched on, default value is used for result name.
6277         #
6278         #  @return New GEOM.GEOM_Object, containing processed shape.
6279         #
6280         #  @ref swig_todo "Example"
6281         def ChangeOrientationShellCopy(self, theObject, theName=None):
6282             """
6283             Change orientation of the given object.
6284
6285             Parameters:
6286                 theObject Shape to be processed.
6287                 theName Object name; when specified, this parameter is used
6288                         for result publication in the study. Otherwise, if automatic
6289                         publication is switched on, default value is used for result name.
6290
6291             Returns:   
6292                 New GEOM.GEOM_Object, containing processed shape.
6293             """
6294             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6295             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6296             self._autoPublish(anObj, theName, "reversed")
6297             return anObj
6298
6299         ## Try to limit tolerance of the given object by value \a theTolerance.
6300         #  @param theObject Shape to be processed.
6301         #  @param theTolerance Required tolerance value.
6302         #  @param theName Object name; when specified, this parameter is used
6303         #         for result publication in the study. Otherwise, if automatic
6304         #         publication is switched on, default value is used for result name.
6305         #
6306         #  @return New GEOM.GEOM_Object, containing processed shape.
6307         #
6308         #  @ref tui_limit_tolerance "Example"
6309         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6310             """
6311             Try to limit tolerance of the given object by value theTolerance.
6312
6313             Parameters:
6314                 theObject Shape to be processed.
6315                 theTolerance Required tolerance value.
6316                 theName Object name; when specified, this parameter is used
6317                         for result publication in the study. Otherwise, if automatic
6318                         publication is switched on, default value is used for result name.
6319
6320             Returns:   
6321                 New GEOM.GEOM_Object, containing processed shape.
6322             """
6323             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6324             RaiseIfFailed("LimitTolerance", self.HealOp)
6325             self._autoPublish(anObj, theName, "limitTolerance")
6326             return anObj
6327
6328         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6329         #  that constitute a free boundary of the given shape.
6330         #  @param theObject Shape to get free boundary of.
6331         #  @param 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         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6336         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6337         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6338         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6339         #
6340         #  @ref tui_measurement_tools_page "Example"
6341         def GetFreeBoundary(self, theObject, theName=None):
6342             """
6343             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6344             that constitute a free boundary of the given shape.
6345
6346             Parameters:
6347                 theObject Shape to get free boundary of.
6348                 theName Object name; when specified, this parameter is used
6349                         for result publication in the study. Otherwise, if automatic
6350                         publication is switched on, default value is used for result name.
6351
6352             Returns: 
6353                 [status, theClosedWires, theOpenWires]
6354                  status: FALSE, if an error(s) occured during the method execution.
6355                  theClosedWires: Closed wires on the free boundary of the given shape.
6356                  theOpenWires: Open wires on the free boundary of the given shape.
6357             """
6358             # Example: see GEOM_TestHealing.py
6359             anObj = self.HealOp.GetFreeBoundary(theObject)
6360             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6361             self._autoPublish(anObj[1], theName, "closedWire")
6362             self._autoPublish(anObj[2], theName, "openWire")
6363             return anObj
6364
6365         ## Replace coincident faces in theShape by one face.
6366         #  @param theShape Initial shape.
6367         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6368         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6369         #                         otherwise all initial shapes.
6370         #  @param theName Object name; when specified, this parameter is used
6371         #         for result publication in the study. Otherwise, if automatic
6372         #         publication is switched on, default value is used for result name.
6373         #
6374         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6375         #
6376         #  @ref tui_glue_faces "Example"
6377         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6378             """
6379             Replace coincident faces in theShape by one face.
6380
6381             Parameters:
6382                 theShape Initial shape.
6383                 theTolerance Maximum distance between faces, which can be considered as coincident.
6384                 doKeepNonSolids If FALSE, only solids will present in the result,
6385                                 otherwise all initial shapes.
6386                 theName Object name; when specified, this parameter is used
6387                         for result publication in the study. Otherwise, if automatic
6388                         publication is switched on, default value is used for result name.
6389
6390             Returns:
6391                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6392             """
6393             # Example: see GEOM_Spanner.py
6394             theTolerance,Parameters = ParseParameters(theTolerance)
6395             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6396             if anObj is None:
6397                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6398             anObj.SetParameters(Parameters)
6399             self._autoPublish(anObj, theName, "glueFaces")
6400             return anObj
6401
6402         ## Find coincident faces in theShape for possible gluing.
6403         #  @param theShape Initial shape.
6404         #  @param theTolerance Maximum distance between faces,
6405         #                      which can be considered as coincident.
6406         #  @param theName Object name; when specified, this parameter is used
6407         #         for result publication in the study. Otherwise, if automatic
6408         #         publication is switched on, default value is used for result name.
6409         #
6410         #  @return GEOM.ListOfGO
6411         #
6412         #  @ref tui_glue_faces "Example"
6413         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6414             """
6415             Find coincident faces in theShape for possible gluing.
6416
6417             Parameters:
6418                 theShape Initial shape.
6419                 theTolerance Maximum distance between faces,
6420                              which can be considered as coincident.
6421                 theName Object name; when specified, this parameter is used
6422                         for result publication in the study. Otherwise, if automatic
6423                         publication is switched on, default value is used for result name.
6424
6425             Returns:                    
6426                 GEOM.ListOfGO
6427             """
6428             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6429             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6430             self._autoPublish(anObj, theName, "facesToGlue")
6431             return anObj
6432
6433         ## Replace coincident faces in theShape by one face
6434         #  in compliance with given list of faces
6435         #  @param theShape Initial shape.
6436         #  @param theTolerance Maximum distance between faces,
6437         #                      which can be considered as coincident.
6438         #  @param theFaces List of faces for gluing.
6439         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6440         #                         otherwise all initial shapes.
6441         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6442         #                        will be glued, otherwise only the edges,
6443         #                        belonging to <VAR>theFaces</VAR>.
6444         #  @param theName Object name; when specified, this parameter is used
6445         #         for result publication in the study. Otherwise, if automatic
6446         #         publication is switched on, default value is used for result name.
6447         #
6448         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6449         #          without some faces.
6450         #
6451         #  @ref tui_glue_faces "Example"
6452         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6453                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6454             """
6455             Replace coincident faces in theShape by one face
6456             in compliance with given list of faces
6457
6458             Parameters:
6459                 theShape Initial shape.
6460                 theTolerance Maximum distance between faces,
6461                              which can be considered as coincident.
6462                 theFaces List of faces for gluing.
6463                 doKeepNonSolids If FALSE, only solids will present in the result,
6464                                 otherwise all initial shapes.
6465                 doGlueAllEdges If TRUE, all coincident edges of theShape
6466                                will be glued, otherwise only the edges,
6467                                belonging to theFaces.
6468                 theName Object name; when specified, this parameter is used
6469                         for result publication in the study. Otherwise, if automatic
6470                         publication is switched on, default value is used for result name.
6471
6472             Returns:
6473                 New GEOM.GEOM_Object, containing a copy of theShape
6474                     without some faces.
6475             """
6476             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6477                                                       doKeepNonSolids, doGlueAllEdges)
6478             if anObj is None:
6479                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6480             self._autoPublish(anObj, theName, "glueFaces")
6481             return anObj
6482
6483         ## Replace coincident edges in theShape by one edge.
6484         #  @param theShape Initial shape.
6485         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6486         #  @param theName Object name; when specified, this parameter is used
6487         #         for result publication in the study. Otherwise, if automatic
6488         #         publication is switched on, default value is used for result name.
6489         #
6490         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6491         #
6492         #  @ref tui_glue_edges "Example"
6493         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6494             """
6495             Replace coincident edges in theShape by one edge.
6496
6497             Parameters:
6498                 theShape Initial shape.
6499                 theTolerance Maximum distance between edges, which can be considered as coincident.
6500                 theName Object name; when specified, this parameter is used
6501                         for result publication in the study. Otherwise, if automatic
6502                         publication is switched on, default value is used for result name.
6503
6504             Returns:    
6505                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6506             """
6507             theTolerance,Parameters = ParseParameters(theTolerance)
6508             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6509             if anObj is None:
6510                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6511             anObj.SetParameters(Parameters)
6512             self._autoPublish(anObj, theName, "glueEdges")
6513             return anObj
6514
6515         ## Find coincident edges in theShape for possible gluing.
6516         #  @param theShape Initial shape.
6517         #  @param theTolerance Maximum distance between edges,
6518         #                      which can be considered as coincident.
6519         #  @param theName Object name; when specified, this parameter is used
6520         #         for result publication in the study. Otherwise, if automatic
6521         #         publication is switched on, default value is used for result name.
6522         #
6523         #  @return GEOM.ListOfGO
6524         #
6525         #  @ref tui_glue_edges "Example"
6526         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6527             """
6528             Find coincident edges in theShape for possible gluing.
6529
6530             Parameters:
6531                 theShape Initial shape.
6532                 theTolerance Maximum distance between edges,
6533                              which can be considered as coincident.
6534                 theName Object name; when specified, this parameter is used
6535                         for result publication in the study. Otherwise, if automatic
6536                         publication is switched on, default value is used for result name.
6537
6538             Returns:                         
6539                 GEOM.ListOfGO
6540             """
6541             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6542             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6543             self._autoPublish(anObj, theName, "edgesToGlue")
6544             return anObj
6545
6546         ## Replace coincident edges in theShape by one edge
6547         #  in compliance with given list of edges.
6548         #  @param theShape Initial shape.
6549         #  @param theTolerance Maximum distance between edges,
6550         #                      which can be considered as coincident.
6551         #  @param theEdges List of edges for gluing.
6552         #  @param theName Object name; when specified, this parameter is used
6553         #         for result publication in the study. Otherwise, if automatic
6554         #         publication is switched on, default value is used for result name.
6555         #
6556         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6557         #          without some edges.
6558         #
6559         #  @ref tui_glue_edges "Example"
6560         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6561             """
6562             Replace coincident edges in theShape by one edge
6563             in compliance with given list of edges.
6564
6565             Parameters:
6566                 theShape Initial shape.
6567                 theTolerance Maximum distance between edges,
6568                              which can be considered as coincident.
6569                 theEdges List of edges for gluing.
6570                 theName Object name; when specified, this parameter is used
6571                         for result publication in the study. Otherwise, if automatic
6572                         publication is switched on, default value is used for result name.
6573
6574             Returns:  
6575                 New GEOM.GEOM_Object, containing a copy of theShape
6576                 without some edges.
6577             """
6578             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6579             if anObj is None:
6580                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6581             self._autoPublish(anObj, theName, "glueEdges")
6582             return anObj
6583
6584         # end of l3_healing
6585         ## @}
6586
6587         ## @addtogroup l3_boolean Boolean Operations
6588         ## @{
6589
6590         # -----------------------------------------------------------------------------
6591         # Boolean (Common, Cut, Fuse, Section)
6592         # -----------------------------------------------------------------------------
6593
6594         ## Perform one of boolean operations on two given shapes.
6595         #  @param theShape1 First argument for boolean operation.
6596         #  @param theShape2 Second argument for boolean operation.
6597         #  @param theOperation Indicates the operation to be done:\n
6598         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6599         #  @param theName Object name; when specified, this parameter is used
6600         #         for result publication in the study. Otherwise, if automatic
6601         #         publication is switched on, default value is used for result name.
6602         #
6603         #  @return New GEOM.GEOM_Object, containing the result shape.
6604         #
6605         #  @ref tui_fuse "Example"
6606         def MakeBoolean(self, theShape1, theShape2, theOperation, theName=None):
6607             """
6608             Perform one of boolean operations on two given shapes.
6609
6610             Parameters: 
6611                 theShape1 First argument for boolean operation.
6612                 theShape2 Second argument for boolean operation.
6613                 theOperation Indicates the operation to be done:
6614                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6615                 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             Returns:   
6620                 New GEOM.GEOM_Object, containing the result shape.
6621             """
6622             # Example: see GEOM_TestAll.py
6623             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation)
6624             RaiseIfFailed("MakeBoolean", self.BoolOp)
6625             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
6626             self._autoPublish(anObj, theName, def_names[theOperation])
6627             return anObj
6628
6629         ## Perform Common boolean operation on two given shapes.
6630         #  @param theShape1 First argument for boolean operation.
6631         #  @param theShape2 Second argument for boolean operation.
6632         #  @param theName Object name; when specified, this parameter is used
6633         #         for result publication in the study. Otherwise, if automatic
6634         #         publication is switched on, default value is used for result name.
6635         #
6636         #  @return New GEOM.GEOM_Object, containing the result shape.
6637         #
6638         #  @ref tui_common "Example 1"
6639         #  \n @ref swig_MakeCommon "Example 2"
6640         def MakeCommon(self, theShape1, theShape2, theName=None):
6641             """
6642             Perform Common boolean operation on two given shapes.
6643
6644             Parameters: 
6645                 theShape1 First argument for boolean operation.
6646                 theShape2 Second argument for boolean operation.
6647                 theName Object name; when specified, this parameter is used
6648                         for result publication in the study. Otherwise, if automatic
6649                         publication is switched on, default value is used for result name.
6650
6651             Returns:   
6652                 New GEOM.GEOM_Object, containing the result shape.
6653             """
6654             # Example: see GEOM_TestOthers.py
6655             # note: auto-publishing is done in self.MakeBoolean()
6656             return self.MakeBoolean(theShape1, theShape2, 1, theName)
6657
6658         ## Perform Cut boolean operation on two given shapes.
6659         #  @param theShape1 First argument for boolean operation.
6660         #  @param theShape2 Second argument for boolean operation.
6661         #  @param theName Object name; when specified, this parameter is used
6662         #         for result publication in the study. Otherwise, if automatic
6663         #         publication is switched on, default value is used for result name.
6664         #
6665         #  @return New GEOM.GEOM_Object, containing the result shape.
6666         #
6667         #  @ref tui_cut "Example 1"
6668         #  \n @ref swig_MakeCommon "Example 2"
6669         def MakeCut(self, theShape1, theShape2, theName=None):
6670             """
6671             Perform Cut boolean operation on two given shapes.
6672
6673             Parameters: 
6674                 theShape1 First argument for boolean operation.
6675                 theShape2 Second argument for boolean operation.
6676                 theName Object name; when specified, this parameter is used
6677                         for result publication in the study. Otherwise, if automatic
6678                         publication is switched on, default value is used for result name.
6679
6680             Returns:   
6681                 New GEOM.GEOM_Object, containing the result shape.
6682             
6683             """
6684             # Example: see GEOM_TestOthers.py
6685             # note: auto-publishing is done in self.MakeBoolean()
6686             return self.MakeBoolean(theShape1, theShape2, 2, theName)
6687
6688         ## Perform Fuse boolean operation on two given shapes.
6689         #  @param theShape1 First argument for boolean operation.
6690         #  @param theShape2 Second argument for boolean operation.
6691         #  @param theName Object name; when specified, this parameter is used
6692         #         for result publication in the study. Otherwise, if automatic
6693         #         publication is switched on, default value is used for result name.
6694         #
6695         #  @return New GEOM.GEOM_Object, containing the result shape.
6696         #
6697         #  @ref tui_fuse "Example 1"
6698         #  \n @ref swig_MakeCommon "Example 2"
6699         def MakeFuse(self, theShape1, theShape2, theName=None):
6700             """
6701             Perform Fuse boolean operation on two given shapes.
6702
6703             Parameters: 
6704                 theShape1 First argument for boolean operation.
6705                 theShape2 Second argument for boolean operation.
6706                 theName Object name; when specified, this parameter is used
6707                         for result publication in the study. Otherwise, if automatic
6708                         publication is switched on, default value is used for result name.
6709
6710             Returns:   
6711                 New GEOM.GEOM_Object, containing the result shape.
6712             
6713             """
6714             # Example: see GEOM_TestOthers.py
6715             # note: auto-publishing is done in self.MakeBoolean()
6716             return self.MakeBoolean(theShape1, theShape2, 3, theName)
6717
6718         ## Perform Section boolean operation on two given shapes.
6719         #  @param theShape1 First argument for boolean operation.
6720         #  @param theShape2 Second argument for boolean operation.
6721         #  @param theName Object name; when specified, this parameter is used
6722         #         for result publication in the study. Otherwise, if automatic
6723         #         publication is switched on, default value is used for result name.
6724         #
6725         #  @return New GEOM.GEOM_Object, containing the result shape.
6726         #
6727         #  @ref tui_section "Example 1"
6728         #  \n @ref swig_MakeCommon "Example 2"
6729         def MakeSection(self, theShape1, theShape2, theName=None):
6730             """
6731             Perform Section boolean operation on two given shapes.
6732
6733             Parameters: 
6734                 theShape1 First argument for boolean operation.
6735                 theShape2 Second argument for boolean operation.
6736                 theName Object name; when specified, this parameter is used
6737                         for result publication in the study. Otherwise, if automatic
6738                         publication is switched on, default value is used for result name.
6739
6740             Returns:   
6741                 New GEOM.GEOM_Object, containing the result shape.
6742             
6743             """
6744             # Example: see GEOM_TestOthers.py
6745             # note: auto-publishing is done in self.MakeBoolean()
6746             return self.MakeBoolean(theShape1, theShape2, 4, theName)
6747
6748         ## Perform Fuse boolean operation on the list of shapes.
6749         #  @param theShapesList Shapes to be fused.
6750         #  @param theName Object name; when specified, this parameter is used
6751         #         for result publication in the study. Otherwise, if automatic
6752         #         publication is switched on, default value is used for result name.
6753         #
6754         #  @return New GEOM.GEOM_Object, containing the result shape.
6755         #
6756         #  @ref tui_fuse "Example 1"
6757         #  \n @ref swig_MakeCommon "Example 2"
6758         def MakeFuseList(self, theShapesList, theName=None):
6759             """
6760             Perform Fuse boolean operation on the list of shapes.
6761
6762             Parameters: 
6763                 theShapesList Shapes to be fused.
6764                 theName Object name; when specified, this parameter is used
6765                         for result publication in the study. Otherwise, if automatic
6766                         publication is switched on, default value is used for result name.
6767
6768             Returns:   
6769                 New GEOM.GEOM_Object, containing the result shape.
6770             
6771             """
6772             # Example: see GEOM_TestOthers.py
6773             anObj = self.BoolOp.MakeFuseList(theShapesList)
6774             RaiseIfFailed("MakeFuseList", self.BoolOp)
6775             self._autoPublish(anObj, theName, "fuse")
6776             return anObj
6777
6778         ## Perform Common boolean operation on the list of shapes.
6779         #  @param theShapesList Shapes for Common operation.
6780         #  @param theName Object name; when specified, this parameter is used
6781         #         for result publication in the study. Otherwise, if automatic
6782         #         publication is switched on, default value is used for result name.
6783         #
6784         #  @return New GEOM.GEOM_Object, containing the result shape.
6785         #
6786         #  @ref tui_common "Example 1"
6787         #  \n @ref swig_MakeCommon "Example 2"
6788         def MakeCommonList(self, theShapesList, theName=None):
6789             """
6790             Perform Common boolean operation on the list of shapes.
6791
6792             Parameters: 
6793                 theShapesList Shapes for Common operation.
6794                 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             Returns:   
6799                 New GEOM.GEOM_Object, containing the result shape.
6800             
6801             """
6802             # Example: see GEOM_TestOthers.py
6803             anObj = self.BoolOp.MakeCommonList(theShapesList)
6804             RaiseIfFailed("MakeCommonList", self.BoolOp)
6805             self._autoPublish(anObj, theName, "common")
6806             return anObj
6807
6808         ## Perform Cut boolean operation on one object and the list of tools.
6809         #  @param theMainShape The object of the operation.
6810         #  @param theShapesList The list of tools of the operation.
6811         #  @param theName Object name; when specified, this parameter is used
6812         #         for result publication in the study. Otherwise, if automatic
6813         #         publication is switched on, default value is used for result name.
6814         #
6815         #  @return New GEOM.GEOM_Object, containing the result shape.
6816         #
6817         #  @ref tui_cut "Example 1"
6818         #  \n @ref swig_MakeCommon "Example 2"
6819         def MakeCutList(self, theMainShape, theShapesList, theName=None):
6820             """
6821             Perform Cut boolean operation on one object and the list of tools.
6822
6823             Parameters: 
6824                 theMainShape The object of the operation.
6825                 theShapesList The list of tools of the operation.
6826                 theName Object name; when specified, this parameter is used
6827                         for result publication in the study. Otherwise, if automatic
6828                         publication is switched on, default value is used for result name.
6829
6830             Returns:   
6831                 New GEOM.GEOM_Object, containing the result shape.
6832             
6833             """
6834             # Example: see GEOM_TestOthers.py
6835             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList)
6836             RaiseIfFailed("MakeCutList", self.BoolOp)
6837             self._autoPublish(anObj, theName, "cut")
6838             return anObj
6839
6840         # end of l3_boolean
6841         ## @}
6842
6843         ## @addtogroup l3_basic_op
6844         ## @{
6845
6846         ## Perform partition operation.
6847         #  @param ListShapes Shapes to be intersected.
6848         #  @param ListTools Shapes to intersect theShapes.
6849         #  @param Limit Type of resulting shapes (see ShapeType()).\n
6850         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
6851         #         type will be detected automatically.
6852         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
6853         #                             target type (equal to Limit) are kept in the result,
6854         #                             else standalone shapes of lower dimension
6855         #                             are kept also (if they exist).
6856         #  @param theName Object name; when specified, this parameter is used
6857         #         for result publication in the study. Otherwise, if automatic
6858         #         publication is switched on, default value is used for result name.
6859         #
6860         #  @note Each compound from ListShapes and ListTools will be exploded
6861         #        in order to avoid possible intersection between shapes from this compound.
6862         #
6863         #  After implementation new version of PartitionAlgo (October 2006)
6864         #  other parameters are ignored by current functionality. They are kept
6865         #  in this function only for support old versions.
6866         #      @param ListKeepInside Shapes, outside which the results will be deleted.
6867         #         Each shape from theKeepInside must belong to theShapes also.
6868         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
6869         #         Each shape from theRemoveInside must belong to theShapes also.
6870         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
6871         #      @param ListMaterials Material indices for each shape. Make sence,
6872         #         only if theRemoveWebs is TRUE.
6873         #
6874         #  @return New GEOM.GEOM_Object, containing the result shapes.
6875         #
6876         #  @ref tui_partition "Example"
6877         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6878                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6879                           KeepNonlimitShapes=0, theName=None):
6880             """
6881             Perform partition operation.
6882
6883             Parameters: 
6884                 ListShapes Shapes to be intersected.
6885                 ListTools Shapes to intersect theShapes.
6886                 Limit Type of resulting shapes (see geompy.ShapeType)
6887                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
6888                       type will be detected automatically.
6889                 KeepNonlimitShapes if this parameter == 0, then only shapes of
6890                                     target type (equal to Limit) are kept in the result,
6891                                     else standalone shapes of lower dimension
6892                                     are kept also (if they exist).
6893                 theName Object name; when specified, this parameter is used
6894                         for result publication in the study. Otherwise, if automatic
6895                         publication is switched on, default value is used for result name.
6896             Note:
6897                     Each compound from ListShapes and ListTools will be exploded
6898                     in order to avoid possible intersection between shapes from
6899                     this compound.
6900                     
6901             After implementation new version of PartitionAlgo (October 2006) other
6902             parameters are ignored by current functionality. They are kept in this
6903             function only for support old versions.
6904             
6905             Ignored parameters:
6906                 ListKeepInside Shapes, outside which the results will be deleted.
6907                                Each shape from theKeepInside must belong to theShapes also.
6908                 ListRemoveInside Shapes, inside which the results will be deleted.
6909                                  Each shape from theRemoveInside must belong to theShapes also.
6910                 RemoveWebs If TRUE, perform Glue 3D algorithm.
6911                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
6912
6913             Returns:   
6914                 New GEOM.GEOM_Object, containing the result shapes.
6915             """
6916             # Example: see GEOM_TestAll.py
6917             if Limit == self.ShapeType["AUTO"]:
6918                 # automatic detection of the most appropriate shape limit type
6919                 lim = GEOM.SHAPE
6920                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6921                 Limit = EnumToLong(lim)
6922                 pass
6923             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
6924                                               ListKeepInside, ListRemoveInside,
6925                                               Limit, RemoveWebs, ListMaterials,
6926                                               KeepNonlimitShapes);
6927             RaiseIfFailed("MakePartition", self.BoolOp)
6928             self._autoPublish(anObj, theName, "partition")
6929             return anObj
6930
6931         ## Perform partition operation.
6932         #  This method may be useful if it is needed to make a partition for
6933         #  compound contains nonintersected shapes. Performance will be better
6934         #  since intersection between shapes from compound is not performed.
6935         #
6936         #  Description of all parameters as in previous method MakePartition()
6937         #
6938         #  @note Passed compounds (via ListShapes or via ListTools)
6939         #           have to consist of nonintersecting shapes.
6940         #
6941         #  @return New GEOM.GEOM_Object, containing the result shapes.
6942         #
6943         #  @ref swig_todo "Example"
6944         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
6945                                                  ListKeepInside=[], ListRemoveInside=[],
6946                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
6947                                                  ListMaterials=[], KeepNonlimitShapes=0,
6948                                                  theName=None):
6949             """
6950             Perform partition operation.
6951             This method may be useful if it is needed to make a partition for
6952             compound contains nonintersected shapes. Performance will be better
6953             since intersection between shapes from compound is not performed.
6954
6955             Parameters: 
6956                 Description of all parameters as in method geompy.MakePartition
6957         
6958             NOTE:
6959                 Passed compounds (via ListShapes or via ListTools)
6960                 have to consist of nonintersecting shapes.
6961
6962             Returns:   
6963                 New GEOM.GEOM_Object, containing the result shapes.
6964             """
6965             if Limit == self.ShapeType["AUTO"]:
6966                 # automatic detection of the most appropriate shape limit type
6967                 lim = GEOM.SHAPE
6968                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6969                 Limit = EnumToLong(lim)
6970                 pass
6971             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
6972                                                                      ListKeepInside, ListRemoveInside,
6973                                                                      Limit, RemoveWebs, ListMaterials,
6974                                                                      KeepNonlimitShapes);
6975             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
6976             self._autoPublish(anObj, theName, "partition")
6977             return anObj
6978
6979         ## See method MakePartition() for more information.
6980         #
6981         #  @ref tui_partition "Example 1"
6982         #  \n @ref swig_Partition "Example 2"
6983         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6984                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6985                       KeepNonlimitShapes=0, theName=None):
6986             """
6987             See method geompy.MakePartition for more information.
6988             """
6989             # Example: see GEOM_TestOthers.py
6990             # note: auto-publishing is done in self.MakePartition()
6991             anObj = self.MakePartition(ListShapes, ListTools,
6992                                        ListKeepInside, ListRemoveInside,
6993                                        Limit, RemoveWebs, ListMaterials,
6994                                        KeepNonlimitShapes, theName);
6995             return anObj
6996
6997         ## Perform partition of the Shape with the Plane
6998         #  @param theShape Shape to be intersected.
6999         #  @param thePlane Tool shape, to intersect theShape.
7000         #  @param theName Object name; when specified, this parameter is used
7001         #         for result publication in the study. Otherwise, if automatic
7002         #         publication is switched on, default value is used for result name.
7003         #
7004         #  @return New GEOM.GEOM_Object, containing the result shape.
7005         #
7006         #  @ref tui_partition "Example"
7007         def MakeHalfPartition(self, theShape, thePlane, theName=None):
7008             """
7009             Perform partition of the Shape with the Plane
7010
7011             Parameters: 
7012                 theShape Shape to be intersected.
7013                 thePlane Tool shape, to intersect theShape.
7014                 theName Object name; when specified, this parameter is used
7015                         for result publication in the study. Otherwise, if automatic
7016                         publication is switched on, default value is used for result name.
7017
7018             Returns:  
7019                 New GEOM.GEOM_Object, containing the result shape.
7020             """
7021             # Example: see GEOM_TestAll.py
7022             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
7023             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7024             self._autoPublish(anObj, theName, "partition")
7025             return anObj
7026
7027         # end of l3_basic_op
7028         ## @}
7029
7030         ## @addtogroup l3_transform
7031         ## @{
7032
7033         ## Translate the given object along the vector, specified
7034         #  by its end points.
7035         #  @param theObject The object to be translated.
7036         #  @param thePoint1 Start point of translation vector.
7037         #  @param thePoint2 End point of translation vector.
7038         #  @param theCopy Flag used to translate object itself or create a copy.
7039         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7040         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7041         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7042             """
7043             Translate the given object along the vector, specified by its end points.
7044
7045             Parameters: 
7046                 theObject The object to be translated.
7047                 thePoint1 Start point of translation vector.
7048                 thePoint2 End point of translation vector.
7049                 theCopy Flag used to translate object itself or create a copy.
7050
7051             Returns: 
7052                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7053                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7054             """
7055             if theCopy:
7056                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7057             else:
7058                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7059             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7060             return anObj
7061
7062         ## Translate the given object along the vector, specified
7063         #  by its end points, creating its copy before the translation.
7064         #  @param theObject The object to be translated.
7065         #  @param thePoint1 Start point of translation vector.
7066         #  @param thePoint2 End point of translation vector.
7067         #  @param 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         #  @return New GEOM.GEOM_Object, containing the translated object.
7072         #
7073         #  @ref tui_translation "Example 1"
7074         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7075         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7076             """
7077             Translate the given object along the vector, specified
7078             by its end points, creating its copy before the translation.
7079
7080             Parameters: 
7081                 theObject The object to be translated.
7082                 thePoint1 Start point of translation vector.
7083                 thePoint2 End point of translation vector.
7084                 theName Object name; when specified, this parameter is used
7085                         for result publication in the study. Otherwise, if automatic
7086                         publication is switched on, default value is used for result name.
7087
7088             Returns:  
7089                 New GEOM.GEOM_Object, containing the translated object.
7090             """
7091             # Example: see GEOM_TestAll.py
7092             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7093             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7094             self._autoPublish(anObj, theName, "translated")
7095             return anObj
7096
7097         ## Translate the given object along the vector, specified by its components.
7098         #  @param theObject The object to be translated.
7099         #  @param theDX,theDY,theDZ Components of translation vector.
7100         #  @param theCopy Flag used to translate object itself or create a copy.
7101         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7102         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7103         #
7104         #  @ref tui_translation "Example"
7105         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7106             """
7107             Translate the given object along the vector, specified by its components.
7108
7109             Parameters: 
7110                 theObject The object to be translated.
7111                 theDX,theDY,theDZ Components of translation vector.
7112                 theCopy Flag used to translate object itself or create a copy.
7113
7114             Returns: 
7115                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7116                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7117             """
7118             # Example: see GEOM_TestAll.py
7119             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7120             if theCopy:
7121                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7122             else:
7123                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7124             anObj.SetParameters(Parameters)
7125             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7126             return anObj
7127
7128         ## Translate the given object along the vector, specified
7129         #  by its components, creating its copy before the translation.
7130         #  @param theObject The object to be translated.
7131         #  @param theDX,theDY,theDZ Components of translation vector.
7132         #  @param theName Object name; when specified, this parameter is used
7133         #         for result publication in the study. Otherwise, if automatic
7134         #         publication is switched on, default value is used for result name.
7135         #
7136         #  @return New GEOM.GEOM_Object, containing the translated object.
7137         #
7138         #  @ref tui_translation "Example"
7139         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7140             """
7141             Translate the given object along the vector, specified
7142             by its components, creating its copy before the translation.
7143
7144             Parameters: 
7145                 theObject The object to be translated.
7146                 theDX,theDY,theDZ Components of translation vector.
7147                 theName Object name; when specified, this parameter is used
7148                         for result publication in the study. Otherwise, if automatic
7149                         publication is switched on, default value is used for result name.
7150
7151             Returns: 
7152                 New GEOM.GEOM_Object, containing the translated object.
7153             """
7154             # Example: see GEOM_TestAll.py
7155             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7156             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7157             anObj.SetParameters(Parameters)
7158             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7159             self._autoPublish(anObj, theName, "translated")
7160             return anObj
7161
7162         ## Translate the given object along the given vector.
7163         #  @param theObject The object to be translated.
7164         #  @param theVector The translation vector.
7165         #  @param theCopy Flag used to translate object itself or create a copy.
7166         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7167         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7168         def TranslateVector(self, theObject, theVector, theCopy=False):
7169             """
7170             Translate the given object along the given vector.
7171
7172             Parameters: 
7173                 theObject The object to be translated.
7174                 theVector The translation vector.
7175                 theCopy Flag used to translate object itself or create a copy.
7176
7177             Returns: 
7178                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7179                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7180             """
7181             if theCopy:
7182                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7183             else:
7184                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7185             RaiseIfFailed("TranslateVector", self.TrsfOp)
7186             return anObj
7187
7188         ## Translate the given object along the given vector,
7189         #  creating its copy before the translation.
7190         #  @param theObject The object to be translated.
7191         #  @param theVector The translation vector.
7192         #  @param theName Object name; when specified, this parameter is used
7193         #         for result publication in the study. Otherwise, if automatic
7194         #         publication is switched on, default value is used for result name.
7195         #
7196         #  @return New GEOM.GEOM_Object, containing the translated object.
7197         #
7198         #  @ref tui_translation "Example"
7199         def MakeTranslationVector(self, theObject, theVector, theName=None):
7200             """
7201             Translate the given object along the given vector,
7202             creating its copy before the translation.
7203
7204             Parameters: 
7205                 theObject The object to be translated.
7206                 theVector The translation vector.
7207                 theName Object name; when specified, this parameter is used
7208                         for result publication in the study. Otherwise, if automatic
7209                         publication is switched on, default value is used for result name.
7210
7211             Returns: 
7212                 New GEOM.GEOM_Object, containing the translated object.
7213             """
7214             # Example: see GEOM_TestAll.py
7215             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7216             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7217             self._autoPublish(anObj, theName, "translated")
7218             return anObj
7219
7220         ## Translate the given object along the given vector on given distance.
7221         #  @param theObject The object to be translated.
7222         #  @param theVector The translation vector.
7223         #  @param theDistance The translation distance.
7224         #  @param theCopy Flag used to translate object itself or create a copy.
7225         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7226         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7227         #
7228         #  @ref tui_translation "Example"
7229         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7230             """
7231             Translate the given object along the given vector on given distance.
7232
7233             Parameters: 
7234                 theObject The object to be translated.
7235                 theVector The translation vector.
7236                 theDistance The translation distance.
7237                 theCopy Flag used to translate object itself or create a copy.
7238
7239             Returns: 
7240                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7241                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7242             """
7243             # Example: see GEOM_TestAll.py
7244             theDistance,Parameters = ParseParameters(theDistance)
7245             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7246             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7247             anObj.SetParameters(Parameters)
7248             return anObj
7249
7250         ## Translate the given object along the given vector on given distance,
7251         #  creating its copy before the translation.
7252         #  @param theObject The object to be translated.
7253         #  @param theVector The translation vector.
7254         #  @param theDistance The translation distance.
7255         #  @param theName Object name; when specified, this parameter is used
7256         #         for result publication in the study. Otherwise, if automatic
7257         #         publication is switched on, default value is used for result name.
7258         #
7259         #  @return New GEOM.GEOM_Object, containing the translated object.
7260         #
7261         #  @ref tui_translation "Example"
7262         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7263             """
7264             Translate the given object along the given vector on given distance,
7265             creating its copy before the translation.
7266
7267             Parameters:
7268                 theObject The object to be translated.
7269                 theVector The translation vector.
7270                 theDistance The translation distance.
7271                 theName Object name; when specified, this parameter is used
7272                         for result publication in the study. Otherwise, if automatic
7273                         publication is switched on, default value is used for result name.
7274
7275             Returns: 
7276                 New GEOM.GEOM_Object, containing the translated object.
7277             """
7278             # Example: see GEOM_TestAll.py
7279             theDistance,Parameters = ParseParameters(theDistance)
7280             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7281             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7282             anObj.SetParameters(Parameters)
7283             self._autoPublish(anObj, theName, "translated")
7284             return anObj
7285
7286         ## Rotate the given object around the given axis on the given angle.
7287         #  @param theObject The object to be rotated.
7288         #  @param theAxis Rotation axis.
7289         #  @param theAngle Rotation angle in radians.
7290         #  @param theCopy Flag used to rotate object itself or create a copy.
7291         #
7292         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7293         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7294         #
7295         #  @ref tui_rotation "Example"
7296         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7297             """
7298             Rotate the given object around the given axis on the given angle.
7299
7300             Parameters:
7301                 theObject The object to be rotated.
7302                 theAxis Rotation axis.
7303                 theAngle Rotation angle in radians.
7304                 theCopy Flag used to rotate object itself or create a copy.
7305
7306             Returns:
7307                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7308                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7309             """
7310             # Example: see GEOM_TestAll.py
7311             flag = False
7312             if isinstance(theAngle,str):
7313                 flag = True
7314             theAngle, Parameters = ParseParameters(theAngle)
7315             if flag:
7316                 theAngle = theAngle*math.pi/180.0
7317             if theCopy:
7318                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7319             else:
7320                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7321             RaiseIfFailed("Rotate", self.TrsfOp)
7322             anObj.SetParameters(Parameters)
7323             return anObj
7324
7325         ## Rotate the given object around the given axis
7326         #  on the given angle, creating its copy before the rotatation.
7327         #  @param theObject The object to be rotated.
7328         #  @param theAxis Rotation axis.
7329         #  @param theAngle Rotation angle in radians.
7330         #  @param theName Object name; when specified, this parameter is used
7331         #         for result publication in the study. Otherwise, if automatic
7332         #         publication is switched on, default value is used for result name.
7333         #
7334         #  @return New GEOM.GEOM_Object, containing the rotated object.
7335         #
7336         #  @ref tui_rotation "Example"
7337         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7338             """
7339             Rotate the given object around the given axis
7340             on the given angle, creating its copy before the rotatation.
7341
7342             Parameters:
7343                 theObject The object to be rotated.
7344                 theAxis Rotation axis.
7345                 theAngle Rotation angle in radians.
7346                 theName Object name; when specified, this parameter is used
7347                         for result publication in the study. Otherwise, if automatic
7348                         publication is switched on, default value is used for result name.
7349
7350             Returns:
7351                 New GEOM.GEOM_Object, containing the rotated object.
7352             """
7353             # Example: see GEOM_TestAll.py
7354             flag = False
7355             if isinstance(theAngle,str):
7356                 flag = True
7357             theAngle, Parameters = ParseParameters(theAngle)
7358             if flag:
7359                 theAngle = theAngle*math.pi/180.0
7360             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7361             RaiseIfFailed("RotateCopy", self.TrsfOp)
7362             anObj.SetParameters(Parameters)
7363             self._autoPublish(anObj, theName, "rotated")
7364             return anObj
7365
7366         ## Rotate given object around vector perpendicular to plane
7367         #  containing three points.
7368         #  @param theObject The object to be rotated.
7369         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7370         #  containing the three points.
7371         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7372         #  @param theCopy Flag used to rotate object itself or create a copy.
7373         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7374         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7375         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7376             """
7377             Rotate given object around vector perpendicular to plane
7378             containing three points.
7379
7380             Parameters:
7381                 theObject The object to be rotated.
7382                 theCentPoint central point  the axis is the vector perpendicular to the plane
7383                              containing the three points.
7384                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7385                 theCopy Flag used to rotate object itself or create a copy.
7386
7387             Returns:
7388                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7389                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7390             """
7391             if theCopy:
7392                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7393             else:
7394                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7395             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7396             return anObj
7397
7398         ## Rotate given object around vector perpendicular to plane
7399         #  containing three points, creating its copy before the rotatation.
7400         #  @param theObject The object to be rotated.
7401         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7402         #  containing the three points.
7403         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7404         #  @param 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         #  @return New GEOM.GEOM_Object, containing the rotated object.
7409         #
7410         #  @ref tui_rotation "Example"
7411         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
7412             """
7413             Rotate given object around vector perpendicular to plane
7414             containing three points, creating its copy before the rotatation.
7415
7416             Parameters:
7417                 theObject The object to be rotated.
7418                 theCentPoint central point  the axis is the vector perpendicular to the plane
7419                              containing the three points.
7420                 thePoint1,thePoint2  in a perpendicular plane of the axis.
7421                 theName Object name; when specified, this parameter is used
7422                         for result publication in the study. Otherwise, if automatic
7423                         publication is switched on, default value is used for result name.
7424
7425             Returns:
7426                 New GEOM.GEOM_Object, containing the rotated object.
7427             """
7428             # Example: see GEOM_TestAll.py
7429             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7430             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
7431             self._autoPublish(anObj, theName, "rotated")
7432             return anObj
7433
7434         ## Scale the given object by the specified factor.
7435         #  @param theObject The object to be scaled.
7436         #  @param thePoint Center point for scaling.
7437         #                  Passing None for it means scaling relatively the origin of global CS.
7438         #  @param theFactor Scaling factor value.
7439         #  @param theCopy Flag used to scale object itself or create a copy.
7440         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7441         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7442         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
7443             """
7444             Scale the given object by the specified factor.
7445
7446             Parameters:
7447                 theObject The object to be scaled.
7448                 thePoint Center point for scaling.
7449                          Passing None for it means scaling relatively the origin of global CS.
7450                 theFactor Scaling factor value.
7451                 theCopy Flag used to scale object itself or create a copy.
7452
7453             Returns:    
7454                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7455                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7456             """
7457             # Example: see GEOM_TestAll.py
7458             theFactor, Parameters = ParseParameters(theFactor)
7459             if theCopy:
7460                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7461             else:
7462                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
7463             RaiseIfFailed("Scale", self.TrsfOp)
7464             anObj.SetParameters(Parameters)
7465             return anObj
7466
7467         ## Scale the given object by the factor, creating its copy before the scaling.
7468         #  @param theObject The object to be scaled.
7469         #  @param thePoint Center point for scaling.
7470         #                  Passing None for it means scaling relatively the origin of global CS.
7471         #  @param theFactor Scaling factor value.
7472         #  @param theName Object name; when specified, this parameter is used
7473         #         for result publication in the study. Otherwise, if automatic
7474         #         publication is switched on, default value is used for result name.
7475         #
7476         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7477         #
7478         #  @ref tui_scale "Example"
7479         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
7480             """
7481             Scale the given object by the factor, creating its copy before the scaling.
7482
7483             Parameters:
7484                 theObject The object to be scaled.
7485                 thePoint Center point for scaling.
7486                          Passing None for it means scaling relatively the origin of global CS.
7487                 theFactor Scaling factor value.
7488                 theName Object name; when specified, this parameter is used
7489                         for result publication in the study. Otherwise, if automatic
7490                         publication is switched on, default value is used for result name.
7491
7492             Returns:    
7493                 New GEOM.GEOM_Object, containing the scaled shape.
7494             """
7495             # Example: see GEOM_TestAll.py
7496             theFactor, Parameters = ParseParameters(theFactor)
7497             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7498             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
7499             anObj.SetParameters(Parameters)
7500             self._autoPublish(anObj, theName, "scaled")
7501             return anObj
7502
7503         ## Scale the given object by different factors along coordinate axes.
7504         #  @param theObject The object to be scaled.
7505         #  @param thePoint Center point for scaling.
7506         #                  Passing None for it means scaling relatively the origin of global CS.
7507         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7508         #  @param theCopy Flag used to scale object itself or create a copy.
7509         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7510         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7511         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
7512             """
7513             Scale the given object by different factors along coordinate axes.
7514
7515             Parameters:
7516                 theObject The object to be scaled.
7517                 thePoint Center point for scaling.
7518                             Passing None for it means scaling relatively the origin of global CS.
7519                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7520                 theCopy Flag used to scale object itself or create a copy.
7521
7522             Returns:    
7523                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7524                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7525             """
7526             # Example: see GEOM_TestAll.py
7527             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7528             if theCopy:
7529                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7530                                                             theFactorX, theFactorY, theFactorZ)
7531             else:
7532                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
7533                                                         theFactorX, theFactorY, theFactorZ)
7534             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
7535             anObj.SetParameters(Parameters)
7536             return anObj
7537
7538         ## Scale the given object by different factors along coordinate axes,
7539         #  creating its copy before the scaling.
7540         #  @param theObject The object to be scaled.
7541         #  @param thePoint Center point for scaling.
7542         #                  Passing None for it means scaling relatively the origin of global CS.
7543         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7544         #  @param 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         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7549         #
7550         #  @ref swig_scale "Example"
7551         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
7552             """
7553             Scale the given object by different factors along coordinate axes,
7554             creating its copy before the scaling.
7555
7556             Parameters:
7557                 theObject The object to be scaled.
7558                 thePoint Center point for scaling.
7559                             Passing None for it means scaling relatively the origin of global CS.
7560                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7561                 theName Object name; when specified, this parameter is used
7562                         for result publication in the study. Otherwise, if automatic
7563                         publication is switched on, default value is used for result name.
7564
7565             Returns:
7566                 New GEOM.GEOM_Object, containing the scaled shape.
7567             """
7568             # Example: see GEOM_TestAll.py
7569             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7570             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7571                                                         theFactorX, theFactorY, theFactorZ)
7572             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
7573             anObj.SetParameters(Parameters)
7574             self._autoPublish(anObj, theName, "scaled")
7575             return anObj
7576
7577         ## Mirror an object relatively the given plane.
7578         #  @param theObject The object to be mirrored.
7579         #  @param thePlane Plane of symmetry.
7580         #  @param theCopy Flag used to mirror object itself or create a copy.
7581         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7582         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7583         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
7584             """
7585             Mirror an object relatively the given plane.
7586
7587             Parameters:
7588                 theObject The object to be mirrored.
7589                 thePlane Plane of symmetry.
7590                 theCopy Flag used to mirror object itself or create a copy.
7591
7592             Returns:
7593                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7594                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7595             """
7596             if theCopy:
7597                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7598             else:
7599                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
7600             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
7601             return anObj
7602
7603         ## Create an object, symmetrical
7604         #  to the given one relatively the given plane.
7605         #  @param theObject The object to be mirrored.
7606         #  @param thePlane Plane of symmetry.
7607         #  @param theName Object name; when specified, this parameter is used
7608         #         for result publication in the study. Otherwise, if automatic
7609         #         publication is switched on, default value is used for result name.
7610         #
7611         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7612         #
7613         #  @ref tui_mirror "Example"
7614         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
7615             """
7616             Create an object, symmetrical to the given one relatively the given plane.
7617
7618             Parameters:
7619                 theObject The object to be mirrored.
7620                 thePlane Plane of symmetry.
7621                 theName Object name; when specified, this parameter is used
7622                         for result publication in the study. Otherwise, if automatic
7623                         publication is switched on, default value is used for result name.
7624
7625             Returns:
7626                 New GEOM.GEOM_Object, containing the mirrored shape.
7627             """
7628             # Example: see GEOM_TestAll.py
7629             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7630             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
7631             self._autoPublish(anObj, theName, "mirrored")
7632             return anObj
7633
7634         ## Mirror an object relatively the given axis.
7635         #  @param theObject The object to be mirrored.
7636         #  @param theAxis Axis of symmetry.
7637         #  @param theCopy Flag used to mirror object itself or create a copy.
7638         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7639         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7640         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
7641             """
7642             Mirror an object relatively the given axis.
7643
7644             Parameters:
7645                 theObject The object to be mirrored.
7646                 theAxis Axis of symmetry.
7647                 theCopy Flag used to mirror object itself or create a copy.
7648
7649             Returns:
7650                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7651                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7652             """
7653             if theCopy:
7654                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7655             else:
7656                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
7657             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
7658             return anObj
7659
7660         ## Create an object, symmetrical
7661         #  to the given one relatively the given axis.
7662         #  @param theObject The object to be mirrored.
7663         #  @param theAxis Axis of symmetry.
7664         #  @param theName Object name; when specified, this parameter is used
7665         #         for result publication in the study. Otherwise, if automatic
7666         #         publication is switched on, default value is used for result name.
7667         #
7668         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7669         #
7670         #  @ref tui_mirror "Example"
7671         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
7672             """
7673             Create an object, symmetrical to the given one relatively the given axis.
7674
7675             Parameters:
7676                 theObject The object to be mirrored.
7677                 theAxis Axis of symmetry.
7678                 theName Object name; when specified, this parameter is used
7679                         for result publication in the study. Otherwise, if automatic
7680                         publication is switched on, default value is used for result name.
7681
7682             Returns: 
7683                 New GEOM.GEOM_Object, containing the mirrored shape.
7684             """
7685             # Example: see GEOM_TestAll.py
7686             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7687             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
7688             self._autoPublish(anObj, theName, "mirrored")
7689             return anObj
7690
7691         ## Mirror an object relatively the given point.
7692         #  @param theObject The object to be mirrored.
7693         #  @param thePoint Point of symmetry.
7694         #  @param theCopy Flag used to mirror object itself or create a copy.
7695         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7696         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7697         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
7698             """
7699             Mirror an object relatively the given point.
7700
7701             Parameters:
7702                 theObject The object to be mirrored.
7703                 thePoint Point of symmetry.
7704                 theCopy Flag used to mirror object itself or create a copy.
7705
7706             Returns:
7707                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7708                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7709             """
7710             # Example: see GEOM_TestAll.py
7711             if theCopy:
7712                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7713             else:
7714                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
7715             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
7716             return anObj
7717
7718         ## Create an object, symmetrical
7719         #  to the given one relatively the given point.
7720         #  @param theObject The object to be mirrored.
7721         #  @param thePoint Point of symmetry.
7722         #  @param theName Object name; when specified, this parameter is used
7723         #         for result publication in the study. Otherwise, if automatic
7724         #         publication is switched on, default value is used for result name.
7725         #
7726         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7727         #
7728         #  @ref tui_mirror "Example"
7729         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
7730             """
7731             Create an object, symmetrical
7732             to the given one relatively the given point.
7733
7734             Parameters:
7735                 theObject The object to be mirrored.
7736                 thePoint Point of symmetry.
7737                 theName Object name; when specified, this parameter is used
7738                         for result publication in the study. Otherwise, if automatic
7739                         publication is switched on, default value is used for result name.
7740
7741             Returns:  
7742                 New GEOM.GEOM_Object, containing the mirrored shape.
7743             """
7744             # Example: see GEOM_TestAll.py
7745             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7746             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
7747             self._autoPublish(anObj, theName, "mirrored")
7748             return anObj
7749
7750         ## Modify the location of the given object.
7751         #  @param theObject The object to be displaced.
7752         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7753         #                     If \a theStartLCS is NULL, displacement
7754         #                     will be performed from global CS.\n
7755         #                     If \a theObject itself is used as \a theStartLCS,
7756         #                     its location will be changed to \a theEndLCS.
7757         #  @param theEndLCS Coordinate system to perform displacement to it.
7758         #  @param theCopy Flag used to displace object itself or create a copy.
7759         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7760         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
7761         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
7762             """
7763             Modify the Location of the given object by LCS, creating its copy before the setting.
7764
7765             Parameters:
7766                 theObject The object to be displaced.
7767                 theStartLCS Coordinate system to perform displacement from it.
7768                             If theStartLCS is NULL, displacement
7769                             will be performed from global CS.
7770                             If theObject itself is used as theStartLCS,
7771                             its location will be changed to theEndLCS.
7772                 theEndLCS Coordinate system to perform displacement to it.
7773                 theCopy Flag used to displace object itself or create a copy.
7774
7775             Returns:
7776                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7777                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
7778             """
7779             # Example: see GEOM_TestAll.py
7780             if theCopy:
7781                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7782             else:
7783                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
7784             RaiseIfFailed("Displace", self.TrsfOp)
7785             return anObj
7786
7787         ## Modify the Location of the given object by LCS,
7788         #  creating its copy before the setting.
7789         #  @param theObject The object to be displaced.
7790         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7791         #                     If \a theStartLCS is NULL, displacement
7792         #                     will be performed from global CS.\n
7793         #                     If \a theObject itself is used as \a theStartLCS,
7794         #                     its location will be changed to \a theEndLCS.
7795         #  @param theEndLCS Coordinate system to perform displacement to it.
7796         #  @param theName Object name; when specified, this parameter is used
7797         #         for result publication in the study. Otherwise, if automatic
7798         #         publication is switched on, default value is used for result name.
7799         #
7800         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7801         #
7802         #  @ref tui_modify_location "Example"
7803         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
7804             """
7805             Modify the Location of the given object by LCS, creating its copy before the setting.
7806
7807             Parameters:
7808                 theObject The object to be displaced.
7809                 theStartLCS Coordinate system to perform displacement from it.
7810                             If theStartLCS is NULL, displacement
7811                             will be performed from global CS.
7812                             If theObject itself is used as theStartLCS,
7813                             its location will be changed to theEndLCS.
7814                 theEndLCS Coordinate system to perform displacement to it.
7815                 theName Object name; when specified, this parameter is used
7816                         for result publication in the study. Otherwise, if automatic
7817                         publication is switched on, default value is used for result name.
7818
7819             Returns:  
7820                 New GEOM.GEOM_Object, containing the displaced shape.
7821
7822             Example of usage:
7823                 # create local coordinate systems
7824                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
7825                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
7826                 # modify the location of the given object
7827                 position = geompy.MakePosition(cylinder, cs1, cs2)
7828             """
7829             # Example: see GEOM_TestAll.py
7830             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7831             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
7832             self._autoPublish(anObj, theName, "displaced")
7833             return anObj
7834
7835         ## Modify the Location of the given object by Path.
7836         #  @param  theObject The object to be displaced.
7837         #  @param  thePath Wire or Edge along that the object will be translated.
7838         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
7839         #  @param  theCopy is to create a copy objects if true.
7840         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
7841         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
7842         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
7843         #
7844         #  @ref tui_modify_location "Example"
7845         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
7846             """
7847             Modify the Location of the given object by Path.
7848
7849             Parameters:
7850                  theObject The object to be displaced.
7851                  thePath Wire or Edge along that the object will be translated.
7852                  theDistance progress of Path (0 = start location, 1 = end of path location).
7853                  theCopy is to create a copy objects if true.
7854                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7855
7856             Returns:  
7857                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
7858                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
7859
7860             Example of usage:
7861                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
7862             """
7863             # Example: see GEOM_TestAll.py
7864             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
7865             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7866             return anObj
7867
7868         ## Modify the Location of the given object by Path, creating its copy before the operation.
7869         #  @param theObject The object to be displaced.
7870         #  @param thePath Wire or Edge along that the object will be translated.
7871         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
7872         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
7873         #  @param theName Object name; when specified, this parameter is used
7874         #         for result publication in the study. Otherwise, if automatic
7875         #         publication is switched on, default value is used for result name.
7876         #
7877         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7878         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
7879             """
7880             Modify the Location of the given object by Path, creating its copy before the operation.
7881
7882             Parameters:
7883                  theObject The object to be displaced.
7884                  thePath Wire or Edge along that the object will be translated.
7885                  theDistance progress of Path (0 = start location, 1 = end of path location).
7886                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7887                  theName Object name; when specified, this parameter is used
7888                          for result publication in the study. Otherwise, if automatic
7889                          publication is switched on, default value is used for result name.
7890
7891             Returns:  
7892                 New GEOM.GEOM_Object, containing the displaced shape.
7893             """
7894             # Example: see GEOM_TestAll.py
7895             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
7896             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7897             self._autoPublish(anObj, theName, "displaced")
7898             return anObj
7899
7900         ## Offset given shape.
7901         #  @param theObject The base object for the offset.
7902         #  @param theOffset Offset value.
7903         #  @param theCopy Flag used to offset object itself or create a copy.
7904         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7905         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
7906         def Offset(self, theObject, theOffset, theCopy=False):
7907             """
7908             Offset given shape.
7909
7910             Parameters:
7911                 theObject The base object for the offset.
7912                 theOffset Offset value.
7913                 theCopy Flag used to offset object itself or create a copy.
7914
7915             Returns: 
7916                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7917                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
7918             """
7919             theOffset, Parameters = ParseParameters(theOffset)
7920             if theCopy:
7921                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7922             else:
7923                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
7924             RaiseIfFailed("Offset", self.TrsfOp)
7925             anObj.SetParameters(Parameters)
7926             return anObj
7927
7928         ## Create new object as offset of the given one.
7929         #  @param theObject The base object for the offset.
7930         #  @param theOffset Offset value.
7931         #  @param theName Object name; when specified, this parameter is used
7932         #         for result publication in the study. Otherwise, if automatic
7933         #         publication is switched on, default value is used for result name.
7934         #
7935         #  @return New GEOM.GEOM_Object, containing the offset object.
7936         #
7937         #  @ref tui_offset "Example"
7938         def MakeOffset(self, theObject, theOffset, theName=None):
7939             """
7940             Create new object as offset of the given one.
7941
7942             Parameters:
7943                 theObject The base object for the offset.
7944                 theOffset Offset value.
7945                 theName Object name; when specified, this parameter is used
7946                         for result publication in the study. Otherwise, if automatic
7947                         publication is switched on, default value is used for result name.
7948
7949             Returns:  
7950                 New GEOM.GEOM_Object, containing the offset object.
7951
7952             Example of usage:
7953                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
7954                  # create a new object as offset of the given object
7955                  offset = geompy.MakeOffset(box, 70.)
7956             """
7957             # Example: see GEOM_TestAll.py
7958             theOffset, Parameters = ParseParameters(theOffset)
7959             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7960             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
7961             anObj.SetParameters(Parameters)
7962             self._autoPublish(anObj, theName, "offset")
7963             return anObj
7964
7965         ## Create new object as projection of the given one on a 2D surface.
7966         #  @param theSource The source object for the projection. It can be a point, edge or wire.
7967         #  @param theTarget The target object. It can be planar or cylindrical face.
7968         #  @param theName Object name; when specified, this parameter is used
7969         #         for result publication in the study. Otherwise, if automatic
7970         #         publication is switched on, default value is used for result name.
7971         #
7972         #  @return New GEOM.GEOM_Object, containing the projection.
7973         #
7974         #  @ref tui_projection "Example"
7975         def MakeProjection(self, theSource, theTarget, theName=None):
7976             """
7977             Create new object as projection of the given one on a 2D surface.
7978
7979             Parameters:
7980                 theSource The source object for the projection. It can be a point, edge or wire.
7981                 theTarget The target object. It can be planar or cylindrical face.
7982                 theName Object name; when specified, this parameter is used
7983                         for result publication in the study. Otherwise, if automatic
7984                         publication is switched on, default value is used for result name.
7985
7986             Returns:  
7987                 New GEOM.GEOM_Object, containing the projection.
7988             """
7989             # Example: see GEOM_TestAll.py
7990             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
7991             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
7992             self._autoPublish(anObj, theName, "projection")
7993             return anObj
7994
7995         # -----------------------------------------------------------------------------
7996         # Patterns
7997         # -----------------------------------------------------------------------------
7998
7999         ## Translate the given object along the given vector a given number times
8000         #  @param theObject The object to be translated.
8001         #  @param theVector Direction of the translation. DX if None.
8002         #  @param theStep Distance to translate on.
8003         #  @param theNbTimes Quantity of translations to be done.
8004         #  @param 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         #  @return New GEOM.GEOM_Object, containing compound of all
8009         #          the shapes, obtained after each translation.
8010         #
8011         #  @ref tui_multi_translation "Example"
8012         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
8013             """
8014             Translate the given object along the given vector a given number times
8015
8016             Parameters:
8017                 theObject The object to be translated.
8018                 theVector Direction of the translation. DX if None.
8019                 theStep Distance to translate on.
8020                 theNbTimes Quantity of translations to be done.
8021                 theName Object name; when specified, this parameter is used
8022                         for result publication in the study. Otherwise, if automatic
8023                         publication is switched on, default value is used for result name.
8024
8025             Returns:     
8026                 New GEOM.GEOM_Object, containing compound of all
8027                 the shapes, obtained after each translation.
8028
8029             Example of usage:
8030                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
8031             """
8032             # Example: see GEOM_TestAll.py
8033             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
8034             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
8035             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
8036             anObj.SetParameters(Parameters)
8037             self._autoPublish(anObj, theName, "multitranslation")
8038             return anObj
8039
8040         ## Conseqently apply two specified translations to theObject specified number of times.
8041         #  @param theObject The object to be translated.
8042         #  @param theVector1 Direction of the first translation. DX if None.
8043         #  @param theStep1 Step of the first translation.
8044         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
8045         #  @param theVector2 Direction of the second translation. DY if None.
8046         #  @param theStep2 Step of the second translation.
8047         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
8048         #  @param theName Object name; when specified, this parameter is used
8049         #         for result publication in the study. Otherwise, if automatic
8050         #         publication is switched on, default value is used for result name.
8051         #
8052         #  @return New GEOM.GEOM_Object, containing compound of all
8053         #          the shapes, obtained after each translation.
8054         #
8055         #  @ref tui_multi_translation "Example"
8056         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8057                                    theVector2, theStep2, theNbTimes2, theName=None):
8058             """
8059             Conseqently apply two specified translations to theObject specified number of times.
8060
8061             Parameters:
8062                 theObject The object to be translated.
8063                 theVector1 Direction of the first translation. DX if None.
8064                 theStep1 Step of the first translation.
8065                 theNbTimes1 Quantity of translations to be done along theVector1.
8066                 theVector2 Direction of the second translation. DY if None.
8067                 theStep2 Step of the second translation.
8068                 theNbTimes2 Quantity of translations to be done along theVector2.
8069                 theName Object name; when specified, this parameter is used
8070                         for result publication in the study. Otherwise, if automatic
8071                         publication is switched on, default value is used for result name.
8072
8073             Returns:
8074                 New GEOM.GEOM_Object, containing compound of all
8075                 the shapes, obtained after each translation.
8076
8077             Example of usage:
8078                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8079             """
8080             # Example: see GEOM_TestAll.py
8081             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8082             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8083                                                  theVector2, theStep2, theNbTimes2)
8084             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8085             anObj.SetParameters(Parameters)
8086             self._autoPublish(anObj, theName, "multitranslation")
8087             return anObj
8088
8089         ## Rotate the given object around the given axis a given number times.
8090         #  Rotation angle will be 2*PI/theNbTimes.
8091         #  @param theObject The object to be rotated.
8092         #  @param theAxis The rotation axis. DZ if None.
8093         #  @param theNbTimes Quantity of rotations to be done.
8094         #  @param 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         #  @return New GEOM.GEOM_Object, containing compound of all the
8099         #          shapes, obtained after each rotation.
8100         #
8101         #  @ref tui_multi_rotation "Example"
8102         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8103             """
8104             Rotate the given object around the given axis a given number times.
8105             Rotation angle will be 2*PI/theNbTimes.
8106
8107             Parameters:
8108                 theObject The object to be rotated.
8109                 theAxis The rotation axis. DZ if None.
8110                 theNbTimes Quantity of rotations to be done.
8111                 theName Object name; when specified, this parameter is used
8112                         for result publication in the study. Otherwise, if automatic
8113                         publication is switched on, default value is used for result name.
8114
8115             Returns:     
8116                 New GEOM.GEOM_Object, containing compound of all the
8117                 shapes, obtained after each rotation.
8118
8119             Example of usage:
8120                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8121             """
8122             # Example: see GEOM_TestAll.py
8123             theNbTimes, Parameters = ParseParameters(theNbTimes)
8124             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8125             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8126             anObj.SetParameters(Parameters)
8127             self._autoPublish(anObj, theName, "multirotation")
8128             return anObj
8129
8130         ## Rotate the given object around the given axis
8131         #  a given number times on the given angle.
8132         #  @param theObject The object to be rotated.
8133         #  @param theAxis The rotation axis. DZ if None.
8134         #  @param theAngleStep Rotation angle in radians.
8135         #  @param theNbTimes Quantity of rotations to be done.
8136         #  @param theName Object name; when specified, this parameter is used
8137         #         for result publication in the study. Otherwise, if automatic
8138         #         publication is switched on, default value is used for result name.
8139         #
8140         #  @return New GEOM.GEOM_Object, containing compound of all the
8141         #          shapes, obtained after each rotation.
8142         #
8143         #  @ref tui_multi_rotation "Example"
8144         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8145             """
8146             Rotate the given object around the given axis
8147             a given number times on the given angle.
8148
8149             Parameters:
8150                 theObject The object to be rotated.
8151                 theAxis The rotation axis. DZ if None.
8152                 theAngleStep Rotation angle in radians.
8153                 theNbTimes Quantity of rotations to be done.
8154                 theName Object name; when specified, this parameter is used
8155                         for result publication in the study. Otherwise, if automatic
8156                         publication is switched on, default value is used for result name.
8157
8158             Returns:     
8159                 New GEOM.GEOM_Object, containing compound of all the
8160                 shapes, obtained after each rotation.
8161
8162             Example of usage:
8163                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8164             """
8165             # Example: see GEOM_TestAll.py
8166             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8167             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8168             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8169             anObj.SetParameters(Parameters)
8170             self._autoPublish(anObj, theName, "multirotation")
8171             return anObj
8172
8173         ## Rotate the given object around the given axis a given
8174         #  number times and multi-translate each rotation result.
8175         #  Rotation angle will be 2*PI/theNbTimes1.
8176         #  Translation direction passes through center of gravity
8177         #  of rotated shape and its projection on the rotation axis.
8178         #  @param theObject The object to be rotated.
8179         #  @param theAxis Rotation axis. DZ if None.
8180         #  @param theNbTimes1 Quantity of rotations to be done.
8181         #  @param theRadialStep Translation distance.
8182         #  @param theNbTimes2 Quantity of translations to be done.
8183         #  @param theName Object name; when specified, this parameter is used
8184         #         for result publication in the study. Otherwise, if automatic
8185         #         publication is switched on, default value is used for result name.
8186         #
8187         #  @return New GEOM.GEOM_Object, containing compound of all the
8188         #          shapes, obtained after each transformation.
8189         #
8190         #  @ref tui_multi_rotation "Example"
8191         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8192             """
8193             Rotate the given object around the
8194             given axis on the given angle a given number
8195             times and multi-translate each rotation result.
8196             Translation direction passes through center of gravity
8197             of rotated shape and its projection on the rotation axis.
8198
8199             Parameters:
8200                 theObject The object to be rotated.
8201                 theAxis Rotation axis. DZ if None.
8202                 theNbTimes1 Quantity of rotations to be done.
8203                 theRadialStep Translation distance.
8204                 theNbTimes2 Quantity of translations to be done.
8205                 theName Object name; when specified, this parameter is used
8206                         for result publication in the study. Otherwise, if automatic
8207                         publication is switched on, default value is used for result name.
8208
8209             Returns:    
8210                 New GEOM.GEOM_Object, containing compound of all the
8211                 shapes, obtained after each transformation.
8212
8213             Example of usage:
8214                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8215             """
8216             # Example: see GEOM_TestAll.py
8217             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8218             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8219             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8220             anObj.SetParameters(Parameters)
8221             self._autoPublish(anObj, theName, "multirotation")
8222             return anObj
8223
8224         ## Rotate the given object around the
8225         #  given axis on the given angle a given number
8226         #  times and multi-translate each rotation result.
8227         #  Translation direction passes through center of gravity
8228         #  of rotated shape and its projection on the rotation axis.
8229         #  @param theObject The object to be rotated.
8230         #  @param theAxis Rotation axis. DZ if None.
8231         #  @param theAngleStep Rotation angle in radians.
8232         #  @param theNbTimes1 Quantity of rotations to be done.
8233         #  @param theRadialStep Translation distance.
8234         #  @param theNbTimes2 Quantity of translations to be done.
8235         #  @param theName Object name; when specified, this parameter is used
8236         #         for result publication in the study. Otherwise, if automatic
8237         #         publication is switched on, default value is used for result name.
8238         #
8239         #  @return New GEOM.GEOM_Object, containing compound of all the
8240         #          shapes, obtained after each transformation.
8241         #
8242         #  @ref tui_multi_rotation "Example"
8243         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8244             """
8245             Rotate the given object around the
8246             given axis on the given angle a given number
8247             times and multi-translate each rotation result.
8248             Translation direction passes through center of gravity
8249             of rotated shape and its projection on the rotation axis.
8250
8251             Parameters:
8252                 theObject The object to be rotated.
8253                 theAxis Rotation axis. DZ if None.
8254                 theAngleStep Rotation angle in radians.
8255                 theNbTimes1 Quantity of rotations to be done.
8256                 theRadialStep Translation distance.
8257                 theNbTimes2 Quantity of translations to be done.
8258                 theName Object name; when specified, this parameter is used
8259                         for result publication in the study. Otherwise, if automatic
8260                         publication is switched on, default value is used for result name.
8261
8262             Returns:    
8263                 New GEOM.GEOM_Object, containing compound of all the
8264                 shapes, obtained after each transformation.
8265
8266             Example of usage:
8267                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8268             """
8269             # Example: see GEOM_TestAll.py
8270             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8271             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8272             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8273             anObj.SetParameters(Parameters)
8274             self._autoPublish(anObj, theName, "multirotation")
8275             return anObj
8276
8277         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8278         #
8279         #  @ref swig_MakeMultiRotation "Example"
8280         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8281             """
8282             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8283
8284             Example of usage:
8285                 pz = geompy.MakeVertex(0, 0, 100)
8286                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8287                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8288             """
8289             # Example: see GEOM_TestOthers.py
8290             aVec = self.MakeLine(aPoint,aDir)
8291             # note: auto-publishing is done in self.MultiRotate1D()
8292             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8293             return anObj
8294
8295         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8296         #
8297         #  @ref swig_MakeMultiRotation "Example"
8298         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8299             """
8300             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8301
8302             Example of usage:
8303                 pz = geompy.MakeVertex(0, 0, 100)
8304                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8305                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8306             """
8307             # Example: see GEOM_TestOthers.py
8308             aVec = self.MakeLine(aPoint,aDir)
8309             # note: auto-publishing is done in self.MultiRotate1D()
8310             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8311             return anObj
8312
8313         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8314         #
8315         #  @ref swig_MakeMultiRotation "Example"
8316         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8317             """
8318             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8319             
8320             Example of usage:
8321                 pz = geompy.MakeVertex(0, 0, 100)
8322                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8323                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8324             """
8325             # Example: see GEOM_TestOthers.py
8326             aVec = self.MakeLine(aPoint,aDir)
8327             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8328             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8329             return anObj
8330
8331         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8332         #
8333         #  @ref swig_MakeMultiRotation "Example"
8334         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8335             """
8336             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8337             
8338             Example of usage:
8339                 pz = geompy.MakeVertex(0, 0, 100)
8340                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8341                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8342             """
8343             # Example: see GEOM_TestOthers.py
8344             aVec = self.MakeLine(aPoint,aDir)
8345             # note: auto-publishing is done in self.MultiRotate2D()
8346             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8347             return anObj
8348
8349         # end of l3_transform
8350         ## @}
8351
8352         ## @addtogroup l3_transform_d
8353         ## @{
8354
8355         ## Deprecated method. Use MultiRotate1DNbTimes instead.
8356         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
8357             """
8358             Deprecated method. Use MultiRotate1DNbTimes instead.
8359             """
8360             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
8361             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
8362
8363         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8364         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8365         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
8366             """
8367             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8368             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8369
8370             Example of usage:
8371                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8372             """
8373             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
8374             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
8375             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
8376             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
8377             anObj.SetParameters(Parameters)
8378             self._autoPublish(anObj, theName, "multirotation")
8379             return anObj
8380
8381         ## The same, as MultiRotate1D(), but axis is given by direction and point
8382         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8383         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8384             """
8385             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
8386             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8387
8388             Example of usage:
8389                 pz = geompy.MakeVertex(0, 0, 100)
8390                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8391                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
8392             """
8393             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
8394             aVec = self.MakeLine(aPoint,aDir)
8395             # note: auto-publishing is done in self.MultiRotate1D()
8396             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
8397             return anObj
8398
8399         ## The same, as MultiRotate2D(), but axis is given by direction and point
8400         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8401         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8402             """
8403             The same, as MultiRotate2D(), but axis is given by direction and point
8404             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8405             
8406             Example of usage:
8407                 pz = geompy.MakeVertex(0, 0, 100)
8408                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8409                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
8410             """
8411             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
8412             aVec = self.MakeLine(aPoint,aDir)
8413             # note: auto-publishing is done in self.MultiRotate2D()
8414             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8415             return anObj
8416
8417         # end of l3_transform_d
8418         ## @}
8419
8420         ## @addtogroup l3_local
8421         ## @{
8422
8423         ## Perform a fillet on all edges of the given shape.
8424         #  @param theShape Shape, to perform fillet on.
8425         #  @param theR Fillet radius.
8426         #  @param theName Object name; when specified, this parameter is used
8427         #         for result publication in the study. Otherwise, if automatic
8428         #         publication is switched on, default value is used for result name.
8429         #
8430         #  @return New GEOM.GEOM_Object, containing the result shape.
8431         #
8432         #  @ref tui_fillet "Example 1"
8433         #  \n @ref swig_MakeFilletAll "Example 2"
8434         def MakeFilletAll(self, theShape, theR, theName=None):
8435             """
8436             Perform a fillet on all edges of the given shape.
8437
8438             Parameters:
8439                 theShape Shape, to perform fillet on.
8440                 theR Fillet radius.
8441                 theName Object name; when specified, this parameter is used
8442                         for result publication in the study. Otherwise, if automatic
8443                         publication is switched on, default value is used for result name.
8444
8445             Returns: 
8446                 New GEOM.GEOM_Object, containing the result shape.
8447
8448             Example of usage: 
8449                filletall = geompy.MakeFilletAll(prism, 10.)
8450             """
8451             # Example: see GEOM_TestOthers.py
8452             theR,Parameters = ParseParameters(theR)
8453             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
8454             RaiseIfFailed("MakeFilletAll", self.LocalOp)
8455             anObj.SetParameters(Parameters)
8456             self._autoPublish(anObj, theName, "fillet")
8457             return anObj
8458
8459         ## Perform a fillet on the specified edges/faces of the given shape
8460         #  @param theShape Shape, to perform fillet on.
8461         #  @param theR Fillet radius.
8462         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
8463         #  @param theListShapes Global indices of edges/faces to perform fillet on.
8464         #  @param theName Object name; when specified, this parameter is used
8465         #         for result publication in the study. Otherwise, if automatic
8466         #         publication is switched on, default value is used for result name.
8467         #
8468         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8469         #
8470         #  @return New GEOM.GEOM_Object, containing the result shape.
8471         #
8472         #  @ref tui_fillet "Example"
8473         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
8474             """
8475             Perform a fillet on the specified edges/faces of the given shape
8476
8477             Parameters:
8478                 theShape Shape, to perform fillet on.
8479                 theR Fillet radius.
8480                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
8481                 theListShapes Global indices of edges/faces to perform fillet on.
8482                 theName Object name; when specified, this parameter is used
8483                         for result publication in the study. Otherwise, if automatic
8484                         publication is switched on, default value is used for result name.
8485
8486             Note:
8487                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8488
8489             Returns: 
8490                 New GEOM.GEOM_Object, containing the result shape.
8491
8492             Example of usage:
8493                 # get the list of IDs (IDList) for the fillet
8494                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8495                 IDlist_e = []
8496                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8497                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8498                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8499                 # make a fillet on the specified edges of the given shape
8500                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
8501             """
8502             # Example: see GEOM_TestAll.py
8503             theR,Parameters = ParseParameters(theR)
8504             anObj = None
8505             if theShapeType == self.ShapeType["EDGE"]:
8506                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
8507                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
8508             else:
8509                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
8510                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
8511             anObj.SetParameters(Parameters)
8512             self._autoPublish(anObj, theName, "fillet")
8513             return anObj
8514
8515         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
8516         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
8517             """
8518             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
8519
8520             Example of usage:
8521                 # get the list of IDs (IDList) for the fillet
8522                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8523                 IDlist_e = []
8524                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8525                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8526                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8527                 # make a fillet on the specified edges of the given shape
8528                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
8529             """
8530             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
8531             anObj = None
8532             if theShapeType == self.ShapeType["EDGE"]:
8533                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
8534                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
8535             else:
8536                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
8537                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
8538             anObj.SetParameters(Parameters)
8539             self._autoPublish(anObj, theName, "fillet")
8540             return anObj
8541
8542         ## Perform a fillet on the specified edges of the given shape
8543         #  @param theShape  Wire Shape to perform fillet on.
8544         #  @param theR  Fillet radius.
8545         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8546         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
8547         #    \note The list of vertices could be empty,
8548         #          in this case fillet will done done at all vertices in wire
8549         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
8550         #         by the length of the edges, nearest to the fillet vertex.
8551         #         But sometimes the next edge is C1 continuous with the one, nearest to
8552         #         the fillet point, and such two (or more) edges can be united to allow
8553         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
8554         #         thus ignoring the secant vertex (vertices).
8555         #  @param theName Object name; when specified, this parameter is used
8556         #         for result publication in the study. Otherwise, if automatic
8557         #         publication is switched on, default value is used for result name.
8558         #
8559         #  @return New GEOM.GEOM_Object, containing the result shape.
8560         #
8561         #  @ref tui_fillet2d "Example"
8562         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
8563             """
8564             Perform a fillet on the specified edges of the given shape
8565
8566             Parameters:
8567                 theShape  Wire Shape to perform fillet on.
8568                 theR  Fillet radius.
8569                 theListOfVertexes Global indices of vertexes to perform fillet on.
8570                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
8571                     by the length of the edges, nearest to the fillet vertex.
8572                     But sometimes the next edge is C1 continuous with the one, nearest to
8573                     the fillet point, and such two (or more) edges can be united to allow
8574                     bigger radius. Set this flag to TRUE to allow collinear edges union,
8575                     thus ignoring the secant vertex (vertices).
8576                 theName Object name; when specified, this parameter is used
8577                         for result publication in the study. Otherwise, if automatic
8578                         publication is switched on, default value is used for result name.
8579             Note:
8580                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8581
8582                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
8583
8584             Returns: 
8585                 New GEOM.GEOM_Object, containing the result shape.
8586
8587             Example of usage:  
8588                 # create wire
8589                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
8590                 # make fillet at given wire vertices with giver radius
8591                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
8592             """
8593             # Example: see GEOM_TestAll.py
8594             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
8595             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
8596             RaiseIfFailed("MakeFillet1D", self.LocalOp)
8597             anObj.SetParameters(Parameters)
8598             self._autoPublish(anObj, theName, "fillet")
8599             return anObj
8600
8601         ## Perform a fillet at the specified vertices of the given face/shell.
8602         #  @param theShape Face or Shell shape to perform fillet on.
8603         #  @param theR Fillet radius.
8604         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8605         #  @param theName Object name; when specified, this parameter is used
8606         #         for result publication in the study. Otherwise, if automatic
8607         #         publication is switched on, default value is used for result name.
8608         #
8609         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8610         #
8611         #  @return New GEOM.GEOM_Object, containing the result shape.
8612         #
8613         #  @ref tui_fillet2d "Example"
8614         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
8615             """
8616             Perform a fillet at the specified vertices of the given face/shell.
8617
8618             Parameters:
8619                 theShape  Face or Shell shape to perform fillet on.
8620                 theR  Fillet radius.
8621                 theListOfVertexes Global indices of vertexes to perform fillet on.
8622                 theName Object name; when specified, this parameter is used
8623                         for result publication in the study. Otherwise, if automatic
8624                         publication is switched on, default value is used for result name.
8625             Note:
8626                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8627
8628             Returns: 
8629                 New GEOM.GEOM_Object, containing the result shape.
8630
8631             Example of usage:
8632                 face = geompy.MakeFaceHW(100, 100, 1)
8633                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
8634             """
8635             # Example: see GEOM_TestAll.py
8636             theR,Parameters = ParseParameters(theR)
8637             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
8638             RaiseIfFailed("MakeFillet2D", self.LocalOp)
8639             anObj.SetParameters(Parameters)
8640             self._autoPublish(anObj, theName, "fillet")
8641             return anObj
8642
8643         ## Perform a symmetric chamfer on all edges of the given shape.
8644         #  @param theShape Shape, to perform chamfer on.
8645         #  @param theD Chamfer size along each face.
8646         #  @param theName Object name; when specified, this parameter is used
8647         #         for result publication in the study. Otherwise, if automatic
8648         #         publication is switched on, default value is used for result name.
8649         #
8650         #  @return New GEOM.GEOM_Object, containing the result shape.
8651         #
8652         #  @ref tui_chamfer "Example 1"
8653         #  \n @ref swig_MakeChamferAll "Example 2"
8654         def MakeChamferAll(self, theShape, theD, theName=None):
8655             """
8656             Perform a symmetric chamfer on all edges of the given shape.
8657
8658             Parameters:
8659                 theShape Shape, to perform chamfer on.
8660                 theD Chamfer size along each face.
8661                 theName Object name; when specified, this parameter is used
8662                         for result publication in the study. Otherwise, if automatic
8663                         publication is switched on, default value is used for result name.
8664
8665             Returns:     
8666                 New GEOM.GEOM_Object, containing the result shape.
8667
8668             Example of usage:
8669                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
8670             """
8671             # Example: see GEOM_TestOthers.py
8672             theD,Parameters = ParseParameters(theD)
8673             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
8674             RaiseIfFailed("MakeChamferAll", self.LocalOp)
8675             anObj.SetParameters(Parameters)
8676             self._autoPublish(anObj, theName, "chamfer")
8677             return anObj
8678
8679         ## Perform a chamfer on edges, common to the specified faces,
8680         #  with distance D1 on the Face1
8681         #  @param theShape Shape, to perform chamfer on.
8682         #  @param theD1 Chamfer size along \a theFace1.
8683         #  @param theD2 Chamfer size along \a theFace2.
8684         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8685         #  @param theName Object name; when specified, this parameter is used
8686         #         for result publication in the study. Otherwise, if automatic
8687         #         publication is switched on, default value is used for result name.
8688         #
8689         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8690         #
8691         #  @return New GEOM.GEOM_Object, containing the result shape.
8692         #
8693         #  @ref tui_chamfer "Example"
8694         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
8695             """
8696             Perform a chamfer on edges, common to the specified faces,
8697             with distance D1 on the Face1
8698
8699             Parameters:
8700                 theShape Shape, to perform chamfer on.
8701                 theD1 Chamfer size along theFace1.
8702                 theD2 Chamfer size along theFace2.
8703                 theFace1,theFace2 Global indices of two faces of theShape.
8704                 theName Object name; when specified, this parameter is used
8705                         for result publication in the study. Otherwise, if automatic
8706                         publication is switched on, default value is used for result name.
8707
8708             Note:
8709                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8710
8711             Returns:      
8712                 New GEOM.GEOM_Object, containing the result shape.
8713
8714             Example of usage:
8715                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8716                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8717                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8718                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
8719             """
8720             # Example: see GEOM_TestAll.py
8721             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8722             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
8723             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
8724             anObj.SetParameters(Parameters)
8725             self._autoPublish(anObj, theName, "chamfer")
8726             return anObj
8727
8728         ## Perform a chamfer on edges
8729         #  @param theShape Shape, to perform chamfer on.
8730         #  @param theD Chamfer length
8731         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8732         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8733         #  @param theName Object name; when specified, this parameter is used
8734         #         for result publication in the study. Otherwise, if automatic
8735         #         publication is switched on, default value is used for result name.
8736         #
8737         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8738         #
8739         #  @return New GEOM.GEOM_Object, containing the result shape.
8740         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
8741             """
8742             Perform a chamfer on edges
8743
8744             Parameters:
8745                 theShape Shape, to perform chamfer on.
8746                 theD1 Chamfer size along theFace1.
8747                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
8748                 theFace1,theFace2 Global indices of two faces of theShape.
8749                 theName Object name; when specified, this parameter is used
8750                         for result publication in the study. Otherwise, if automatic
8751                         publication is switched on, default value is used for result name.
8752
8753             Note:
8754                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8755
8756             Returns:      
8757                 New GEOM.GEOM_Object, containing the result shape.
8758
8759             Example of usage:
8760                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8761                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8762                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8763                 ang = 30
8764                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
8765             """
8766             flag = False
8767             if isinstance(theAngle,str):
8768                 flag = True
8769             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8770             if flag:
8771                 theAngle = theAngle*math.pi/180.0
8772             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
8773             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
8774             anObj.SetParameters(Parameters)
8775             self._autoPublish(anObj, theName, "chamfer")
8776             return anObj
8777
8778         ## Perform a chamfer on all edges of the specified faces,
8779         #  with distance D1 on the first specified face (if several for one edge)
8780         #  @param theShape Shape, to perform chamfer on.
8781         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
8782         #               connected to the edge, are in \a theFaces, \a theD1
8783         #               will be get along face, which is nearer to \a theFaces beginning.
8784         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
8785         #  @param theFaces Sequence of global indices of faces of \a theShape.
8786         #  @param theName Object name; when specified, this parameter is used
8787         #         for result publication in the study. Otherwise, if automatic
8788         #         publication is switched on, default value is used for result name.
8789         #
8790         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8791         #
8792         #  @return New GEOM.GEOM_Object, containing the result shape.
8793         #
8794         #  @ref tui_chamfer "Example"
8795         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
8796             """
8797             Perform a chamfer on all edges of the specified faces,
8798             with distance D1 on the first specified face (if several for one edge)
8799
8800             Parameters:
8801                 theShape Shape, to perform chamfer on.
8802                 theD1 Chamfer size along face from  theFaces. If both faces,
8803                       connected to the edge, are in theFaces, theD1
8804                       will be get along face, which is nearer to theFaces beginning.
8805                 theD2 Chamfer size along another of two faces, connected to the edge.
8806                 theFaces Sequence of global indices of faces of theShape.
8807                 theName Object name; when specified, this parameter is used
8808                         for result publication in the study. Otherwise, if automatic
8809                         publication is switched on, default value is used for result name.
8810                 
8811             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
8812
8813             Returns:  
8814                 New GEOM.GEOM_Object, containing the result shape.
8815             """
8816             # Example: see GEOM_TestAll.py
8817             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8818             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
8819             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
8820             anObj.SetParameters(Parameters)
8821             self._autoPublish(anObj, theName, "chamfer")
8822             return anObj
8823
8824         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
8825         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8826         #
8827         #  @ref swig_FilletChamfer "Example"
8828         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
8829             """
8830             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
8831             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8832             """
8833             flag = False
8834             if isinstance(theAngle,str):
8835                 flag = True
8836             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8837             if flag:
8838                 theAngle = theAngle*math.pi/180.0
8839             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
8840             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
8841             anObj.SetParameters(Parameters)
8842             self._autoPublish(anObj, theName, "chamfer")
8843             return anObj
8844
8845         ## Perform a chamfer on edges,
8846         #  with distance D1 on the first specified face (if several for one edge)
8847         #  @param theShape Shape, to perform chamfer on.
8848         #  @param theD1,theD2 Chamfer size
8849         #  @param theEdges Sequence of edges of \a theShape.
8850         #  @param theName Object name; when specified, this parameter is used
8851         #         for result publication in the study. Otherwise, if automatic
8852         #         publication is switched on, default value is used for result name.
8853         #
8854         #  @return New GEOM.GEOM_Object, containing the result shape.
8855         #
8856         #  @ref swig_FilletChamfer "Example"
8857         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
8858             """
8859             Perform a chamfer on edges,
8860             with distance D1 on the first specified face (if several for one edge)
8861             
8862             Parameters:
8863                 theShape Shape, to perform chamfer on.
8864                 theD1,theD2 Chamfer size
8865                 theEdges Sequence of edges of theShape.
8866                 theName Object name; when specified, this parameter is used
8867                         for result publication in the study. Otherwise, if automatic
8868                         publication is switched on, default value is used for result name.
8869
8870             Returns:
8871                 New GEOM.GEOM_Object, containing the result shape.
8872             """
8873             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8874             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
8875             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
8876             anObj.SetParameters(Parameters)
8877             self._autoPublish(anObj, theName, "chamfer")
8878             return anObj
8879
8880         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
8881         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8882         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
8883             """
8884             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
8885             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8886             """
8887             flag = False
8888             if isinstance(theAngle,str):
8889                 flag = True
8890             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8891             if flag:
8892                 theAngle = theAngle*math.pi/180.0
8893             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
8894             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
8895             anObj.SetParameters(Parameters)
8896             self._autoPublish(anObj, theName, "chamfer")
8897             return anObj
8898
8899         ## @sa MakeChamferEdge(), MakeChamferFaces()
8900         #
8901         #  @ref swig_MakeChamfer "Example"
8902         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
8903             """
8904             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
8905             """
8906             # Example: see GEOM_TestOthers.py
8907             anObj = None
8908             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
8909             if aShapeType == self.ShapeType["EDGE"]:
8910                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
8911             else:
8912                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
8913             return anObj
8914             
8915         ## Remove material from a solid by extrusion of the base shape on the given distance.
8916         #  @param theInit Shape to remove material from. It must be a solid or 
8917         #  a compound made of a single solid.
8918         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8919         #  @param theH Prism dimension along the normal to theBase
8920         #  @param theAngle Draft angle in degrees.
8921         #  @param theName Object name; when specified, this parameter is used
8922         #         for result publication in the study. Otherwise, if automatic
8923         #         publication is switched on, default value is used for result name.
8924         #
8925         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
8926         #
8927         #  @ref tui_creation_prism "Example"
8928         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
8929             """
8930             Add material to a solid by extrusion of the base shape on the given distance.
8931
8932             Parameters:
8933                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
8934                 theBase Closed edge or wire defining the base shape to be extruded.
8935                 theH Prism dimension along the normal  to theBase
8936                 theAngle Draft angle in degrees.
8937                 theName Object name; when specified, this parameter is used
8938                         for result publication in the study. Otherwise, if automatic
8939                         publication is switched on, default value is used for result name.
8940
8941             Returns:
8942                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
8943             """
8944             # Example: see GEOM_TestAll.py
8945             #theH,Parameters = ParseParameters(theH)
8946             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
8947             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8948             #anObj.SetParameters(Parameters)
8949             self._autoPublish(anObj, theName, "extrudedCut")
8950             return anObj   
8951             
8952         ## Add material to a solid by extrusion of the base shape on the given distance.
8953         #  @param theInit Shape to add material to. It must be a solid or 
8954         #  a compound made of a single solid.
8955         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8956         #  @param theH Prism dimension along the normal to theBase
8957         #  @param theAngle Draft angle in degrees.
8958         #  @param theName Object name; when specified, this parameter is used
8959         #         for result publication in the study. Otherwise, if automatic
8960         #         publication is switched on, default value is used for result name.
8961         #
8962         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
8963         #
8964         #  @ref tui_creation_prism "Example"
8965         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
8966             """
8967             Add material to a solid by extrusion of the base shape on the given distance.
8968
8969             Parameters:
8970                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
8971                 theBase Closed edge or wire defining the base shape to be extruded.
8972                 theH Prism dimension along the normal  to theBase
8973                 theAngle Draft angle in degrees.
8974                 theName Object name; when specified, this parameter is used
8975                         for result publication in the study. Otherwise, if automatic
8976                         publication is switched on, default value is used for result name.
8977
8978             Returns:
8979                 New GEOM.GEOM_Object,  containing the initial shape with added material.
8980             """
8981             # Example: see GEOM_TestAll.py
8982             #theH,Parameters = ParseParameters(theH)
8983             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
8984             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8985             #anObj.SetParameters(Parameters)
8986             self._autoPublish(anObj, theName, "extrudedBoss")
8987             return anObj   
8988
8989         # end of l3_local
8990         ## @}
8991
8992         ## @addtogroup l3_basic_op
8993         ## @{
8994
8995         ## Perform an Archimde operation on the given shape with given parameters.
8996         #  The object presenting the resulting face is returned.
8997         #  @param theShape Shape to be put in water.
8998         #  @param theWeight Weight og the shape.
8999         #  @param theWaterDensity Density of the water.
9000         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
9001         #  @param theName Object name; when specified, this parameter is used
9002         #         for result publication in the study. Otherwise, if automatic
9003         #         publication is switched on, default value is used for result name.
9004         #
9005         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
9006         #          by a plane, corresponding to water level.
9007         #
9008         #  @ref tui_archimede "Example"
9009         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
9010             """
9011             Perform an Archimde operation on the given shape with given parameters.
9012             The object presenting the resulting face is returned.
9013
9014             Parameters: 
9015                 theShape Shape to be put in water.
9016                 theWeight Weight og the shape.
9017                 theWaterDensity Density of the water.
9018                 theMeshDeflection Deflection of the mesh, using to compute the section.
9019                 theName Object name; when specified, this parameter is used
9020                         for result publication in the study. Otherwise, if automatic
9021                         publication is switched on, default value is used for result name.
9022
9023             Returns: 
9024                 New GEOM.GEOM_Object, containing a section of theShape
9025                 by a plane, corresponding to water level.
9026             """
9027             # Example: see GEOM_TestAll.py
9028             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
9029               theWeight,theWaterDensity,theMeshDeflection)
9030             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
9031             RaiseIfFailed("MakeArchimede", self.LocalOp)
9032             anObj.SetParameters(Parameters)
9033             self._autoPublish(anObj, theName, "archimede")
9034             return anObj
9035
9036         # end of l3_basic_op
9037         ## @}
9038
9039         ## @addtogroup l2_measure
9040         ## @{
9041
9042         ## Get point coordinates
9043         #  @return [x, y, z]
9044         #
9045         #  @ref tui_measurement_tools_page "Example"
9046         def PointCoordinates(self,Point):
9047             """
9048             Get point coordinates
9049
9050             Returns:
9051                 [x, y, z]
9052             """
9053             # Example: see GEOM_TestMeasures.py
9054             aTuple = self.MeasuOp.PointCoordinates(Point)
9055             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9056             return aTuple 
9057         
9058         ## Get vector coordinates
9059         #  @return [x, y, z]
9060         #
9061         #  @ref tui_measurement_tools_page "Example"
9062         def VectorCoordinates(self,Vector):
9063             """
9064             Get vector coordinates
9065
9066             Returns:
9067                 [x, y, z]
9068             """
9069
9070             p1=self.GetFirstVertex(Vector)
9071             p2=self.GetLastVertex(Vector)
9072             
9073             X1=self.PointCoordinates(p1)
9074             X2=self.PointCoordinates(p2)
9075
9076             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9077
9078
9079         ## Compute cross product
9080         #  @return vector w=u^v
9081         #
9082         #  @ref tui_measurement_tools_page "Example"
9083         def CrossProduct(self, Vector1, Vector2):
9084             """ 
9085             Compute cross product
9086             
9087             Returns: vector w=u^v
9088             """
9089             u=self.VectorCoordinates(Vector1)
9090             v=self.VectorCoordinates(Vector2)
9091             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])
9092             
9093             return w
9094         
9095         ## Compute cross product
9096         #  @return dot product  p=u.v
9097         #
9098         #  @ref tui_measurement_tools_page "Example"
9099         def DotProduct(self, Vector1, Vector2):
9100             """ 
9101             Compute cross product
9102             
9103             Returns: dot product  p=u.v
9104             """
9105             u=self.VectorCoordinates(Vector1)
9106             v=self.VectorCoordinates(Vector2)
9107             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9108             
9109             return p
9110
9111
9112         ## Get summarized length of all wires,
9113         #  area of surface and volume of the given shape.
9114         #  @param theShape Shape to define properties of.
9115         #  @return [theLength, theSurfArea, theVolume]\n
9116         #  theLength:   Summarized length of all wires of the given shape.\n
9117         #  theSurfArea: Area of surface of the given shape.\n
9118         #  theVolume:   Volume of the given shape.
9119         #
9120         #  @ref tui_measurement_tools_page "Example"
9121         def BasicProperties(self,theShape):
9122             """
9123             Get summarized length of all wires,
9124             area of surface and volume of the given shape.
9125
9126             Parameters: 
9127                 theShape Shape to define properties of.
9128
9129             Returns:
9130                 [theLength, theSurfArea, theVolume]
9131                  theLength:   Summarized length of all wires of the given shape.
9132                  theSurfArea: Area of surface of the given shape.
9133                  theVolume:   Volume of the given shape.
9134             """
9135             # Example: see GEOM_TestMeasures.py
9136             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9137             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9138             return aTuple
9139
9140         ## Get parameters of bounding box of the given shape
9141         #  @param theShape Shape to obtain bounding box of.
9142         #  @param precise TRUE for precise computation; FALSE for fast one.
9143         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9144         #  Xmin,Xmax: Limits of shape along OX axis.
9145         #  Ymin,Ymax: Limits of shape along OY axis.
9146         #  Zmin,Zmax: Limits of shape along OZ axis.
9147         #
9148         #  @ref tui_measurement_tools_page "Example"
9149         def BoundingBox (self, theShape, precise=False):
9150             """
9151             Get parameters of bounding box of the given shape
9152
9153             Parameters: 
9154                 theShape Shape to obtain bounding box of.
9155                 precise TRUE for precise computation; FALSE for fast one.
9156
9157             Returns:
9158                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9159                  Xmin,Xmax: Limits of shape along OX axis.
9160                  Ymin,Ymax: Limits of shape along OY axis.
9161                  Zmin,Zmax: Limits of shape along OZ axis.
9162             """
9163             # Example: see GEOM_TestMeasures.py
9164             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9165             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9166             return aTuple
9167
9168         ## Get bounding box of the given shape
9169         #  @param theShape Shape to obtain bounding box of.
9170         #  @param precise TRUE for precise computation; FALSE for fast one.
9171         #  @param theName Object name; when specified, this parameter is used
9172         #         for result publication in the study. Otherwise, if automatic
9173         #         publication is switched on, default value is used for result name.
9174         #
9175         #  @return New GEOM.GEOM_Object, containing the created box.
9176         #
9177         #  @ref tui_measurement_tools_page "Example"
9178         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9179             """
9180             Get bounding box of the given shape
9181
9182             Parameters: 
9183                 theShape Shape to obtain bounding box of.
9184                 precise TRUE for precise computation; FALSE for fast one.
9185                 theName Object name; when specified, this parameter is used
9186                         for result publication in the study. Otherwise, if automatic
9187                         publication is switched on, default value is used for result name.
9188
9189             Returns:
9190                 New GEOM.GEOM_Object, containing the created box.
9191             """
9192             # Example: see GEOM_TestMeasures.py
9193             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9194             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9195             self._autoPublish(anObj, theName, "bndbox")
9196             return anObj
9197
9198         ## Get inertia matrix and moments of inertia of theShape.
9199         #  @param theShape Shape to calculate inertia of.
9200         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9201         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9202         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9203         #
9204         #  @ref tui_measurement_tools_page "Example"
9205         def Inertia(self,theShape):
9206             """
9207             Get inertia matrix and moments of inertia of theShape.
9208
9209             Parameters: 
9210                 theShape Shape to calculate inertia of.
9211
9212             Returns:
9213                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9214                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9215                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9216             """
9217             # Example: see GEOM_TestMeasures.py
9218             aTuple = self.MeasuOp.GetInertia(theShape)
9219             RaiseIfFailed("GetInertia", self.MeasuOp)
9220             return aTuple
9221
9222         ## Get if coords are included in the shape (ST_IN or ST_ON)
9223         #  @param theShape Shape
9224         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9225         #  @param tolerance to be used (default is 1.0e-7)
9226         #  @return list_of_boolean = [res1, res2, ...]
9227         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9228             """
9229             Get if coords are included in the shape (ST_IN or ST_ON)
9230             
9231             Parameters: 
9232                 theShape Shape
9233                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9234                 tolerance to be used (default is 1.0e-7)
9235
9236             Returns:
9237                 list_of_boolean = [res1, res2, ...]
9238             """
9239             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9240
9241         ## Get minimal distance between the given shapes.
9242         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9243         #  @return Value of the minimal distance between the given shapes.
9244         #
9245         #  @ref tui_measurement_tools_page "Example"
9246         def MinDistance(self, theShape1, theShape2):
9247             """
9248             Get minimal distance between the given shapes.
9249             
9250             Parameters: 
9251                 theShape1,theShape2 Shapes to find minimal distance between.
9252
9253             Returns:    
9254                 Value of the minimal distance between the given shapes.
9255             """
9256             # Example: see GEOM_TestMeasures.py
9257             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9258             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9259             return aTuple[0]
9260
9261         ## Get minimal distance between the given shapes.
9262         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9263         #  @return Value of the minimal distance between the given shapes, in form of list
9264         #          [Distance, DX, DY, DZ].
9265         #
9266         #  @ref swig_all_measure "Example"
9267         def MinDistanceComponents(self, theShape1, theShape2):
9268             """
9269             Get minimal distance between the given shapes.
9270
9271             Parameters: 
9272                 theShape1,theShape2 Shapes to find minimal distance between.
9273
9274             Returns:  
9275                 Value of the minimal distance between the given shapes, in form of list
9276                 [Distance, DX, DY, DZ]
9277             """
9278             # Example: see GEOM_TestMeasures.py
9279             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9280             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9281             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9282             return aRes
9283
9284         ## Get closest points of the given shapes.
9285         #  @param theShape1,theShape2 Shapes to find closest points of.
9286         #  @return The number of found solutions (-1 in case of infinite number of
9287         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9288         #
9289         #  @ref tui_measurement_tools_page "Example"
9290         def ClosestPoints (self, theShape1, theShape2):
9291             """
9292             Get closest points of the given shapes.
9293
9294             Parameters: 
9295                 theShape1,theShape2 Shapes to find closest points of.
9296
9297             Returns:    
9298                 The number of found solutions (-1 in case of infinite number of
9299                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9300             """
9301             # Example: see GEOM_TestMeasures.py
9302             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9303             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9304             return aTuple
9305
9306         ## Get angle between the given shapes in degrees.
9307         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9308         #  @note If both arguments are vectors, the angle is computed in accordance
9309         #        with their orientations, otherwise the minimum angle is computed.
9310         #  @return Value of the angle between the given shapes in degrees.
9311         #
9312         #  @ref tui_measurement_tools_page "Example"
9313         def GetAngle(self, theShape1, theShape2):
9314             """
9315             Get angle between the given shapes in degrees.
9316
9317             Parameters: 
9318                 theShape1,theShape2 Lines or linear edges to find angle between.
9319
9320             Note:
9321                 If both arguments are vectors, the angle is computed in accordance
9322                 with their orientations, otherwise the minimum angle is computed.
9323
9324             Returns:  
9325                 Value of the angle between the given shapes in degrees.
9326             """
9327             # Example: see GEOM_TestMeasures.py
9328             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
9329             RaiseIfFailed("GetAngle", self.MeasuOp)
9330             return anAngle
9331
9332         ## Get angle between the given shapes in radians.
9333         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9334         #  @note If both arguments are vectors, the angle is computed in accordance
9335         #        with their orientations, otherwise the minimum angle is computed.
9336         #  @return Value of the angle between the given shapes in radians.
9337         #
9338         #  @ref tui_measurement_tools_page "Example"
9339         def GetAngleRadians(self, theShape1, theShape2):
9340             """
9341             Get angle between the given shapes in radians.
9342
9343             Parameters: 
9344                 theShape1,theShape2 Lines or linear edges to find angle between.
9345
9346                 
9347             Note:
9348                 If both arguments are vectors, the angle is computed in accordance
9349                 with their orientations, otherwise the minimum angle is computed.
9350
9351             Returns:  
9352                 Value of the angle between the given shapes in radians.
9353             """
9354             # Example: see GEOM_TestMeasures.py
9355             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
9356             RaiseIfFailed("GetAngle", self.MeasuOp)
9357             return anAngle
9358
9359         ## Get angle between the given vectors in degrees.
9360         #  @param theShape1,theShape2 Vectors to find angle between.
9361         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
9362         #                 if False, the opposite vector to the normal vector is used.
9363         #  @return Value of the angle between the given vectors in degrees.
9364         #
9365         #  @ref tui_measurement_tools_page "Example"
9366         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
9367             """
9368             Get angle between the given vectors in degrees.
9369
9370             Parameters: 
9371                 theShape1,theShape2 Vectors to find angle between.
9372                 theFlag If True, the normal vector is defined by the two vectors cross,
9373                         if False, the opposite vector to the normal vector is used.
9374
9375             Returns:  
9376                 Value of the angle between the given vectors in degrees.
9377             """
9378             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
9379             if not theFlag:
9380                 anAngle = 360. - anAngle
9381             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
9382             return anAngle
9383
9384         ## The same as GetAngleVectors, but the result is in radians.
9385         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
9386             """
9387             Get angle between the given vectors in radians.
9388
9389             Parameters: 
9390                 theShape1,theShape2 Vectors to find angle between.
9391                 theFlag If True, the normal vector is defined by the two vectors cross,
9392                         if False, the opposite vector to the normal vector is used.
9393
9394             Returns:  
9395                 Value of the angle between the given vectors in radians.
9396             """
9397             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
9398             return anAngle
9399
9400         ## @name Curve Curvature Measurement
9401         #  Methods for receiving radius of curvature of curves
9402         #  in the given point
9403         ## @{
9404
9405         ## Measure curvature of a curve at a point, set by parameter.
9406         #  @param theCurve a curve.
9407         #  @param theParam parameter.
9408         #  @return radius of curvature of \a theCurve.
9409         #
9410         #  @ref swig_todo "Example"
9411         def CurveCurvatureByParam(self, theCurve, theParam):
9412             """
9413             Measure curvature of a curve at a point, set by parameter.
9414
9415             Parameters: 
9416                 theCurve a curve.
9417                 theParam parameter.
9418
9419             Returns: 
9420                 radius of curvature of theCurve.
9421             """
9422             # Example: see GEOM_TestMeasures.py
9423             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
9424             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
9425             return aCurv
9426
9427         ## Measure curvature of a curve at a point.
9428         #  @param theCurve a curve.
9429         #  @param thePoint given point.
9430         #  @return radius of curvature of \a theCurve.
9431         #
9432         #  @ref swig_todo "Example"
9433         def CurveCurvatureByPoint(self, theCurve, thePoint):
9434             """
9435             Measure curvature of a curve at a point.
9436
9437             Parameters: 
9438                 theCurve a curve.
9439                 thePoint given point.
9440
9441             Returns: 
9442                 radius of curvature of theCurve.           
9443             """
9444             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
9445             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
9446             return aCurv
9447         ## @}
9448
9449         ## @name Surface Curvature Measurement
9450         #  Methods for receiving max and min radius of curvature of surfaces
9451         #  in the given point
9452         ## @{
9453
9454         ## Measure max radius of curvature of surface.
9455         #  @param theSurf the given surface.
9456         #  @param theUParam Value of U-parameter on the referenced surface.
9457         #  @param theVParam Value of V-parameter on the referenced surface.
9458         #  @return max radius of curvature of theSurf.
9459         #
9460         ## @ref swig_todo "Example"
9461         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9462             """
9463             Measure max radius of curvature of surface.
9464
9465             Parameters: 
9466                 theSurf the given surface.
9467                 theUParam Value of U-parameter on the referenced surface.
9468                 theVParam Value of V-parameter on the referenced surface.
9469                 
9470             Returns:     
9471                 max radius of curvature of theSurf.
9472             """
9473             # Example: see GEOM_TestMeasures.py
9474             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9475             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
9476             return aSurf
9477
9478         ## Measure max radius of curvature of surface in the given point
9479         #  @param theSurf the given surface.
9480         #  @param thePoint given point.
9481         #  @return max radius of curvature of theSurf.
9482         #
9483         ## @ref swig_todo "Example"
9484         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
9485             """
9486             Measure max radius of curvature of surface in the given point.
9487
9488             Parameters: 
9489                 theSurf the given surface.
9490                 thePoint given point.
9491                 
9492             Returns:     
9493                 max radius of curvature of theSurf.          
9494             """
9495             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
9496             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
9497             return aSurf
9498
9499         ## Measure min radius of curvature of surface.
9500         #  @param theSurf the given surface.
9501         #  @param theUParam Value of U-parameter on the referenced surface.
9502         #  @param theVParam Value of V-parameter on the referenced surface.
9503         #  @return min radius of curvature of theSurf.
9504         #   
9505         ## @ref swig_todo "Example"
9506         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9507             """
9508             Measure min radius of curvature of surface.
9509
9510             Parameters: 
9511                 theSurf the given surface.
9512                 theUParam Value of U-parameter on the referenced surface.
9513                 theVParam Value of V-parameter on the referenced surface.
9514                 
9515             Returns:     
9516                 Min radius of curvature of theSurf.
9517             """
9518             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9519             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
9520             return aSurf
9521
9522         ## Measure min radius of curvature of surface in the given point
9523         #  @param theSurf the given surface.
9524         #  @param thePoint given point.
9525         #  @return min radius of curvature of theSurf.
9526         #
9527         ## @ref swig_todo "Example"
9528         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
9529             """
9530             Measure min radius of curvature of surface in the given point.
9531
9532             Parameters: 
9533                 theSurf the given surface.
9534                 thePoint given point.
9535                 
9536             Returns:     
9537                 Min radius of curvature of theSurf.          
9538             """
9539             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
9540             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
9541             return aSurf
9542         ## @}
9543
9544         ## Get min and max tolerances of sub-shapes of theShape
9545         #  @param theShape Shape, to get tolerances of.
9546         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
9547         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
9548         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
9549         #  VertMin,VertMax: Min and max tolerances of the vertices.
9550         #
9551         #  @ref tui_measurement_tools_page "Example"
9552         def Tolerance(self,theShape):
9553             """
9554             Get min and max tolerances of sub-shapes of theShape
9555
9556             Parameters: 
9557                 theShape Shape, to get tolerances of.
9558
9559             Returns:    
9560                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
9561                  FaceMin,FaceMax: Min and max tolerances of the faces.
9562                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
9563                  VertMin,VertMax: Min and max tolerances of the vertices.
9564             """
9565             # Example: see GEOM_TestMeasures.py
9566             aTuple = self.MeasuOp.GetTolerance(theShape)
9567             RaiseIfFailed("GetTolerance", self.MeasuOp)
9568             return aTuple
9569
9570         ## Obtain description of the given shape (number of sub-shapes of each type)
9571         #  @param theShape Shape to be described.
9572         #  @return Description of the given shape.
9573         #
9574         #  @ref tui_measurement_tools_page "Example"
9575         def WhatIs(self,theShape):
9576             """
9577             Obtain description of the given shape (number of sub-shapes of each type)
9578
9579             Parameters:
9580                 theShape Shape to be described.
9581
9582             Returns:
9583                 Description of the given shape.
9584             """
9585             # Example: see GEOM_TestMeasures.py
9586             aDescr = self.MeasuOp.WhatIs(theShape)
9587             RaiseIfFailed("WhatIs", self.MeasuOp)
9588             return aDescr
9589
9590         ## Obtain quantity of shapes of the given type in \a theShape.
9591         #  If \a theShape is of type \a theType, it is also counted.
9592         #  @param theShape Shape to be described.
9593         #  @param theType the given ShapeType().
9594         #  @return Quantity of shapes of type \a theType in \a theShape.
9595         #
9596         #  @ref tui_measurement_tools_page "Example"
9597         def NbShapes (self, theShape, theType):
9598             """
9599             Obtain quantity of shapes of the given type in theShape.
9600             If theShape is of type theType, it is also counted.
9601
9602             Parameters:
9603                 theShape Shape to be described.
9604                 theType the given geompy.ShapeType
9605
9606             Returns:
9607                 Quantity of shapes of type theType in theShape.
9608             """
9609             # Example: see GEOM_TestMeasures.py
9610             listSh = self.SubShapeAllIDs(theShape, theType)
9611             Nb = len(listSh)
9612             t       = EnumToLong(theShape.GetShapeType())
9613             theType = EnumToLong(theType)
9614             if t == theType:
9615                 Nb = Nb + 1
9616                 pass
9617             return Nb
9618
9619         ## Obtain quantity of shapes of each type in \a theShape.
9620         #  The \a theShape is also counted.
9621         #  @param theShape Shape to be described.
9622         #  @return Dictionary of ShapeType() with bound quantities of shapes.
9623         #
9624         #  @ref tui_measurement_tools_page "Example"
9625         def ShapeInfo (self, theShape):
9626             """
9627             Obtain quantity of shapes of each type in theShape.
9628             The theShape is also counted.
9629
9630             Parameters:
9631                 theShape Shape to be described.
9632
9633             Returns:
9634                 Dictionary of geompy.ShapeType with bound quantities of shapes.
9635             """
9636             # Example: see GEOM_TestMeasures.py
9637             aDict = {}
9638             for typeSh in self.ShapeType:
9639                 if typeSh in ( "AUTO", "SHAPE" ): continue
9640                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
9641                 Nb = len(listSh)
9642                 if EnumToLong(theShape.GetShapeType()) == self.ShapeType[typeSh]:
9643                     Nb = Nb + 1
9644                     pass
9645                 aDict[typeSh] = Nb
9646                 pass
9647             return aDict
9648
9649         def GetCreationInformation(self, theShape):
9650             info = theShape.GetCreationInformation()
9651             # operationName
9652             opName = info.operationName
9653             if not opName: opName = "no info available"
9654             res = "Operation: " + opName
9655             # parameters
9656             for parVal in info.params:
9657                 res += " \n %s = %s" % ( parVal.name, parVal.value )
9658             return res
9659
9660         ## Get a point, situated at the centre of mass of theShape.
9661         #  @param theShape Shape to define centre of mass of.
9662         #  @param theName Object name; when specified, this parameter is used
9663         #         for result publication in the study. Otherwise, if automatic
9664         #         publication is switched on, default value is used for result name.
9665         #
9666         #  @return New GEOM.GEOM_Object, containing the created point.
9667         #
9668         #  @ref tui_measurement_tools_page "Example"
9669         def MakeCDG(self, theShape, theName=None):
9670             """
9671             Get a point, situated at the centre of mass of theShape.
9672
9673             Parameters:
9674                 theShape Shape to define centre of mass of.
9675                 theName Object name; when specified, this parameter is used
9676                         for result publication in the study. Otherwise, if automatic
9677                         publication is switched on, default value is used for result name.
9678
9679             Returns:
9680                 New GEOM.GEOM_Object, containing the created point.
9681             """
9682             # Example: see GEOM_TestMeasures.py
9683             anObj = self.MeasuOp.GetCentreOfMass(theShape)
9684             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
9685             self._autoPublish(anObj, theName, "centerOfMass")
9686             return anObj
9687
9688         ## Get a vertex sub-shape by index depended with orientation.
9689         #  @param theShape Shape to find sub-shape.
9690         #  @param theIndex Index to find vertex by this index (starting from zero)
9691         #  @param theName Object name; when specified, this parameter is used
9692         #         for result publication in the study. Otherwise, if automatic
9693         #         publication is switched on, default value is used for result name.
9694         #
9695         #  @return New GEOM.GEOM_Object, containing the created vertex.
9696         #
9697         #  @ref tui_measurement_tools_page "Example"
9698         def GetVertexByIndex(self, theShape, theIndex, theName=None):
9699             """
9700             Get a vertex sub-shape by index depended with orientation.
9701
9702             Parameters:
9703                 theShape Shape to find sub-shape.
9704                 theIndex Index to find vertex by this index (starting from zero)
9705                 theName Object name; when specified, this parameter is used
9706                         for result publication in the study. Otherwise, if automatic
9707                         publication is switched on, default value is used for result name.
9708
9709             Returns:
9710                 New GEOM.GEOM_Object, containing the created vertex.
9711             """
9712             # Example: see GEOM_TestMeasures.py
9713             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
9714             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
9715             self._autoPublish(anObj, theName, "vertex")
9716             return anObj
9717
9718         ## Get the first vertex of wire/edge depended orientation.
9719         #  @param theShape Shape to find first vertex.
9720         #  @param theName Object name; when specified, this parameter is used
9721         #         for result publication in the study. Otherwise, if automatic
9722         #         publication is switched on, default value is used for result name.
9723         #
9724         #  @return New GEOM.GEOM_Object, containing the created vertex.
9725         #
9726         #  @ref tui_measurement_tools_page "Example"
9727         def GetFirstVertex(self, theShape, theName=None):
9728             """
9729             Get the first vertex of wire/edge depended orientation.
9730
9731             Parameters:
9732                 theShape Shape to find first vertex.
9733                 theName Object name; when specified, this parameter is used
9734                         for result publication in the study. Otherwise, if automatic
9735                         publication is switched on, default value is used for result name.
9736
9737             Returns:    
9738                 New GEOM.GEOM_Object, containing the created vertex.
9739             """
9740             # Example: see GEOM_TestMeasures.py
9741             # note: auto-publishing is done in self.GetVertexByIndex()
9742             anObj = self.GetVertexByIndex(theShape, 0, theName)
9743             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
9744             return anObj
9745
9746         ## Get the last vertex of wire/edge depended orientation.
9747         #  @param theShape Shape to find last vertex.
9748         #  @param theName Object name; when specified, this parameter is used
9749         #         for result publication in the study. Otherwise, if automatic
9750         #         publication is switched on, default value is used for result name.
9751         #
9752         #  @return New GEOM.GEOM_Object, containing the created vertex.
9753         #
9754         #  @ref tui_measurement_tools_page "Example"
9755         def GetLastVertex(self, theShape, theName=None):
9756             """
9757             Get the last vertex of wire/edge depended orientation.
9758
9759             Parameters: 
9760                 theShape Shape to find last vertex.
9761                 theName Object name; when specified, this parameter is used
9762                         for result publication in the study. Otherwise, if automatic
9763                         publication is switched on, default value is used for result name.
9764
9765             Returns:   
9766                 New GEOM.GEOM_Object, containing the created vertex.
9767             """
9768             # Example: see GEOM_TestMeasures.py
9769             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
9770             # note: auto-publishing is done in self.GetVertexByIndex()
9771             anObj = self.GetVertexByIndex(theShape, (nb_vert-1), theName)
9772             RaiseIfFailed("GetLastVertex", self.MeasuOp)
9773             return anObj
9774
9775         ## Get a normale to the given face. If the point is not given,
9776         #  the normale is calculated at the center of mass.
9777         #  @param theFace Face to define normale of.
9778         #  @param theOptionalPoint Point to compute the normale at.
9779         #  @param theName Object name; when specified, this parameter is used
9780         #         for result publication in the study. Otherwise, if automatic
9781         #         publication is switched on, default value is used for result name.
9782         #
9783         #  @return New GEOM.GEOM_Object, containing the created vector.
9784         #
9785         #  @ref swig_todo "Example"
9786         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
9787             """
9788             Get a normale to the given face. If the point is not given,
9789             the normale is calculated at the center of mass.
9790             
9791             Parameters: 
9792                 theFace Face to define normale of.
9793                 theOptionalPoint Point to compute the normale at.
9794                 theName Object name; when specified, this parameter is used
9795                         for result publication in the study. Otherwise, if automatic
9796                         publication is switched on, default value is used for result name.
9797
9798             Returns:   
9799                 New GEOM.GEOM_Object, containing the created vector.
9800             """
9801             # Example: see GEOM_TestMeasures.py
9802             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
9803             RaiseIfFailed("GetNormal", self.MeasuOp)
9804             self._autoPublish(anObj, theName, "normal")
9805             return anObj
9806
9807         ## Check a topology of the given shape.
9808         #  @param theShape Shape to check validity of.
9809         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
9810         #                        if TRUE, the shape's geometry will be checked also.
9811         #  @param theReturnStatus If FALSE and if theShape is invalid, a description \n
9812         #                        of problem is printed.
9813         #                        if TRUE and if theShape is invalid, the description 
9814         #                        of problem is also returned.
9815         #  @return TRUE, if the shape "seems to be valid".
9816         #
9817         #  @ref tui_measurement_tools_page "Example"
9818         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
9819             """
9820             Check a topology of the given shape.
9821
9822             Parameters: 
9823                 theShape Shape to check validity of.
9824                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
9825                                if TRUE, the shape's geometry will be checked also.
9826                 theReturnStatus If FALSE and if theShape is invalid, a description
9827                                 of problem is printed.
9828                                 if TRUE and if theShape is invalid, the description 
9829                                 of problem is returned.
9830
9831             Returns:   
9832                 TRUE, if the shape "seems to be valid".
9833                 If theShape is invalid, prints a description of problem.
9834                 This description can also be returned.
9835             """
9836             # Example: see GEOM_TestMeasures.py
9837             if theIsCheckGeom:
9838                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
9839                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
9840             else:
9841                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
9842                 RaiseIfFailed("CheckShape", self.MeasuOp)
9843             if IsValid == 0:
9844                 if theReturnStatus == 0:
9845                     print Status
9846             if theReturnStatus == 1:
9847               return (IsValid, Status)
9848             return IsValid
9849
9850         ## Detect self-intersections in the given shape.
9851         #  @param theShape Shape to check.
9852         #  @return TRUE, if the shape contains no self-intersections.
9853         #
9854         #  @ref tui_measurement_tools_page "Example"
9855         def CheckSelfIntersections(self, theShape):
9856             """
9857             Detect self-intersections in the given shape.
9858
9859             Parameters: 
9860                 theShape Shape to check.
9861
9862             Returns:   
9863                 TRUE, if the shape contains no self-intersections.
9864             """
9865             # Example: see GEOM_TestMeasures.py
9866             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
9867             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
9868             return IsValid
9869
9870         ## Get position (LCS) of theShape.
9871         #
9872         #  Origin of the LCS is situated at the shape's center of mass.
9873         #  Axes of the LCS are obtained from shape's location or,
9874         #  if the shape is a planar face, from position of its plane.
9875         #
9876         #  @param theShape Shape to calculate position of.
9877         #  @return [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         #  @ref swig_todo "Example"
9883         def GetPosition(self,theShape):
9884             """
9885             Get position (LCS) of theShape.
9886             Origin of the LCS is situated at the shape's center of mass.
9887             Axes of the LCS are obtained from shape's location or,
9888             if the shape is a planar face, from position of its plane.
9889
9890             Parameters: 
9891                 theShape Shape to calculate position of.
9892
9893             Returns:  
9894                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9895                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
9896                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9897                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9898             """
9899             # Example: see GEOM_TestMeasures.py
9900             aTuple = self.MeasuOp.GetPosition(theShape)
9901             RaiseIfFailed("GetPosition", self.MeasuOp)
9902             return aTuple
9903
9904         ## Get kind of theShape.
9905         #
9906         #  @param theShape Shape to get a kind of.
9907         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
9908         #          and a list of parameters, describing the shape.
9909         #  @note  Concrete meaning of each value, returned via \a theIntegers
9910         #         or \a theDoubles list depends on the kind() of the shape.
9911         #
9912         #  @ref swig_todo "Example"
9913         def KindOfShape(self,theShape):
9914             """
9915             Get kind of theShape.
9916          
9917             Parameters: 
9918                 theShape Shape to get a kind of.
9919
9920             Returns:
9921                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
9922                     and a list of parameters, describing the shape.
9923             Note:
9924                 Concrete meaning of each value, returned via theIntegers
9925                 or theDoubles list depends on the geompy.kind of the shape
9926             """
9927             # Example: see GEOM_TestMeasures.py
9928             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
9929             RaiseIfFailed("KindOfShape", self.MeasuOp)
9930
9931             aKind  = aRoughTuple[0]
9932             anInts = aRoughTuple[1]
9933             aDbls  = aRoughTuple[2]
9934
9935             # Now there is no exception from this rule:
9936             aKindTuple = [aKind] + aDbls + anInts
9937
9938             # If they are we will regroup parameters for such kind of shape.
9939             # For example:
9940             #if aKind == kind.SOME_KIND:
9941             #    #  SOME_KIND     int int double int double double
9942             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
9943
9944             return aKindTuple
9945
9946         # end of l2_measure
9947         ## @}
9948
9949         ## @addtogroup l2_import_export
9950         ## @{
9951
9952         ## Import a shape from the BREP or IGES or STEP file
9953         #  (depends on given format) with given name.
9954         #  @param theFileName The file, containing the shape.
9955         #  @param theFormatName Specify format for the file reading.
9956         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
9957         #         If format 'IGES_SCALE' is used instead of 'IGES' or
9958         #            format 'STEP_SCALE' is used instead of 'STEP',
9959         #            length unit will be set to 'meter' and result model will be scaled.
9960         #  @param theName Object name; when specified, this parameter is used
9961         #         for result publication in the study. Otherwise, if automatic
9962         #         publication is switched on, default value is used for result name.
9963         #
9964         #  @return New GEOM.GEOM_Object, containing the imported shape.
9965         #
9966         #  @ref swig_Import_Export "Example"
9967         def ImportFile(self, theFileName, theFormatName, theName=None):
9968             """
9969             Import a shape from the BREP or IGES or STEP file
9970             (depends on given format) with given name.
9971
9972             Parameters: 
9973                 theFileName The file, containing the shape.
9974                 theFormatName Specify format for the file reading.
9975                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
9976                     If format 'IGES_SCALE' is used instead of 'IGES' or
9977                        format 'STEP_SCALE' is used instead of 'STEP',
9978                        length unit will be set to 'meter' and result model will be scaled.
9979                 theName Object name; when specified, this parameter is used
9980                         for result publication in the study. Otherwise, if automatic
9981                         publication is switched on, default value is used for result name.
9982
9983             Returns:
9984                 New GEOM.GEOM_Object, containing the imported shape.
9985             """
9986             # Example: see GEOM_TestOthers.py
9987             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
9988             RaiseIfFailed("ImportFile", self.InsertOp)
9989             self._autoPublish(anObj, theName, "imported")
9990             return anObj
9991
9992         ## Deprecated analog of ImportFile()
9993         def Import(self, theFileName, theFormatName, theName=None):
9994             """
9995             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
9996             """
9997             print "WARNING: Function Import is deprecated, use ImportFile instead"
9998             # note: auto-publishing is done in self.ImportFile()
9999             return self.ImportFile(theFileName, theFormatName, theName)
10000
10001         ## Shortcut to ImportFile() for BREP format.
10002         #  Import a shape from the BREP file with given name.
10003         #  @param theFileName The file, containing the shape.
10004         #  @param theName Object name; when specified, this parameter is used
10005         #         for result publication in the study. Otherwise, if automatic
10006         #         publication is switched on, default value is used for result name.
10007         #
10008         #  @return New GEOM.GEOM_Object, containing the imported shape.
10009         #
10010         #  @ref swig_Import_Export "Example"
10011         def ImportBREP(self, theFileName, theName=None):
10012             """
10013             geompy.ImportFile(...) function for BREP format
10014             Import a shape from the BREP file with given name.
10015
10016             Parameters: 
10017                 theFileName The file, containing the shape.
10018                 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             Returns:
10023                 New GEOM.GEOM_Object, containing the imported shape.
10024             """
10025             # Example: see GEOM_TestOthers.py
10026             # note: auto-publishing is done in self.ImportFile()
10027             return self.ImportFile(theFileName, "BREP", theName)
10028
10029         ## Shortcut to ImportFile() for IGES format
10030         #  Import a shape from the IGES file with given name.
10031         #  @param theFileName The file, containing the shape.
10032         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10033         #                     and result model will be scaled, if its units are not meters.
10034         #                     If False (default), file length units will be taken into account.
10035         #  @param theName Object name; when specified, this parameter is used
10036         #         for result publication in the study. Otherwise, if automatic
10037         #         publication is switched on, default value is used for result name.
10038         #
10039         #  @return New GEOM.GEOM_Object, containing the imported shape.
10040         #
10041         #  @ref swig_Import_Export "Example"
10042         def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
10043             """
10044             geompy.ImportFile(...) function for IGES format
10045
10046             Parameters:
10047                 theFileName The file, containing the shape.
10048                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10049                             and result model will be scaled, if its units are not meters.
10050                             If False (default), file length units will be taken into account.
10051                 theName Object name; when specified, this parameter is used
10052                         for result publication in the study. Otherwise, if automatic
10053                         publication is switched on, default value is used for result name.
10054
10055             Returns:
10056                 New GEOM.GEOM_Object, containing the imported shape.
10057             """
10058             # Example: see GEOM_TestOthers.py
10059             # note: auto-publishing is done in self.ImportFile()
10060             if ignoreUnits:
10061                 return self.ImportFile(theFileName, "IGES_SCALE", theName)
10062             return self.ImportFile(theFileName, "IGES", theName)
10063
10064         ## Return length unit from given IGES file
10065         #  @param theFileName The file, containing the shape.
10066         #  @return String, containing the units name.
10067         #
10068         #  @ref swig_Import_Export "Example"
10069         def GetIGESUnit(self, theFileName):
10070             """
10071             Return length units from given IGES file
10072
10073             Parameters:
10074                 theFileName The file, containing the shape.
10075
10076             Returns:
10077                 String, containing the units name.
10078             """
10079             # Example: see GEOM_TestOthers.py
10080             aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
10081             return aUnitName
10082
10083         ## Shortcut to ImportFile() for STEP format
10084         #  Import a shape from the STEP file with given name.
10085         #  @param theFileName The file, containing the shape.
10086         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10087         #                     and result model will be scaled, if its units are not meters.
10088         #                     If False (default), file length units will be taken into account.
10089         #  @param theName Object name; when specified, this parameter is used
10090         #         for result publication in the study. Otherwise, if automatic
10091         #         publication is switched on, default value is used for result name.
10092         #
10093         #  @return New GEOM.GEOM_Object, containing the imported shape.
10094         #
10095         #  @ref swig_Import_Export "Example"
10096         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
10097             """
10098             geompy.ImportFile(...) function for STEP format
10099
10100             Parameters:
10101                 theFileName The file, containing the shape.
10102                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10103                             and result model will be scaled, if its units are not meters.
10104                             If False (default), file length units will be taken into account.
10105                 theName Object name; when specified, this parameter is used
10106                         for result publication in the study. Otherwise, if automatic
10107                         publication is switched on, default value is used for result name.
10108
10109             Returns:
10110                 New GEOM.GEOM_Object, containing the imported shape.
10111             """
10112             # Example: see GEOM_TestOthers.py
10113             # note: auto-publishing is done in self.ImportFile()
10114             if ignoreUnits:
10115                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
10116             return self.ImportFile(theFileName, "STEP", theName)
10117
10118         ## Return length unit from given IGES or STEP file
10119         #  @param theFileName The file, containing the shape.
10120         #  @return String, containing the units name.
10121         #
10122         #  @ref swig_Import_Export "Example"
10123         def GetSTEPUnit(self, theFileName):
10124             """
10125             Return length units from given STEP file
10126
10127             Parameters:
10128                 theFileName The file, containing the shape.
10129
10130             Returns:
10131                 String, containing the units name.
10132             """
10133             # Example: see GEOM_TestOthers.py
10134             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
10135             return aUnitName
10136
10137         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10138         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10139         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10140         #  @param theStream The BRep binary stream.
10141         #  @param theName Object name; when specified, this parameter is used
10142         #         for result publication in the study. Otherwise, if automatic
10143         #         publication is switched on, default value is used for result name.
10144         #
10145         #  @return New GEOM_Object, containing the shape, read from theStream.
10146         #
10147         #  @ref swig_Import_Export "Example"
10148         def RestoreShape (self, theStream, theName=None):
10149             """
10150             Read a shape from the binary stream, containing its bounding representation (BRep).
10151
10152             Note:
10153                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10154
10155             Parameters: 
10156                 theStream The BRep binary stream.
10157                 theName Object name; when specified, this parameter is used
10158                         for result publication in the study. Otherwise, if automatic
10159                         publication is switched on, default value is used for result name.
10160
10161             Returns:
10162                 New GEOM_Object, containing the shape, read from theStream.
10163             """
10164             # Example: see GEOM_TestOthers.py
10165             anObj = self.InsertOp.RestoreShape(theStream)
10166             RaiseIfFailed("RestoreShape", self.InsertOp)
10167             self._autoPublish(anObj, theName, "restored")
10168             return anObj
10169
10170         ## Export the given shape into a file with given name.
10171         #  @param theObject Shape to be stored in the file.
10172         #  @param theFileName Name of the file to store the given shape in.
10173         #  @param theFormatName Specify format for the shape storage.
10174         #         Available formats can be obtained with
10175         #         geompy.InsertOp.ExportTranslators()[0] method.
10176         #
10177         #  @ref swig_Import_Export "Example"
10178         def Export(self, theObject, theFileName, theFormatName):
10179             """
10180             Export the given shape into a file with given name.
10181
10182             Parameters: 
10183                 theObject Shape to be stored in the file.
10184                 theFileName Name of the file to store the given shape in.
10185                 theFormatName Specify format for the shape storage.
10186                               Available formats can be obtained with
10187                               geompy.InsertOp.ExportTranslators()[0] method.
10188             """
10189             # Example: see GEOM_TestOthers.py
10190             self.InsertOp.Export(theObject, theFileName, theFormatName)
10191             if self.InsertOp.IsDone() == 0:
10192                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10193                 pass
10194             pass
10195
10196         ## Shortcut to Export() for BREP format
10197         #
10198         #  @ref swig_Import_Export "Example"
10199         def ExportBREP(self,theObject, theFileName):
10200             """
10201             geompy.Export(...) function for BREP format
10202             """
10203             # Example: see GEOM_TestOthers.py
10204             return self.Export(theObject, theFileName, "BREP")
10205
10206         ## Shortcut to Export() for IGES format
10207         #
10208         #  @ref swig_Import_Export "Example"
10209         def ExportIGES(self,theObject, theFileName):
10210             """
10211             geompy.Export(...) function for IGES format
10212             """
10213             # Example: see GEOM_TestOthers.py
10214             return self.Export(theObject, theFileName, "IGES")
10215
10216         ## Shortcut to Export() for STEP format
10217         #
10218         #  @ref swig_Import_Export "Example"
10219         def ExportSTEP(self,theObject, theFileName):
10220             """
10221             geompy.Export(...) function for STEP format
10222             """
10223             # Example: see GEOM_TestOthers.py
10224             return self.Export(theObject, theFileName, "STEP")
10225
10226         # end of l2_import_export
10227         ## @}
10228
10229         ## @addtogroup l3_blocks
10230         ## @{
10231
10232         ## Create a quadrangle face from four edges. Order of Edges is not
10233         #  important. It is  not necessary that edges share the same vertex.
10234         #  @param E1,E2,E3,E4 Edges for the face bound.
10235         #  @param theName Object name; when specified, this parameter is used
10236         #         for result publication in the study. Otherwise, if automatic
10237         #         publication is switched on, default value is used for result name.
10238         #
10239         #  @return New GEOM.GEOM_Object, containing the created face.
10240         #
10241         #  @ref tui_building_by_blocks_page "Example"
10242         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10243             """
10244             Create a quadrangle face from four edges. Order of Edges is not
10245             important. It is  not necessary that edges share the same vertex.
10246
10247             Parameters: 
10248                 E1,E2,E3,E4 Edges for the face bound.
10249                 theName Object name; when specified, this parameter is used
10250                         for result publication in the study. Otherwise, if automatic
10251                         publication is switched on, default value is used for result name.
10252
10253             Returns: 
10254                 New GEOM.GEOM_Object, containing the created face.
10255
10256             Example of usage:               
10257                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10258             """
10259             # Example: see GEOM_Spanner.py
10260             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10261             RaiseIfFailed("MakeQuad", self.BlocksOp)
10262             self._autoPublish(anObj, theName, "quad")
10263             return anObj
10264
10265         ## Create a quadrangle face on two edges.
10266         #  The missing edges will be built by creating the shortest ones.
10267         #  @param E1,E2 Two opposite edges for the face.
10268         #  @param theName Object name; when specified, this parameter is used
10269         #         for result publication in the study. Otherwise, if automatic
10270         #         publication is switched on, default value is used for result name.
10271         #
10272         #  @return New GEOM.GEOM_Object, containing the created face.
10273         #
10274         #  @ref tui_building_by_blocks_page "Example"
10275         def MakeQuad2Edges(self, E1, E2, theName=None):
10276             """
10277             Create a quadrangle face on two edges.
10278             The missing edges will be built by creating the shortest ones.
10279
10280             Parameters: 
10281                 E1,E2 Two opposite edges for the face.
10282                 theName Object name; when specified, this parameter is used
10283                         for result publication in the study. Otherwise, if automatic
10284                         publication is switched on, default value is used for result name.
10285
10286             Returns: 
10287                 New GEOM.GEOM_Object, containing the created face.
10288             
10289             Example of usage:
10290                 # create vertices
10291                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10292                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10293                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10294                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10295                 # create edges
10296                 edge1 = geompy.MakeEdge(p1, p2)
10297                 edge2 = geompy.MakeEdge(p3, p4)
10298                 # create a quadrangle face from two edges
10299                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10300             """
10301             # Example: see GEOM_Spanner.py
10302             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10303             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10304             self._autoPublish(anObj, theName, "quad")
10305             return anObj
10306
10307         ## Create a quadrangle face with specified corners.
10308         #  The missing edges will be built by creating the shortest ones.
10309         #  @param V1,V2,V3,V4 Corner vertices for the face.
10310         #  @param theName Object name; when specified, this parameter is used
10311         #         for result publication in the study. Otherwise, if automatic
10312         #         publication is switched on, default value is used for result name.
10313         #
10314         #  @return New GEOM.GEOM_Object, containing the created face.
10315         #
10316         #  @ref tui_building_by_blocks_page "Example 1"
10317         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10318         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10319             """
10320             Create a quadrangle face with specified corners.
10321             The missing edges will be built by creating the shortest ones.
10322
10323             Parameters: 
10324                 V1,V2,V3,V4 Corner vertices for the face.
10325                 theName Object name; when specified, this parameter is used
10326                         for result publication in the study. Otherwise, if automatic
10327                         publication is switched on, default value is used for result name.
10328
10329             Returns: 
10330                 New GEOM.GEOM_Object, containing the created face.
10331
10332             Example of usage:
10333                 # create vertices
10334                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10335                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10336                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10337                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10338                 # create a quadrangle from four points in its corners
10339                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10340             """
10341             # Example: see GEOM_Spanner.py
10342             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10343             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10344             self._autoPublish(anObj, theName, "quad")
10345             return anObj
10346
10347         ## Create a hexahedral solid, bounded by the six given faces. Order of
10348         #  faces is not important. It is  not necessary that Faces share the same edge.
10349         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10350         #  @param theName Object name; when specified, this parameter is used
10351         #         for result publication in the study. Otherwise, if automatic
10352         #         publication is switched on, default value is used for result name.
10353         #
10354         #  @return New GEOM.GEOM_Object, containing the created solid.
10355         #
10356         #  @ref tui_building_by_blocks_page "Example 1"
10357         #  \n @ref swig_MakeHexa "Example 2"
10358         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
10359             """
10360             Create a hexahedral solid, bounded by the six given faces. Order of
10361             faces is not important. It is  not necessary that Faces share the same edge.
10362
10363             Parameters: 
10364                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10365                 theName Object name; when specified, this parameter is used
10366                         for result publication in the study. Otherwise, if automatic
10367                         publication is switched on, default value is used for result name.
10368
10369             Returns:    
10370                 New GEOM.GEOM_Object, containing the created solid.
10371
10372             Example of usage:
10373                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
10374             """
10375             # Example: see GEOM_Spanner.py
10376             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
10377             RaiseIfFailed("MakeHexa", self.BlocksOp)
10378             self._autoPublish(anObj, theName, "hexa")
10379             return anObj
10380
10381         ## Create a hexahedral solid between two given faces.
10382         #  The missing faces will be built by creating the smallest ones.
10383         #  @param F1,F2 Two opposite faces for the hexahedral solid.
10384         #  @param theName Object name; when specified, this parameter is used
10385         #         for result publication in the study. Otherwise, if automatic
10386         #         publication is switched on, default value is used for result name.
10387         #
10388         #  @return New GEOM.GEOM_Object, containing the created solid.
10389         #
10390         #  @ref tui_building_by_blocks_page "Example 1"
10391         #  \n @ref swig_MakeHexa2Faces "Example 2"
10392         def MakeHexa2Faces(self, F1, F2, theName=None):
10393             """
10394             Create a hexahedral solid between two given faces.
10395             The missing faces will be built by creating the smallest ones.
10396
10397             Parameters: 
10398                 F1,F2 Two opposite faces for the hexahedral solid.
10399                 theName Object name; when specified, this parameter is used
10400                         for result publication in the study. Otherwise, if automatic
10401                         publication is switched on, default value is used for result name.
10402
10403             Returns:
10404                 New GEOM.GEOM_Object, containing the created solid.
10405
10406             Example of usage:
10407                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
10408             """
10409             # Example: see GEOM_Spanner.py
10410             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
10411             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
10412             self._autoPublish(anObj, theName, "hexa")
10413             return anObj
10414
10415         # end of l3_blocks
10416         ## @}
10417
10418         ## @addtogroup l3_blocks_op
10419         ## @{
10420
10421         ## Get a vertex, found in the given shape by its coordinates.
10422         #  @param theShape Block or a compound of blocks.
10423         #  @param theX,theY,theZ Coordinates of the sought vertex.
10424         #  @param theEpsilon Maximum allowed distance between the resulting
10425         #                    vertex and point with the given coordinates.
10426         #  @param theName Object name; when specified, this parameter is used
10427         #         for result publication in the study. Otherwise, if automatic
10428         #         publication is switched on, default value is used for result name.
10429         #
10430         #  @return New GEOM.GEOM_Object, containing the found vertex.
10431         #
10432         #  @ref swig_GetPoint "Example"
10433         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
10434             """
10435             Get a vertex, found in the given shape by its coordinates.
10436
10437             Parameters: 
10438                 theShape Block or a compound of blocks.
10439                 theX,theY,theZ Coordinates of the sought vertex.
10440                 theEpsilon Maximum allowed distance between the resulting
10441                            vertex and point with the given coordinates.
10442                 theName Object name; when specified, this parameter is used
10443                         for result publication in the study. Otherwise, if automatic
10444                         publication is switched on, default value is used for result name.
10445
10446             Returns:                  
10447                 New GEOM.GEOM_Object, containing the found vertex.
10448
10449             Example of usage:
10450                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
10451             """
10452             # Example: see GEOM_TestOthers.py
10453             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
10454             RaiseIfFailed("GetPoint", self.BlocksOp)
10455             self._autoPublish(anObj, theName, "vertex")
10456             return anObj
10457
10458         ## Find a vertex of the given shape, which has minimal distance to the given point.
10459         #  @param theShape Any shape.
10460         #  @param thePoint Point, close to the desired vertex.
10461         #  @param theName Object name; when specified, this parameter is used
10462         #         for result publication in the study. Otherwise, if automatic
10463         #         publication is switched on, default value is used for result name.
10464         #
10465         #  @return New GEOM.GEOM_Object, containing the found vertex.
10466         #
10467         #  @ref swig_GetVertexNearPoint "Example"
10468         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
10469             """
10470             Find a vertex of the given shape, which has minimal distance to the given point.
10471
10472             Parameters: 
10473                 theShape Any shape.
10474                 thePoint Point, close to the desired vertex.
10475                 theName Object name; when specified, this parameter is used
10476                         for result publication in the study. Otherwise, if automatic
10477                         publication is switched on, default value is used for result name.
10478
10479             Returns:
10480                 New GEOM.GEOM_Object, containing the found vertex.
10481
10482             Example of usage:
10483                 pmidle = geompy.MakeVertex(50, 0, 50)
10484                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
10485             """
10486             # Example: see GEOM_TestOthers.py
10487             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
10488             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
10489             self._autoPublish(anObj, theName, "vertex")
10490             return anObj
10491
10492         ## Get an edge, found in the given shape by two given vertices.
10493         #  @param theShape Block or a compound of blocks.
10494         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
10495         #  @param theName Object name; when specified, this parameter is used
10496         #         for result publication in the study. Otherwise, if automatic
10497         #         publication is switched on, default value is used for result name.
10498         #
10499         #  @return New GEOM.GEOM_Object, containing the found edge.
10500         #
10501         #  @ref swig_GetEdge "Example"
10502         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
10503             """
10504             Get an edge, found in the given shape by two given vertices.
10505
10506             Parameters: 
10507                 theShape Block or a compound of blocks.
10508                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
10509                 theName Object name; when specified, this parameter is used
10510                         for result publication in the study. Otherwise, if automatic
10511                         publication is switched on, default value is used for result name.
10512
10513             Returns:
10514                 New GEOM.GEOM_Object, containing the found edge.
10515             """
10516             # Example: see GEOM_Spanner.py
10517             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
10518             RaiseIfFailed("GetEdge", self.BlocksOp)
10519             self._autoPublish(anObj, theName, "edge")
10520             return anObj
10521
10522         ## Find an edge of the given shape, which has minimal distance to the given point.
10523         #  @param theShape Block or a compound of blocks.
10524         #  @param thePoint Point, close to the desired edge.
10525         #  @param theName Object name; when specified, this parameter is used
10526         #         for result publication in the study. Otherwise, if automatic
10527         #         publication is switched on, default value is used for result name.
10528         #
10529         #  @return New GEOM.GEOM_Object, containing the found edge.
10530         #
10531         #  @ref swig_GetEdgeNearPoint "Example"
10532         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
10533             """
10534             Find an edge of the given shape, which has minimal distance to the given point.
10535
10536             Parameters: 
10537                 theShape Block or a compound of blocks.
10538                 thePoint Point, close to the desired edge.
10539                 theName Object name; when specified, this parameter is used
10540                         for result publication in the study. Otherwise, if automatic
10541                         publication is switched on, default value is used for result name.
10542
10543             Returns:
10544                 New GEOM.GEOM_Object, containing the found edge.
10545             """
10546             # Example: see GEOM_TestOthers.py
10547             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
10548             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
10549             self._autoPublish(anObj, theName, "edge")
10550             return anObj
10551
10552         ## Returns a face, found in the given shape by four given corner vertices.
10553         #  @param theShape Block or a compound of blocks.
10554         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10555         #  @param theName Object name; when specified, this parameter is used
10556         #         for result publication in the study. Otherwise, if automatic
10557         #         publication is switched on, default value is used for result name.
10558         #
10559         #  @return New GEOM.GEOM_Object, containing the found face.
10560         #
10561         #  @ref swig_todo "Example"
10562         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
10563             """
10564             Returns a face, found in the given shape by four given corner vertices.
10565
10566             Parameters:
10567                 theShape Block or a compound of blocks.
10568                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10569                 theName Object name; when specified, this parameter is used
10570                         for result publication in the study. Otherwise, if automatic
10571                         publication is switched on, default value is used for result name.
10572
10573             Returns:
10574                 New GEOM.GEOM_Object, containing the found face.
10575             """
10576             # Example: see GEOM_Spanner.py
10577             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
10578             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
10579             self._autoPublish(anObj, theName, "face")
10580             return anObj
10581
10582         ## Get a face of block, found in the given shape by two given edges.
10583         #  @param theShape Block or a compound of blocks.
10584         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
10585         #  @param theName Object name; when specified, this parameter is used
10586         #         for result publication in the study. Otherwise, if automatic
10587         #         publication is switched on, default value is used for result name.
10588         #
10589         #  @return New GEOM.GEOM_Object, containing the found face.
10590         #
10591         #  @ref swig_todo "Example"
10592         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
10593             """
10594             Get a face of block, found in the given shape by two given edges.
10595
10596             Parameters:
10597                 theShape Block or a compound of blocks.
10598                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
10599                 theName Object name; when specified, this parameter is used
10600                         for result publication in the study. Otherwise, if automatic
10601                         publication is switched on, default value is used for result name.
10602
10603             Returns:
10604                 New GEOM.GEOM_Object, containing the found face.
10605             """
10606             # Example: see GEOM_Spanner.py
10607             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
10608             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
10609             self._autoPublish(anObj, theName, "face")
10610             return anObj
10611
10612         ## Find a face, opposite to the given one in the given block.
10613         #  @param theBlock Must be a hexahedral solid.
10614         #  @param theFace Face of \a theBlock, opposite to the desired face.
10615         #  @param theName Object name; when specified, this parameter is used
10616         #         for result publication in the study. Otherwise, if automatic
10617         #         publication is switched on, default value is used for result name.
10618         #
10619         #  @return New GEOM.GEOM_Object, containing the found face.
10620         #
10621         #  @ref swig_GetOppositeFace "Example"
10622         def GetOppositeFace(self, theBlock, theFace, theName=None):
10623             """
10624             Find a face, opposite to the given one in the given block.
10625
10626             Parameters:
10627                 theBlock Must be a hexahedral solid.
10628                 theFace Face of theBlock, opposite to the desired face.
10629                 theName Object name; when specified, this parameter is used
10630                         for result publication in the study. Otherwise, if automatic
10631                         publication is switched on, default value is used for result name.
10632
10633             Returns: 
10634                 New GEOM.GEOM_Object, containing the found face.
10635             """
10636             # Example: see GEOM_Spanner.py
10637             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
10638             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
10639             self._autoPublish(anObj, theName, "face")
10640             return anObj
10641
10642         ## Find a face of the given shape, which has minimal distance to the given point.
10643         #  @param theShape Block or a compound of blocks.
10644         #  @param thePoint Point, close to the desired face.
10645         #  @param theName Object name; when specified, this parameter is used
10646         #         for result publication in the study. Otherwise, if automatic
10647         #         publication is switched on, default value is used for result name.
10648         #
10649         #  @return New GEOM.GEOM_Object, containing the found face.
10650         #
10651         #  @ref swig_GetFaceNearPoint "Example"
10652         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
10653             """
10654             Find a face of the given shape, which has minimal distance to the given point.
10655
10656             Parameters:
10657                 theShape Block or a compound of blocks.
10658                 thePoint Point, close to the desired face.
10659                 theName Object name; when specified, this parameter is used
10660                         for result publication in the study. Otherwise, if automatic
10661                         publication is switched on, default value is used for result name.
10662
10663             Returns:
10664                 New GEOM.GEOM_Object, containing the found face.
10665             """
10666             # Example: see GEOM_Spanner.py
10667             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
10668             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
10669             self._autoPublish(anObj, theName, "face")
10670             return anObj
10671
10672         ## Find a face of block, whose outside normale has minimal angle with the given vector.
10673         #  @param theBlock Block or a compound of blocks.
10674         #  @param theVector Vector, close to the normale of the desired face.
10675         #  @param theName Object name; when specified, this parameter is used
10676         #         for result publication in the study. Otherwise, if automatic
10677         #         publication is switched on, default value is used for result name.
10678         #
10679         #  @return New GEOM.GEOM_Object, containing the found face.
10680         #
10681         #  @ref swig_todo "Example"
10682         def GetFaceByNormale(self, theBlock, theVector, theName=None):
10683             """
10684             Find a face of block, whose outside normale has minimal angle with the given vector.
10685
10686             Parameters:
10687                 theBlock Block or a compound of blocks.
10688                 theVector Vector, close to the normale of the desired face.
10689                 theName Object name; when specified, this parameter is used
10690                         for result publication in the study. Otherwise, if automatic
10691                         publication is switched on, default value is used for result name.
10692
10693             Returns:
10694                 New GEOM.GEOM_Object, containing the found face.
10695             """
10696             # Example: see GEOM_Spanner.py
10697             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
10698             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
10699             self._autoPublish(anObj, theName, "face")
10700             return anObj
10701
10702         ## Find all sub-shapes of type \a theShapeType of the given shape,
10703         #  which have minimal distance to the given point.
10704         #  @param theShape Any shape.
10705         #  @param thePoint Point, close to the desired shape.
10706         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
10707         #  @param theTolerance The tolerance for distances comparison. All shapes
10708         #                      with distances to the given point in interval
10709         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
10710         #  @param theName Object name; when specified, this parameter is used
10711         #         for result publication in the study. Otherwise, if automatic
10712         #         publication is switched on, default value is used for result name.
10713         #
10714         #  @return New GEOM_Object, containing a group of all found shapes.
10715         #
10716         #  @ref swig_GetShapesNearPoint "Example"
10717         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
10718             """
10719             Find all sub-shapes of type theShapeType of the given shape,
10720             which have minimal distance to the given point.
10721
10722             Parameters:
10723                 theShape Any shape.
10724                 thePoint Point, close to the desired shape.
10725                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
10726                 theTolerance The tolerance for distances comparison. All shapes
10727                                 with distances to the given point in interval
10728                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
10729                 theName Object name; when specified, this parameter is used
10730                         for result publication in the study. Otherwise, if automatic
10731                         publication is switched on, default value is used for result name.
10732
10733             Returns:
10734                 New GEOM_Object, containing a group of all found shapes.
10735             """
10736             # Example: see GEOM_TestOthers.py
10737             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
10738             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
10739             self._autoPublish(anObj, theName, "group")
10740             return anObj
10741
10742         # end of l3_blocks_op
10743         ## @}
10744
10745         ## @addtogroup l4_blocks_measure
10746         ## @{
10747
10748         ## Check, if the compound of blocks is given.
10749         #  To be considered as a compound of blocks, the
10750         #  given shape must satisfy the following conditions:
10751         #  - Each element of the compound should be a Block (6 faces and 12 edges).
10752         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10753         #  - The compound should be connexe.
10754         #  - The glue between two quadrangle faces should be applied.
10755         #  @param theCompound The compound to check.
10756         #  @return TRUE, if the given shape is a compound of blocks.
10757         #  If theCompound is not valid, prints all discovered errors.
10758         #
10759         #  @ref tui_measurement_tools_page "Example 1"
10760         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
10761         def CheckCompoundOfBlocks(self,theCompound):
10762             """
10763             Check, if the compound of blocks is given.
10764             To be considered as a compound of blocks, the
10765             given shape must satisfy the following conditions:
10766             - Each element of the compound should be a Block (6 faces and 12 edges).
10767             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10768             - The compound should be connexe.
10769             - The glue between two quadrangle faces should be applied.
10770
10771             Parameters:
10772                 theCompound The compound to check.
10773
10774             Returns:
10775                 TRUE, if the given shape is a compound of blocks.
10776                 If theCompound is not valid, prints all discovered errors.            
10777             """
10778             # Example: see GEOM_Spanner.py
10779             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
10780             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
10781             if IsValid == 0:
10782                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
10783                 print Descr
10784             return IsValid
10785
10786         ## Retrieve all non blocks solids and faces from \a theShape.
10787         #  @param theShape The shape to explore.
10788         #  @param 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         #  @return A tuple of two GEOM_Objects. The first object is a group of all
10793         #          non block solids (= not 6 faces, or with 6 faces, but with the
10794         #          presence of non-quadrangular faces). The second object is a
10795         #          group of all non quadrangular faces.
10796         #
10797         #  @ref tui_measurement_tools_page "Example 1"
10798         #  \n @ref swig_GetNonBlocks "Example 2"
10799         def GetNonBlocks (self, theShape, theName=None):
10800             """
10801             Retrieve all non blocks solids and faces from theShape.
10802
10803             Parameters:
10804                 theShape The shape to explore.
10805                 theName Object name; when specified, this parameter is used
10806                         for result publication in the study. Otherwise, if automatic
10807                         publication is switched on, default value is used for result name.
10808
10809             Returns:
10810                 A tuple of two GEOM_Objects. The first object is a group of all
10811                 non block solids (= not 6 faces, or with 6 faces, but with the
10812                 presence of non-quadrangular faces). The second object is a
10813                 group of all non quadrangular faces.
10814
10815             Usage:
10816                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
10817             """
10818             # Example: see GEOM_Spanner.py
10819             aTuple = self.BlocksOp.GetNonBlocks(theShape)
10820             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
10821             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
10822             return aTuple
10823
10824         ## Remove all seam and degenerated edges from \a theShape.
10825         #  Unite faces and edges, sharing one surface. It means that
10826         #  this faces must have references to one C++ surface object (handle).
10827         #  @param theShape The compound or single solid to remove irregular edges from.
10828         #  @param doUnionFaces If True, then unite faces. If False (the default value),
10829         #         do not unite faces.
10830         #  @param 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         #  @return Improved shape.
10835         #
10836         #  @ref swig_RemoveExtraEdges "Example"
10837         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
10838             """
10839             Remove all seam and degenerated edges from theShape.
10840             Unite faces and edges, sharing one surface. It means that
10841             this faces must have references to one C++ surface object (handle).
10842
10843             Parameters:
10844                 theShape The compound or single solid to remove irregular edges from.
10845                 doUnionFaces If True, then unite faces. If False (the default value),
10846                              do not unite faces.
10847                 theName Object name; when specified, this parameter is used
10848                         for result publication in the study. Otherwise, if automatic
10849                         publication is switched on, default value is used for result name.
10850
10851             Returns: 
10852                 Improved shape.
10853             """
10854             # Example: see GEOM_TestOthers.py
10855             nbFacesOptimum = -1 # -1 means do not unite faces
10856             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
10857             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
10858             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
10859             self._autoPublish(anObj, theName, "removeExtraEdges")
10860             return anObj
10861
10862         ## Performs union faces of \a theShape
10863         #  Unite faces sharing one surface. It means that
10864         #  these faces must have references to one C++ surface object (handle).
10865         #  @param theShape The compound or single solid that contains faces
10866         #         to perform union.
10867         #  @param theName Object name; when specified, this parameter is used
10868         #         for result publication in the study. Otherwise, if automatic
10869         #         publication is switched on, default value is used for result name.
10870         #
10871         #  @return Improved shape.
10872         #
10873         #  @ref swig_UnionFaces "Example"
10874         def UnionFaces(self, theShape, theName=None):
10875             """
10876             Performs union faces of theShape.
10877             Unite faces sharing one surface. It means that
10878             these faces must have references to one C++ surface object (handle).
10879
10880             Parameters:
10881                 theShape The compound or single solid that contains faces
10882                          to perform union.
10883                 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             Returns: 
10888                 Improved shape.
10889             """
10890             # Example: see GEOM_TestOthers.py
10891             anObj = self.BlocksOp.UnionFaces(theShape)
10892             RaiseIfFailed("UnionFaces", self.BlocksOp)
10893             self._autoPublish(anObj, theName, "unionFaces")
10894             return anObj
10895
10896         ## Check, if the given shape is a blocks compound.
10897         #  Fix all detected errors.
10898         #    \note Single block can be also fixed by this method.
10899         #  @param theShape The compound to check and improve.
10900         #  @param 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         #  @return Improved compound.
10905         #
10906         #  @ref swig_CheckAndImprove "Example"
10907         def CheckAndImprove(self, theShape, theName=None):
10908             """
10909             Check, if the given shape is a blocks compound.
10910             Fix all detected errors.
10911
10912             Note:
10913                 Single block can be also fixed by this method.
10914
10915             Parameters:
10916                 theShape The compound to check and improve.
10917                 theName Object name; when specified, this parameter is used
10918                         for result publication in the study. Otherwise, if automatic
10919                         publication is switched on, default value is used for result name.
10920
10921             Returns: 
10922                 Improved compound.
10923             """
10924             # Example: see GEOM_TestOthers.py
10925             anObj = self.BlocksOp.CheckAndImprove(theShape)
10926             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
10927             self._autoPublish(anObj, theName, "improved")
10928             return anObj
10929
10930         # end of l4_blocks_measure
10931         ## @}
10932
10933         ## @addtogroup l3_blocks_op
10934         ## @{
10935
10936         ## Get all the blocks, contained in the given compound.
10937         #  @param theCompound The compound to explode.
10938         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
10939         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
10940         #  @param theName Object name; when specified, this parameter is used
10941         #         for result publication in the study. Otherwise, if automatic
10942         #         publication is switched on, default value is used for result name.
10943         #
10944         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10945         #
10946         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
10947         #
10948         #  @ref tui_explode_on_blocks "Example 1"
10949         #  \n @ref swig_MakeBlockExplode "Example 2"
10950         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
10951             """
10952             Get all the blocks, contained in the given compound.
10953
10954             Parameters:
10955                 theCompound The compound to explode.
10956                 theMinNbFaces If solid has lower number of faces, it is not a block.
10957                 theMaxNbFaces If solid has higher number of faces, it is not a block.
10958                 theName Object name; when specified, this parameter is used
10959                         for result publication in the study. Otherwise, if automatic
10960                         publication is switched on, default value is used for result name.
10961
10962             Note:
10963                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10964
10965             Returns:  
10966                 List of GEOM.GEOM_Object, containing the retrieved blocks.
10967             """
10968             # Example: see GEOM_TestOthers.py
10969             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
10970             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
10971             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
10972             for anObj in aList:
10973                 anObj.SetParameters(Parameters)
10974                 pass
10975             self._autoPublish(aList, theName, "block")
10976             return aList
10977
10978         ## Find block, containing the given point inside its volume or on boundary.
10979         #  @param theCompound Compound, to find block in.
10980         #  @param thePoint Point, close to the desired block. If the point lays on
10981         #         boundary between some blocks, we return block with nearest center.
10982         #  @param theName Object name; when specified, this parameter is used
10983         #         for result publication in the study. Otherwise, if automatic
10984         #         publication is switched on, default value is used for result name.
10985         #
10986         #  @return New GEOM.GEOM_Object, containing the found block.
10987         #
10988         #  @ref swig_todo "Example"
10989         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
10990             """
10991             Find block, containing the given point inside its volume or on boundary.
10992
10993             Parameters:
10994                 theCompound Compound, to find block in.
10995                 thePoint Point, close to the desired block. If the point lays on
10996                          boundary between some blocks, we return block with nearest center.
10997                 theName Object name; when specified, this parameter is used
10998                         for result publication in the study. Otherwise, if automatic
10999                         publication is switched on, default value is used for result name.
11000
11001             Returns:
11002                 New GEOM.GEOM_Object, containing the found block.
11003             """
11004             # Example: see GEOM_Spanner.py
11005             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
11006             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
11007             self._autoPublish(anObj, theName, "block")
11008             return anObj
11009
11010         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11011         #  @param theCompound Compound, to find block in.
11012         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
11013         #  @param theName Object name; when specified, this parameter is used
11014         #         for result publication in the study. Otherwise, if automatic
11015         #         publication is switched on, default value is used for result name.
11016         #
11017         #  @return New GEOM.GEOM_Object, containing the found block.
11018         #
11019         #  @ref swig_GetBlockByParts "Example"
11020         def GetBlockByParts(self, theCompound, theParts, theName=None):
11021             """
11022              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11023
11024              Parameters:
11025                 theCompound Compound, to find block in.
11026                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
11027                 theName Object name; when specified, this parameter is used
11028                         for result publication in the study. Otherwise, if automatic
11029                         publication is switched on, default value is used for result name.
11030
11031             Returns: 
11032                 New GEOM_Object, containing the found block.
11033             """
11034             # Example: see GEOM_TestOthers.py
11035             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
11036             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
11037             self._autoPublish(anObj, theName, "block")
11038             return anObj
11039
11040         ## Return all blocks, containing all the elements, passed as the parts.
11041         #  @param theCompound Compound, to find blocks in.
11042         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11043         #  @param theName Object name; when specified, this parameter is used
11044         #         for result publication in the study. Otherwise, if automatic
11045         #         publication is switched on, default value is used for result name.
11046         #
11047         #  @return List of GEOM.GEOM_Object, containing the found blocks.
11048         #
11049         #  @ref swig_todo "Example"
11050         def GetBlocksByParts(self, theCompound, theParts, theName=None):
11051             """
11052             Return all blocks, containing all the elements, passed as the parts.
11053
11054             Parameters:
11055                 theCompound Compound, to find blocks in.
11056                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11057                 theName Object name; when specified, this parameter is used
11058                         for result publication in the study. Otherwise, if automatic
11059                         publication is switched on, default value is used for result name.
11060
11061             Returns:
11062                 List of GEOM.GEOM_Object, containing the found blocks.
11063             """
11064             # Example: see GEOM_Spanner.py
11065             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11066             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11067             self._autoPublish(aList, theName, "block")
11068             return aList
11069
11070         ## Multi-transformate block and glue the result.
11071         #  Transformation is defined so, as to superpose direction faces.
11072         #  @param Block Hexahedral solid to be multi-transformed.
11073         #  @param DirFace1 ID of First direction face.
11074         #  @param DirFace2 ID of Second direction face.
11075         #  @param NbTimes Quantity of transformations to be done.
11076         #  @param theName Object name; when specified, this parameter is used
11077         #         for result publication in the study. Otherwise, if automatic
11078         #         publication is switched on, default value is used for result name.
11079         #
11080         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11081         #
11082         #  @return New GEOM.GEOM_Object, containing the result shape.
11083         #
11084         #  @ref tui_multi_transformation "Example"
11085         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11086             """
11087             Multi-transformate block and glue the result.
11088             Transformation is defined so, as to superpose direction faces.
11089
11090             Parameters:
11091                 Block Hexahedral solid to be multi-transformed.
11092                 DirFace1 ID of First direction face.
11093                 DirFace2 ID of Second direction face.
11094                 NbTimes Quantity of transformations to be done.
11095                 theName Object name; when specified, this parameter is used
11096                         for result publication in the study. Otherwise, if automatic
11097                         publication is switched on, default value is used for result name.
11098
11099             Note:
11100                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11101
11102             Returns:
11103                 New GEOM.GEOM_Object, containing the result shape.
11104             """
11105             # Example: see GEOM_Spanner.py
11106             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11107             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11108             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11109             anObj.SetParameters(Parameters)
11110             self._autoPublish(anObj, theName, "transformed")
11111             return anObj
11112
11113         ## Multi-transformate block and glue the result.
11114         #  @param Block Hexahedral solid to be multi-transformed.
11115         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11116         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11117         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11118         #  @param 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         #  @return New GEOM.GEOM_Object, containing the result shape.
11123         #
11124         #  @ref tui_multi_transformation "Example"
11125         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11126                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11127             """
11128             Multi-transformate block and glue the result.
11129
11130             Parameters:
11131                 Block Hexahedral solid to be multi-transformed.
11132                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11133                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11134                 NbTimesU,NbTimesV Quantity of transformations to be done.
11135                 theName Object name; when specified, this parameter is used
11136                         for result publication in the study. Otherwise, if automatic
11137                         publication is switched on, default value is used for result name.
11138
11139             Returns:
11140                 New GEOM.GEOM_Object, containing the result shape.
11141             """
11142             # Example: see GEOM_Spanner.py
11143             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11144               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11145             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11146                                                             DirFace1V, DirFace2V, NbTimesV)
11147             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11148             anObj.SetParameters(Parameters)
11149             self._autoPublish(anObj, theName, "transformed")
11150             return anObj
11151
11152         ## Build all possible propagation groups.
11153         #  Propagation group is a set of all edges, opposite to one (main)
11154         #  edge of this group directly or through other opposite edges.
11155         #  Notion of Opposite Edge make sence only on quadrangle face.
11156         #  @param theShape Shape to build propagation groups on.
11157         #  @param theName Object name; when specified, this parameter is used
11158         #         for result publication in the study. Otherwise, if automatic
11159         #         publication is switched on, default value is used for result name.
11160         #
11161         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11162         #
11163         #  @ref swig_Propagate "Example"
11164         def Propagate(self, theShape, theName=None):
11165             """
11166             Build all possible propagation groups.
11167             Propagation group is a set of all edges, opposite to one (main)
11168             edge of this group directly or through other opposite edges.
11169             Notion of Opposite Edge make sence only on quadrangle face.
11170
11171             Parameters:
11172                 theShape Shape to build propagation groups on.
11173                 theName Object name; when specified, this parameter is used
11174                         for result publication in the study. Otherwise, if automatic
11175                         publication is switched on, default value is used for result name.
11176
11177             Returns:
11178                 List of GEOM.GEOM_Object, each of them is a propagation group.
11179             """
11180             # Example: see GEOM_TestOthers.py
11181             listChains = self.BlocksOp.Propagate(theShape)
11182             RaiseIfFailed("Propagate", self.BlocksOp)
11183             self._autoPublish(listChains, theName, "propagate")
11184             return listChains
11185
11186         # end of l3_blocks_op
11187         ## @}
11188
11189         ## @addtogroup l3_groups
11190         ## @{
11191
11192         ## Creates a new group which will store sub-shapes of theMainShape
11193         #  @param theMainShape is a GEOM object on which the group is selected
11194         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
11195         #  @param theName Object name; when specified, this parameter is used
11196         #         for result publication in the study. Otherwise, if automatic
11197         #         publication is switched on, default value is used for result name.
11198         #
11199         #  @return a newly created GEOM group (GEOM.GEOM_Object)
11200         #
11201         #  @ref tui_working_with_groups_page "Example 1"
11202         #  \n @ref swig_CreateGroup "Example 2"
11203         def CreateGroup(self, theMainShape, theShapeType, theName=None):
11204             """
11205             Creates a new group which will store sub-shapes of theMainShape
11206
11207             Parameters:
11208                theMainShape is a GEOM object on which the group is selected
11209                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
11210                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
11211                 theName Object name; when specified, this parameter is used
11212                         for result publication in the study. Otherwise, if automatic
11213                         publication is switched on, default value is used for result name.
11214
11215             Returns:
11216                a newly created GEOM group
11217
11218             Example of usage:
11219                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
11220                 
11221             """
11222             # Example: see GEOM_TestOthers.py
11223             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
11224             RaiseIfFailed("CreateGroup", self.GroupOp)
11225             self._autoPublish(anObj, theName, "group")
11226             return anObj
11227
11228         ## Adds a sub-object with ID theSubShapeId to the group
11229         #  @param theGroup is a GEOM group to which the new sub-shape is added
11230         #  @param theSubShapeID is a sub-shape ID in the main object.
11231         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11232         #
11233         #  @ref tui_working_with_groups_page "Example"
11234         def AddObject(self,theGroup, theSubShapeID):
11235             """
11236             Adds a sub-object with ID theSubShapeId to the group
11237
11238             Parameters:
11239                 theGroup       is a GEOM group to which the new sub-shape is added
11240                 theSubShapeID  is a sub-shape ID in the main object.
11241
11242             Note:
11243                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
11244             """
11245             # Example: see GEOM_TestOthers.py
11246             self.GroupOp.AddObject(theGroup, theSubShapeID)
11247             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
11248                 RaiseIfFailed("AddObject", self.GroupOp)
11249                 pass
11250             pass
11251
11252         ## Removes a sub-object with ID \a theSubShapeId from the group
11253         #  @param theGroup is a GEOM group from which the new sub-shape is removed
11254         #  @param theSubShapeID is a sub-shape ID in the main object.
11255         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11256         #
11257         #  @ref tui_working_with_groups_page "Example"
11258         def RemoveObject(self,theGroup, theSubShapeID):
11259             """
11260             Removes a sub-object with ID theSubShapeId from the group
11261
11262             Parameters:
11263                 theGroup is a GEOM group from which the new sub-shape is removed
11264                 theSubShapeID is a sub-shape ID in the main object.
11265
11266             Note:
11267                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11268             """
11269             # Example: see GEOM_TestOthers.py
11270             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
11271             RaiseIfFailed("RemoveObject", self.GroupOp)
11272             pass
11273
11274         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11275         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11276         #  @param theSubShapes is a list of sub-shapes to be added.
11277         #
11278         #  @ref tui_working_with_groups_page "Example"
11279         def UnionList (self,theGroup, theSubShapes):
11280             """
11281             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11282
11283             Parameters:
11284                 theGroup is a GEOM group to which the new sub-shapes are added.
11285                 theSubShapes is a list of sub-shapes to be added.
11286             """
11287             # Example: see GEOM_TestOthers.py
11288             self.GroupOp.UnionList(theGroup, theSubShapes)
11289             RaiseIfFailed("UnionList", self.GroupOp)
11290             pass
11291
11292         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11293         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11294         #  @param theSubShapes is a list of indices of sub-shapes to be added.
11295         #
11296         #  @ref swig_UnionIDs "Example"
11297         def UnionIDs(self,theGroup, theSubShapes):
11298             """
11299             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11300
11301             Parameters:
11302                 theGroup is a GEOM group to which the new sub-shapes are added.
11303                 theSubShapes is a list of indices of sub-shapes to be added.
11304             """
11305             # Example: see GEOM_TestOthers.py
11306             self.GroupOp.UnionIDs(theGroup, theSubShapes)
11307             RaiseIfFailed("UnionIDs", self.GroupOp)
11308             pass
11309
11310         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11311         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11312         #  @param theSubShapes is a list of sub-shapes to be removed.
11313         #
11314         #  @ref tui_working_with_groups_page "Example"
11315         def DifferenceList (self,theGroup, theSubShapes):
11316             """
11317             Removes from the group all the given shapes. No errors, if some shapes are not included.
11318
11319             Parameters:
11320                 theGroup is a GEOM group from which the sub-shapes are removed.
11321                 theSubShapes is a list of sub-shapes to be removed.
11322             """
11323             # Example: see GEOM_TestOthers.py
11324             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11325             RaiseIfFailed("DifferenceList", self.GroupOp)
11326             pass
11327
11328         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11329         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11330         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
11331         #
11332         #  @ref swig_DifferenceIDs "Example"
11333         def DifferenceIDs(self,theGroup, theSubShapes):
11334             """
11335             Removes from the group all the given shapes. No errors, if some shapes are not included.
11336
11337             Parameters:
11338                 theGroup is a GEOM group from which the sub-shapes are removed.
11339                 theSubShapes is a list of indices of sub-shapes to be removed.
11340             """            
11341             # Example: see GEOM_TestOthers.py
11342             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
11343             RaiseIfFailed("DifferenceIDs", self.GroupOp)
11344             pass
11345
11346         ## Union of two groups.
11347         #  New group is created. It will contain all entities
11348         #  which are present in groups theGroup1 and theGroup2.
11349         #  @param theGroup1, theGroup2 are the initial GEOM groups
11350         #                              to create the united group from.
11351         #  @param theName Object name; when specified, this parameter is used
11352         #         for result publication in the study. Otherwise, if automatic
11353         #         publication is switched on, default value is used for result name.
11354         #
11355         #  @return a newly created GEOM group.
11356         #
11357         #  @ref tui_union_groups_anchor "Example"
11358         def UnionGroups (self, theGroup1, theGroup2, theName=None):
11359             """
11360             Union of two groups.
11361             New group is created. It will contain all entities
11362             which are present in groups theGroup1 and theGroup2.
11363
11364             Parameters:
11365                 theGroup1, theGroup2 are the initial GEOM groups
11366                                      to create the united group from.
11367                 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             Returns:
11372                 a newly created GEOM group.
11373             """
11374             # Example: see GEOM_TestOthers.py
11375             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
11376             RaiseIfFailed("UnionGroups", self.GroupOp)
11377             self._autoPublish(aGroup, theName, "group")
11378             return aGroup
11379
11380         ## Intersection of two groups.
11381         #  New group is created. It will contain only those entities
11382         #  which are present in both groups theGroup1 and theGroup2.
11383         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11384         #  @param theName Object name; when specified, this parameter is used
11385         #         for result publication in the study. Otherwise, if automatic
11386         #         publication is switched on, default value is used for result name.
11387         #
11388         #  @return a newly created GEOM group.
11389         #
11390         #  @ref tui_intersect_groups_anchor "Example"
11391         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
11392             """
11393             Intersection of two groups.
11394             New group is created. It will contain only those entities
11395             which are present in both groups theGroup1 and theGroup2.
11396
11397             Parameters:
11398                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11399                 theName Object name; when specified, this parameter is used
11400                         for result publication in the study. Otherwise, if automatic
11401                         publication is switched on, default value is used for result name.
11402
11403             Returns:
11404                 a newly created GEOM group.
11405             """
11406             # Example: see GEOM_TestOthers.py
11407             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
11408             RaiseIfFailed("IntersectGroups", self.GroupOp)
11409             self._autoPublish(aGroup, theName, "group")
11410             return aGroup
11411
11412         ## Cut of two groups.
11413         #  New group is created. It will contain entities which are
11414         #  present in group theGroup1 but are not present in group theGroup2.
11415         #  @param theGroup1 is a GEOM group to include elements of.
11416         #  @param theGroup2 is a GEOM group to exclude elements of.
11417         #  @param theName Object name; when specified, this parameter is used
11418         #         for result publication in the study. Otherwise, if automatic
11419         #         publication is switched on, default value is used for result name.
11420         #
11421         #  @return a newly created GEOM group.
11422         #
11423         #  @ref tui_cut_groups_anchor "Example"
11424         def CutGroups (self, theGroup1, theGroup2, theName=None):
11425             """
11426             Cut of two groups.
11427             New group is created. It will contain entities which are
11428             present in group theGroup1 but are not present in group theGroup2.
11429
11430             Parameters:
11431                 theGroup1 is a GEOM group to include elements of.
11432                 theGroup2 is a GEOM group to exclude elements of.
11433                 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             Returns:
11438                 a newly created GEOM group.
11439             """
11440             # Example: see GEOM_TestOthers.py
11441             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
11442             RaiseIfFailed("CutGroups", self.GroupOp)
11443             self._autoPublish(aGroup, theName, "group")
11444             return aGroup
11445
11446         ## Union of list of groups.
11447         #  New group is created. It will contain all entities that are
11448         #  present in groups listed in theGList.
11449         #  @param theGList is a list of GEOM groups to create the united group from.
11450         #  @param theName Object name; when specified, this parameter is used
11451         #         for result publication in the study. Otherwise, if automatic
11452         #         publication is switched on, default value is used for result name.
11453         #
11454         #  @return a newly created GEOM group.
11455         #
11456         #  @ref tui_union_groups_anchor "Example"
11457         def UnionListOfGroups (self, theGList, theName=None):
11458             """
11459             Union of list of groups.
11460             New group is created. It will contain all entities that are
11461             present in groups listed in theGList.
11462
11463             Parameters:
11464                 theGList is a list of GEOM groups to create the united group from.
11465                 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             Returns:
11470                 a newly created GEOM group.
11471             """
11472             # Example: see GEOM_TestOthers.py
11473             aGroup = self.GroupOp.UnionListOfGroups(theGList)
11474             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
11475             self._autoPublish(aGroup, theName, "group")
11476             return aGroup
11477
11478         ## Cut of lists of groups.
11479         #  New group is created. It will contain only entities
11480         #  which are present in groups listed in theGList.
11481         #  @param theGList is a list of GEOM groups to include elements of.
11482         #  @param theName Object name; when specified, this parameter is used
11483         #         for result publication in the study. Otherwise, if automatic
11484         #         publication is switched on, default value is used for result name.
11485         #
11486         #  @return a newly created GEOM group.
11487         #
11488         #  @ref tui_intersect_groups_anchor "Example"
11489         def IntersectListOfGroups (self, theGList, theName=None):
11490             """
11491             Cut of lists of groups.
11492             New group is created. It will contain only entities
11493             which are present in groups listed in theGList.
11494
11495             Parameters:
11496                 theGList is a list of GEOM groups to include elements of.
11497                 theName Object name; when specified, this parameter is used
11498                         for result publication in the study. Otherwise, if automatic
11499                         publication is switched on, default value is used for result name.
11500
11501             Returns:
11502                 a newly created GEOM group.
11503             """
11504             # Example: see GEOM_TestOthers.py
11505             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
11506             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
11507             self._autoPublish(aGroup, theName, "group")
11508             return aGroup
11509
11510         ## Cut of lists of groups.
11511         #  New group is created. It will contain only entities
11512         #  which are present in groups listed in theGList1 but 
11513         #  are not present in groups from theGList2.
11514         #  @param theGList1 is a list of GEOM groups to include elements of.
11515         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11516         #  @param 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         #  @return a newly created GEOM group.
11521         #
11522         #  @ref tui_cut_groups_anchor "Example"
11523         def CutListOfGroups (self, theGList1, theGList2, theName=None):
11524             """
11525             Cut of lists of groups.
11526             New group is created. It will contain only entities
11527             which are present in groups listed in theGList1 but 
11528             are not present in groups from theGList2.
11529
11530             Parameters:
11531                 theGList1 is a list of GEOM groups to include elements of.
11532                 theGList2 is a list of GEOM groups to exclude elements of.
11533                 theName Object name; when specified, this parameter is used
11534                         for result publication in the study. Otherwise, if automatic
11535                         publication is switched on, default value is used for result name.
11536
11537             Returns:
11538                 a newly created GEOM group.
11539             """
11540             # Example: see GEOM_TestOthers.py
11541             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
11542             RaiseIfFailed("CutListOfGroups", self.GroupOp)
11543             self._autoPublish(aGroup, theName, "group")
11544             return aGroup
11545
11546         ## Returns a list of sub-objects ID stored in the group
11547         #  @param theGroup is a GEOM group for which a list of IDs is requested
11548         #
11549         #  @ref swig_GetObjectIDs "Example"
11550         def GetObjectIDs(self,theGroup):
11551             """
11552             Returns a list of sub-objects ID stored in the group
11553
11554             Parameters:
11555                 theGroup is a GEOM group for which a list of IDs is requested
11556             """
11557             # Example: see GEOM_TestOthers.py
11558             ListIDs = self.GroupOp.GetObjects(theGroup)
11559             RaiseIfFailed("GetObjects", self.GroupOp)
11560             return ListIDs
11561
11562         ## Returns a type of sub-objects stored in the group
11563         #  @param theGroup is a GEOM group which type is returned.
11564         #
11565         #  @ref swig_GetType "Example"
11566         def GetType(self,theGroup):
11567             """
11568             Returns a type of sub-objects stored in the group
11569
11570             Parameters:
11571                 theGroup is a GEOM group which type is returned.
11572             """
11573             # Example: see GEOM_TestOthers.py
11574             aType = self.GroupOp.GetType(theGroup)
11575             RaiseIfFailed("GetType", self.GroupOp)
11576             return aType
11577
11578         ## Convert a type of geom object from id to string value
11579         #  @param theId is a GEOM obect type id.
11580         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11581         #  @ref swig_GetType "Example"
11582         def ShapeIdToType(self, theId):
11583             """
11584             Convert a type of geom object from id to string value
11585
11586             Parameters:
11587                 theId is a GEOM obect type id.
11588                 
11589             Returns:
11590                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11591             """
11592             if theId == 0:
11593                 return "COPY"
11594             if theId == 1:
11595                 return "IMPORT"
11596             if theId == 2:
11597                 return "POINT"
11598             if theId == 3:
11599                 return "VECTOR"
11600             if theId == 4:
11601                 return "PLANE"
11602             if theId == 5:
11603                 return "LINE"
11604             if theId == 6:
11605                 return "TORUS"
11606             if theId == 7:
11607                 return "BOX"
11608             if theId == 8:
11609                 return "CYLINDER"
11610             if theId == 9:
11611                 return "CONE"
11612             if theId == 10:
11613                 return "SPHERE"
11614             if theId == 11:
11615                 return "PRISM"
11616             if theId == 12:
11617                 return "REVOLUTION"
11618             if theId == 13:
11619                 return "BOOLEAN"
11620             if theId == 14:
11621                 return "PARTITION"
11622             if theId == 15:
11623                 return "POLYLINE"
11624             if theId == 16:
11625                 return "CIRCLE"
11626             if theId == 17:
11627                 return "SPLINE"
11628             if theId == 18:
11629                 return "ELLIPSE"
11630             if theId == 19:
11631                 return "CIRC_ARC"
11632             if theId == 20:
11633                 return "FILLET"
11634             if theId == 21:
11635                 return "CHAMFER"
11636             if theId == 22:
11637                 return "EDGE"
11638             if theId == 23:
11639                 return "WIRE"
11640             if theId == 24:
11641                 return "FACE"
11642             if theId == 25:
11643                 return "SHELL"
11644             if theId == 26:
11645                 return "SOLID"
11646             if theId == 27:
11647                 return "COMPOUND"
11648             if theId == 28:
11649                 return "SUBSHAPE"
11650             if theId == 29:
11651                 return "PIPE"
11652             if theId == 30:
11653                 return "ARCHIMEDE"
11654             if theId == 31:
11655                 return "FILLING"
11656             if theId == 32:
11657                 return "EXPLODE"
11658             if theId == 33:
11659                 return "GLUED"
11660             if theId == 34:
11661                 return "SKETCHER"
11662             if theId == 35:
11663                 return "CDG"
11664             if theId == 36:
11665                 return "FREE_BOUNDS"
11666             if theId == 37:
11667                 return "GROUP"
11668             if theId == 38:
11669                 return "BLOCK"
11670             if theId == 39:
11671                 return "MARKER"
11672             if theId == 40:
11673                 return "THRUSECTIONS"
11674             if theId == 41:
11675                 return "COMPOUNDFILTER"
11676             if theId == 42:
11677                 return "SHAPES_ON_SHAPE"
11678             if theId == 43:
11679                 return "ELLIPSE_ARC"
11680             if theId == 44:
11681                 return "3DSKETCHER"
11682             if theId == 45:
11683                 return "FILLET_2D"
11684             if theId == 46:
11685                 return "FILLET_1D"
11686             if theId == 201:
11687                 return "PIPETSHAPE"
11688             return "Shape Id not exist."
11689
11690         ## Returns a main shape associated with the group
11691         #  @param theGroup is a GEOM group for which a main shape object is requested
11692         #  @return a GEOM object which is a main shape for theGroup
11693         #
11694         #  @ref swig_GetMainShape "Example"
11695         def GetMainShape(self,theGroup):
11696             """
11697             Returns a main shape associated with the group
11698
11699             Parameters:
11700                 theGroup is a GEOM group for which a main shape object is requested
11701
11702             Returns:
11703                 a GEOM object which is a main shape for theGroup
11704
11705             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
11706             """
11707             # Example: see GEOM_TestOthers.py
11708             anObj = self.GroupOp.GetMainShape(theGroup)
11709             RaiseIfFailed("GetMainShape", self.GroupOp)
11710             return anObj
11711
11712         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
11713         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11714         #  @param theShape given shape (see GEOM.GEOM_Object)
11715         #  @param min_length minimum length of edges of theShape
11716         #  @param max_length maximum length of edges of theShape
11717         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11718         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11719         #  @param theName Object name; when specified, this parameter is used
11720         #         for result publication in the study. Otherwise, if automatic
11721         #         publication is switched on, default value is used for result name.
11722         #
11723         #  @return a newly created GEOM group of edges
11724         #
11725         #  @@ref swig_todo "Example"
11726         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
11727             """
11728             Create group of edges of theShape, whose length is in range [min_length, max_length].
11729             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11730
11731             Parameters:
11732                 theShape given shape
11733                 min_length minimum length of edges of theShape
11734                 max_length maximum length of edges of theShape
11735                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11736                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11737                 theName Object name; when specified, this parameter is used
11738                         for result publication in the study. Otherwise, if automatic
11739                         publication is switched on, default value is used for result name.
11740
11741              Returns:
11742                 a newly created GEOM group of edges.
11743             """
11744             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
11745             edges_in_range = []
11746             for edge in edges:
11747                 Props = self.BasicProperties(edge)
11748                 if min_length <= Props[0] and Props[0] <= max_length:
11749                     if (not include_min) and (min_length == Props[0]):
11750                         skip = 1
11751                     else:
11752                         if (not include_max) and (Props[0] == max_length):
11753                             skip = 1
11754                         else:
11755                             edges_in_range.append(edge)
11756
11757             if len(edges_in_range) <= 0:
11758                 print "No edges found by given criteria"
11759                 return None
11760
11761             # note: auto-publishing is done in self.CreateGroup()
11762             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
11763             self.UnionList(group_edges, edges_in_range)
11764
11765             return group_edges
11766
11767         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
11768         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11769         #  @param min_length minimum length of edges of selected shape
11770         #  @param max_length maximum length of edges of selected shape
11771         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11772         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11773         #  @return a newly created GEOM group of edges
11774         #  @ref swig_todo "Example"
11775         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
11776             """
11777             Create group of edges of selected shape, whose length is in range [min_length, max_length].
11778             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11779
11780             Parameters:
11781                 min_length minimum length of edges of selected shape
11782                 max_length maximum length of edges of selected shape
11783                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11784                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11785
11786              Returns:
11787                 a newly created GEOM group of edges.
11788             """
11789             nb_selected = sg.SelectedCount()
11790             if nb_selected < 1:
11791                 print "Select a shape before calling this function, please."
11792                 return 0
11793             if nb_selected > 1:
11794                 print "Only one shape must be selected"
11795                 return 0
11796
11797             id_shape = sg.getSelected(0)
11798             shape = IDToObject( id_shape )
11799
11800             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
11801
11802             left_str  = " < "
11803             right_str = " < "
11804             if include_min: left_str  = " <= "
11805             if include_max: right_str  = " <= "
11806
11807             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
11808                                     + left_str + "length" + right_str + `max_length`)
11809
11810             sg.updateObjBrowser(1)
11811
11812             return group_edges
11813
11814         # end of l3_groups
11815         ## @}
11816
11817         ## @addtogroup l4_advanced
11818         ## @{
11819
11820         ## Create a T-shape object with specified caracteristics for the main
11821         #  and the incident pipes (radius, width, half-length).
11822         #  The extremities of the main pipe are located on junctions points P1 and P2.
11823         #  The extremity of the incident pipe is located on junction point P3.
11824         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11825         #  the main plane of the T-shape is XOY.
11826         #
11827         #  @param theR1 Internal radius of main pipe
11828         #  @param theW1 Width of main pipe
11829         #  @param theL1 Half-length of main pipe
11830         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11831         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11832         #  @param theL2 Half-length of incident pipe
11833         #
11834         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11835         #  @param theP1 1st junction point of main pipe
11836         #  @param theP2 2nd junction point of main pipe
11837         #  @param theP3 Junction point of incident pipe
11838         #
11839         #  @param theRL Internal radius of left thickness reduction
11840         #  @param theWL Width of left thickness reduction
11841         #  @param theLtransL Length of left transition part
11842         #  @param theLthinL Length of left thin part
11843         #
11844         #  @param theRR Internal radius of right thickness reduction
11845         #  @param theWR Width of right thickness reduction
11846         #  @param theLtransR Length of right transition part
11847         #  @param theLthinR Length of right thin part
11848         #
11849         #  @param theRI Internal radius of incident thickness reduction
11850         #  @param theWI Width of incident thickness reduction
11851         #  @param theLtransI Length of incident transition part
11852         #  @param theLthinI Length of incident thin part
11853         #
11854         #  @param theName Object name; when specified, this parameter is used
11855         #         for result publication in the study. Otherwise, if automatic
11856         #         publication is switched on, default value is used for result name.
11857         #
11858         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11859         #
11860         #  @ref tui_creation_pipetshape "Example"
11861         def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
11862                             theHexMesh=True, theP1=None, theP2=None, theP3=None,
11863                             theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11864                             theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11865                             theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11866                             theName=None):
11867             """
11868             Create a T-shape object with specified caracteristics for the main
11869             and the incident pipes (radius, width, half-length).
11870             The extremities of the main pipe are located on junctions points P1 and P2.
11871             The extremity of the incident pipe is located on junction point P3.
11872             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11873             the main plane of the T-shape is XOY.
11874
11875             Parameters:
11876                 theR1 Internal radius of main pipe
11877                 theW1 Width of main pipe
11878                 theL1 Half-length of main pipe
11879                 theR2 Internal radius of incident pipe (R2 < R1)
11880                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11881                 theL2 Half-length of incident pipe
11882                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11883                 theP1 1st junction point of main pipe
11884                 theP2 2nd junction point of main pipe
11885                 theP3 Junction point of incident pipe
11886
11887                 theRL Internal radius of left thickness reduction
11888                 theWL Width of left thickness reduction
11889                 theLtransL Length of left transition part
11890                 theLthinL Length of left thin part
11891
11892                 theRR Internal radius of right thickness reduction
11893                 theWR Width of right thickness reduction
11894                 theLtransR Length of right transition part
11895                 theLthinR Length of right thin part
11896
11897                 theRI Internal radius of incident thickness reduction
11898                 theWI Width of incident thickness reduction
11899                 theLtransI Length of incident transition part
11900                 theLthinI Length of incident thin part
11901
11902                 theName Object name; when specified, this parameter is used
11903                         for result publication in the study. Otherwise, if automatic
11904                         publication is switched on, default value is used for result name.
11905
11906             Returns:
11907                 List of GEOM_Object, containing the created shape and propagation groups.
11908
11909             Example of usage:
11910                 # create PipeTShape object
11911                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
11912                 # create PipeTShape object with position
11913                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
11914                 # create PipeTShape object with left thickness reduction
11915                 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
11916             """
11917             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)
11918             if (theP1 and theP2 and theP3):
11919                 anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11920                                                                 theRL, theWL, theLtransL, theLthinL,
11921                                                                 theRR, theWR, theLtransR, theLthinR,
11922                                                                 theRI, theWI, theLtransI, theLthinI,
11923                                                                 theHexMesh, theP1, theP2, theP3)
11924             else:
11925                 anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
11926                                                     theRL, theWL, theLtransL, theLthinL,
11927                                                     theRR, theWR, theLtransR, theLthinR,
11928                                                     theRI, theWI, theLtransI, theLthinI,
11929                                                     theHexMesh)
11930             RaiseIfFailed("MakePipeTShape", self.AdvOp)
11931             if Parameters: anObj[0].SetParameters(Parameters)
11932             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11933             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11934             return anObj
11935
11936         ## Create a T-shape object with chamfer and with specified caracteristics for the main
11937         #  and the incident pipes (radius, width, half-length). The chamfer is
11938         #  created on the junction of the pipes.
11939         #  The extremities of the main pipe are located on junctions points P1 and P2.
11940         #  The extremity of the incident pipe is located on junction point P3.
11941         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11942         #  the main plane of the T-shape is XOY.
11943         #  @param theR1 Internal radius of main pipe
11944         #  @param theW1 Width of main pipe
11945         #  @param theL1 Half-length of main pipe
11946         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11947         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11948         #  @param theL2 Half-length of incident pipe
11949         #  @param theH Height of the chamfer.
11950         #  @param theW Width of the chamfer.
11951         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11952         #  @param theP1 1st junction point of main pipe
11953         #  @param theP2 2nd junction point of main pipe
11954         #  @param theP3 Junction point of incident pipe
11955         #
11956         #  @param theRL Internal radius of left thickness reduction
11957         #  @param theWL Width of left thickness reduction
11958         #  @param theLtransL Length of left transition part
11959         #  @param theLthinL Length of left thin part
11960         #
11961         #  @param theRR Internal radius of right thickness reduction
11962         #  @param theWR Width of right thickness reduction
11963         #  @param theLtransR Length of right transition part
11964         #  @param theLthinR Length of right thin part
11965         #
11966         #  @param theRI Internal radius of incident thickness reduction
11967         #  @param theWI Width of incident thickness reduction
11968         #  @param theLtransI Length of incident transition part
11969         #  @param theLthinI Length of incident thin part
11970         #
11971         #  @param theName Object name; when specified, this parameter is used
11972         #         for result publication in the study. Otherwise, if automatic
11973         #         publication is switched on, default value is used for result name.
11974         #
11975         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11976         #
11977         #  @ref tui_creation_pipetshape "Example"
11978         def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
11979                                    theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
11980                                    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11981                                    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11982                                    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11983                                    theName=None):
11984             """
11985             Create a T-shape object with chamfer and with specified caracteristics for the main
11986             and the incident pipes (radius, width, half-length). The chamfer is
11987             created on the junction of the pipes.
11988             The extremities of the main pipe are located on junctions points P1 and P2.
11989             The extremity of the incident pipe is located on junction point P3.
11990             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11991             the main plane of the T-shape is XOY.
11992
11993             Parameters:
11994                 theR1 Internal radius of main pipe
11995                 theW1 Width of main pipe
11996                 theL1 Half-length of main pipe
11997                 theR2 Internal radius of incident pipe (R2 < R1)
11998                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11999                 theL2 Half-length of incident pipe
12000                 theH Height of the chamfer.
12001                 theW Width of the chamfer.
12002                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12003                 theP1 1st junction point of main pipe
12004                 theP2 2nd junction point of main pipe
12005                 theP3 Junction point of incident pipe
12006
12007                 theRL Internal radius of left thickness reduction
12008                 theWL Width of left thickness reduction
12009                 theLtransL Length of left transition part
12010                 theLthinL Length of left thin part
12011
12012                 theRR Internal radius of right thickness reduction
12013                 theWR Width of right thickness reduction
12014                 theLtransR Length of right transition part
12015                 theLthinR Length of right thin part
12016
12017                 theRI Internal radius of incident thickness reduction
12018                 theWI Width of incident thickness reduction
12019                 theLtransI Length of incident transition part
12020                 theLthinI Length of incident thin part
12021
12022                 theName Object name; when specified, this parameter is used
12023                         for result publication in the study. Otherwise, if automatic
12024                         publication is switched on, default value is used for result name.
12025
12026             Returns:
12027                 List of GEOM_Object, containing the created shape and propagation groups.
12028
12029             Example of usage:
12030                 # create PipeTShape with chamfer object
12031                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
12032                 # create PipeTShape with chamfer object with position
12033                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
12034                 # create PipeTShape with chamfer object with left thickness reduction
12035                 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)
12036             """
12037             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)
12038             if (theP1 and theP2 and theP3):
12039               anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12040                                                                      theRL, theWL, theLtransL, theLthinL,
12041                                                                      theRR, theWR, theLtransR, theLthinR,
12042                                                                      theRI, theWI, theLtransI, theLthinI,
12043                                                                      theH, theW, theHexMesh, theP1, theP2, theP3)
12044             else:
12045               anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
12046                                                          theRL, theWL, theLtransL, theLthinL,
12047                                                          theRR, theWR, theLtransR, theLthinR,
12048                                                          theRI, theWI, theLtransI, theLthinI,
12049                                                          theH, theW, theHexMesh)
12050             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
12051             if Parameters: anObj[0].SetParameters(Parameters)
12052             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12053             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12054             return anObj
12055
12056         ## Create a T-shape object with fillet and with specified caracteristics for the main
12057         #  and the incident pipes (radius, width, half-length). The fillet is
12058         #  created on the junction of the pipes.
12059         #  The extremities of the main pipe are located on junctions points P1 and P2.
12060         #  The extremity of the incident pipe is located on junction point P3.
12061         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12062         #  the main plane of the T-shape is XOY.
12063         #  @param theR1 Internal radius of main pipe
12064         #  @param theW1 Width of main pipe
12065         #  @param theL1 Half-length of main pipe
12066         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12067         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12068         #  @param theL2 Half-length of incident pipe
12069         #  @param theRF Radius of curvature of fillet.
12070         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12071         #  @param theP1 1st junction point of main pipe
12072         #  @param theP2 2nd junction point of main pipe
12073         #  @param theP3 Junction point of incident pipe
12074         #
12075         #  @param theRL Internal radius of left thickness reduction
12076         #  @param theWL Width of left thickness reduction
12077         #  @param theLtransL Length of left transition part
12078         #  @param theLthinL Length of left thin part
12079         #
12080         #  @param theRR Internal radius of right thickness reduction
12081         #  @param theWR Width of right thickness reduction
12082         #  @param theLtransR Length of right transition part
12083         #  @param theLthinR Length of right thin part
12084         #
12085         #  @param theRI Internal radius of incident thickness reduction
12086         #  @param theWI Width of incident thickness reduction
12087         #  @param theLtransI Length of incident transition part
12088         #  @param theLthinI Length of incident thin part
12089         #
12090         #  @param theName Object name; when specified, this parameter is used
12091         #         for result publication in the study. Otherwise, if automatic
12092         #         publication is switched on, default value is used for result name.
12093         #
12094         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12095         #
12096         #  @ref tui_creation_pipetshape "Example"
12097         def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
12098                                   theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12099                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12100                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12101                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12102                                   theName=None):
12103             """
12104             Create a T-shape object with fillet and with specified caracteristics for the main
12105             and the incident pipes (radius, width, half-length). The fillet is
12106             created on the junction of the pipes.
12107             The extremities of the main pipe are located on junctions points P1 and P2.
12108             The extremity of the incident pipe is located on junction point P3.
12109
12110             Parameters:
12111                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12112                 the main plane of the T-shape is XOY.
12113                 theR1 Internal radius of main pipe
12114                 theW1 Width of main pipe
12115                 heL1 Half-length of main pipe
12116                 theR2 Internal radius of incident pipe (R2 < R1)
12117                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12118                 theL2 Half-length of incident pipe
12119                 theRF Radius of curvature of fillet.
12120                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12121                 theP1 1st junction point of main pipe
12122                 theP2 2nd junction point of main pipe
12123                 theP3 Junction point of incident pipe
12124
12125                 theRL Internal radius of left thickness reduction
12126                 theWL Width of left thickness reduction
12127                 theLtransL Length of left transition part
12128                 theLthinL Length of left thin part
12129
12130                 theRR Internal radius of right thickness reduction
12131                 theWR Width of right thickness reduction
12132                 theLtransR Length of right transition part
12133                 theLthinR Length of right thin part
12134
12135                 theRI Internal radius of incident thickness reduction
12136                 theWI Width of incident thickness reduction
12137                 theLtransI Length of incident transition part
12138                 theLthinI Length of incident thin part
12139
12140                 theName Object name; when specified, this parameter is used
12141                         for result publication in the study. Otherwise, if automatic
12142                         publication is switched on, default value is used for result name.
12143                 
12144             Returns:
12145                 List of GEOM_Object, containing the created shape and propagation groups.
12146                 
12147             Example of usage:
12148                 # create PipeTShape with fillet object
12149                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
12150                 # create PipeTShape with fillet object with position
12151                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
12152                 # create PipeTShape with fillet object with left thickness reduction
12153                 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)
12154             """
12155             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)
12156             if (theP1 and theP2 and theP3):
12157               anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12158                                                                     theRL, theWL, theLtransL, theLthinL,
12159                                                                     theRR, theWR, theLtransR, theLthinR,
12160                                                                     theRI, theWI, theLtransI, theLthinI,
12161                                                                     theRF, theHexMesh, theP1, theP2, theP3)
12162             else:
12163               anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
12164                                                         theRL, theWL, theLtransL, theLthinL,
12165                                                         theRR, theWR, theLtransR, theLthinR,
12166                                                         theRI, theWI, theLtransI, theLthinI,
12167                                                         theRF, theHexMesh)
12168             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
12169             if Parameters: anObj[0].SetParameters(Parameters)
12170             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12171             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12172             return anObj
12173
12174         ## This function allows creating a disk already divided into blocks. It
12175         #  can be used to create divided pipes for later meshing in hexaedra.
12176         #  @param theR Radius of the disk
12177         #  @param theOrientation Orientation of the plane on which the disk will be built
12178         #         1 = XOY, 2 = OYZ, 3 = OZX
12179         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12180         #  @param 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         #  @return New GEOM_Object, containing the created shape.
12185         #
12186         #  @ref tui_creation_divideddisk "Example"
12187         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
12188             """
12189             Creates a disk, divided into blocks. It can be used to create divided pipes
12190             for later meshing in hexaedra.
12191
12192             Parameters:
12193                 theR Radius of the disk
12194                 theOrientation Orientation of the plane on which the disk will be built:
12195                                1 = XOY, 2 = OYZ, 3 = OZX
12196                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12197                 theName Object name; when specified, this parameter is used
12198                         for result publication in the study. Otherwise, if automatic
12199                         publication is switched on, default value is used for result name.
12200
12201             Returns:
12202                 New GEOM_Object, containing the created shape.
12203             """
12204             theR, Parameters = ParseParameters(theR)
12205             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
12206             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
12207             if Parameters: anObj.SetParameters(Parameters)
12208             self._autoPublish(anObj, theName, "dividedDisk")
12209             return anObj
12210             
12211         ## This function allows creating a disk already divided into blocks. It
12212         #  can be used to create divided pipes for later meshing in hexaedra.
12213         #  @param theCenter Center of the disk
12214         #  @param theVector Normal vector to the plane of the created disk
12215         #  @param theRadius Radius of the disk
12216         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12217         #  @param 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         #  @return New GEOM_Object, containing the created shape.
12222         #
12223         #  @ref tui_creation_divideddisk "Example"
12224         def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
12225             """
12226             Creates a disk already divided into blocks. It can be used to create divided pipes
12227             for later meshing in hexaedra.
12228
12229             Parameters:
12230                 theCenter Center of the disk
12231                 theVector Normal vector to the plane of the created disk
12232                 theRadius Radius of the disk
12233                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12234                 theName Object name; when specified, this parameter is used
12235                         for result publication in the study. Otherwise, if automatic
12236                         publication is switched on, default value is used for result name.
12237
12238             Returns:
12239                 New GEOM_Object, containing the created shape.
12240             """
12241             theRadius, Parameters = ParseParameters(theRadius)
12242             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
12243             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
12244             if Parameters: anObj.SetParameters(Parameters)
12245             self._autoPublish(anObj, theName, "dividedDisk")
12246             return anObj
12247
12248         ## Builds a cylinder prepared for hexa meshes
12249         #  @param theR Radius of the cylinder
12250         #  @param theH Height of the cylinder
12251         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12252         #  @param theName Object name; when specified, this parameter is used
12253         #         for result publication in the study. Otherwise, if automatic
12254         #         publication is switched on, default value is used for result name.
12255         #
12256         #  @return New GEOM_Object, containing the created shape.
12257         #
12258         #  @ref tui_creation_dividedcylinder "Example"
12259         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
12260             """
12261             Builds a cylinder prepared for hexa meshes
12262
12263             Parameters:
12264                 theR Radius of the cylinder
12265                 theH Height of the cylinder
12266                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12267                 theName Object name; when specified, this parameter is used
12268                         for result publication in the study. Otherwise, if automatic
12269                         publication is switched on, default value is used for result name.
12270
12271             Returns:
12272                 New GEOM_Object, containing the created shape.
12273             """
12274             theR, theH, Parameters = ParseParameters(theR, theH)
12275             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
12276             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
12277             if Parameters: anObj.SetParameters(Parameters)
12278             self._autoPublish(anObj, theName, "dividedCylinder")
12279             return anObj
12280
12281         ## Create a surface from a cloud of points
12282         #  @param thelPoints list of points
12283         #  @return New GEOM_Object, containing the created shape.
12284         #
12285         #  @ref tui_creation_smoothingsurface "Example"
12286         def MakeSmoothingSurface(self, thelPoints):
12287             anObj = self.AdvOp.MakeSmoothingSurface(thelPoints)
12288             RaiseIfFailed("MakeSmoothingSurface", self.AdvOp)
12289             return anObj
12290
12291         ## Export a shape to XAO format
12292         #  @param shape The shape to export
12293         #  @param groups The list of groups to export
12294         #  @param fields The list of fields to export
12295         #  @param author The author of the export
12296         #  @param fileName The name of the file to export
12297         #  @return boolean
12298         #
12299         #  @ref tui_exportxao "Example"
12300         def ExportXAO(self, shape, groups, fields, author, fileName):
12301             res = self.InsertOp.ExportXAO(shape, groups, fields, author, fileName)
12302             RaiseIfFailed("ExportXAO", self.InsertOp)
12303             return res
12304
12305         ## Import a shape from XAO format
12306         #  @param shape Shape to export
12307         #  @param fileName The name of the file to import
12308         #  @return tuple (res, shape, subShapes, groups, fields)
12309         #       res Flag indicating if the import was successful
12310         #       shape The imported shape
12311         #       subShapes The list of imported subShapes
12312         #       groups The list of imported groups
12313         #       fields The list of imported fields
12314         #
12315         #  @ref tui_importxao "Example"
12316         def ImportXAO(self, fileName):
12317             res = self.InsertOp.ImportXAO(fileName)
12318             RaiseIfFailed("ImportXAO", self.InsertOp)
12319             return res
12320
12321         #@@ insert new functions before this line @@ do not remove this line @@#
12322
12323         # end of l4_advanced
12324         ## @}
12325
12326         ## Create a copy of the given object
12327         #
12328         #  @param theOriginal geometry object for copy
12329         #  @param theName Object name; when specified, this parameter is used
12330         #         for result publication in the study. Otherwise, if automatic
12331         #         publication is switched on, default value is used for result name.
12332         #
12333         #  @return New GEOM_Object, containing the copied shape.
12334         #
12335         #  @ingroup l1_geomBuilder_auxiliary
12336         #  @ref swig_MakeCopy "Example"
12337         def MakeCopy(self, theOriginal, theName=None):
12338             """
12339             Create a copy of the given object
12340
12341             Parameters:
12342                 theOriginal geometry object for copy
12343                 theName Object name; when specified, this parameter is used
12344                         for result publication in the study. Otherwise, if automatic
12345                         publication is switched on, default value is used for result name.
12346
12347             Returns:
12348                 New GEOM_Object, containing the copied shape.
12349
12350             Example of usage: Copy = geompy.MakeCopy(Box)
12351             """
12352             # Example: see GEOM_TestAll.py
12353             anObj = self.InsertOp.MakeCopy(theOriginal)
12354             RaiseIfFailed("MakeCopy", self.InsertOp)
12355             self._autoPublish(anObj, theName, "copy")
12356             return anObj
12357
12358         ## Add Path to load python scripts from
12359         #  @param Path a path to load python scripts from
12360         #  @ingroup l1_geomBuilder_auxiliary
12361         def addPath(self,Path):
12362             """
12363             Add Path to load python scripts from
12364
12365             Parameters:
12366                 Path a path to load python scripts from
12367             """
12368             if (sys.path.count(Path) < 1):
12369                 sys.path.append(Path)
12370                 pass
12371             pass
12372
12373         ## Load marker texture from the file
12374         #  @param Path a path to the texture file
12375         #  @return unique texture identifier
12376         #  @ingroup l1_geomBuilder_auxiliary
12377         def LoadTexture(self, Path):
12378             """
12379             Load marker texture from the file
12380             
12381             Parameters:
12382                 Path a path to the texture file
12383                 
12384             Returns:
12385                 unique texture identifier
12386             """
12387             # Example: see GEOM_TestAll.py
12388             ID = self.InsertOp.LoadTexture(Path)
12389             RaiseIfFailed("LoadTexture", self.InsertOp)
12390             return ID
12391
12392         ## Get internal name of the object based on its study entry
12393         #  @note This method does not provide an unique identifier of the geometry object.
12394         #  @note This is internal function of GEOM component, though it can be used outside it for 
12395         #  appropriate reason (e.g. for identification of geometry object).
12396         #  @param obj geometry object
12397         #  @return unique object identifier
12398         #  @ingroup l1_geomBuilder_auxiliary
12399         def getObjectID(self, obj):
12400             """
12401             Get internal name of the object based on its study entry.
12402             Note: this method does not provide an unique identifier of the geometry object.
12403             It is an internal function of GEOM component, though it can be used outside GEOM for 
12404             appropriate reason (e.g. for identification of geometry object).
12405
12406             Parameters:
12407                 obj geometry object
12408
12409             Returns:
12410                 unique object identifier
12411             """
12412             ID = ""
12413             entry = salome.ObjectToID(obj)
12414             if entry is not None:
12415                 lst = entry.split(":")
12416                 if len(lst) > 0:
12417                     ID = lst[-1] # -1 means last item in the list            
12418                     return "GEOM_" + ID
12419             return ID
12420                 
12421             
12422
12423         ## Add marker texture. @a Width and @a Height parameters
12424         #  specify width and height of the texture in pixels.
12425         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12426         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12427         #  parameter should be unpacked string, in which '1' symbols represent opaque
12428         #  pixels and '0' represent transparent pixels of the texture bitmap.
12429         #
12430         #  @param Width texture width in pixels
12431         #  @param Height texture height in pixels
12432         #  @param Texture texture data
12433         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12434         #  @return unique texture identifier
12435         #  @ingroup l1_geomBuilder_auxiliary
12436         def AddTexture(self, Width, Height, Texture, RowData=False):
12437             """
12438             Add marker texture. Width and Height parameters
12439             specify width and height of the texture in pixels.
12440             If RowData is True, Texture parameter should represent texture data
12441             packed into the byte array. If RowData is False (default), Texture
12442             parameter should be unpacked string, in which '1' symbols represent opaque
12443             pixels and '0' represent transparent pixels of the texture bitmap.
12444
12445             Parameters:
12446                 Width texture width in pixels
12447                 Height texture height in pixels
12448                 Texture texture data
12449                 RowData if True, Texture data are packed in the byte stream
12450
12451             Returns:
12452                 return unique texture identifier
12453             """
12454             if not RowData: Texture = PackData(Texture)
12455             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12456             RaiseIfFailed("AddTexture", self.InsertOp)
12457             return ID
12458
12459         ## Creates a new folder object. It is a container for any GEOM objects.
12460         #  @param Name name of the container
12461         #  @param Father parent object. If None, 
12462         #         folder under 'Geometry' root object will be created.
12463         #  @return a new created folder
12464         def NewFolder(self, Name, Father=None):
12465             """
12466             Create a new folder object. It is an auxiliary container for any GEOM objects.
12467             
12468             Parameters:
12469                 Name name of the container
12470                 Father parent object. If None, 
12471                 folder under 'Geometry' root object will be created.
12472             
12473             Returns:
12474                 a new created folder
12475             """
12476             if not Father: Father = self.father
12477             return self.CreateFolder(Name, Father)
12478
12479         ## Move object to the specified folder
12480         #  @param Object object to move
12481         #  @param Folder target folder
12482         def PutToFolder(self, Object, Folder):
12483             """
12484             Move object to the specified folder
12485             
12486             Parameters:
12487                 Object object to move
12488                 Folder target folder
12489             """
12490             self.MoveToFolder(Object, Folder)
12491             pass
12492
12493         ## Move list of objects to the specified folder
12494         #  @param ListOfSO list of objects to move
12495         #  @param Folder target folder
12496         def PutListToFolder(self, ListOfSO, Folder):
12497             """
12498             Move list of objects to the specified folder
12499             
12500             Parameters:
12501                 ListOfSO list of objects to move
12502                 Folder target folder
12503             """
12504             self.MoveListToFolder(ListOfSO, Folder)
12505             pass
12506
12507         ## @addtogroup l2_field
12508         ## @{
12509
12510         ## Creates a field
12511         #  @param shape the shape the field lies on
12512         #  @param name the field name
12513         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
12514         #  @param dimension dimension of the shape the field lies on
12515         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12516         #  @param componentNames names of components
12517         #  @return a created field
12518         def CreateField(self, shape, name, type, dimension, componentNames):
12519             """
12520             Creates a field
12521
12522             Parameters:
12523                 shape the shape the field lies on
12524                 name  the field name
12525                 type  type of field data
12526                 dimension dimension of the shape the field lies on
12527                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12528                 componentNames names of components
12529             
12530             Returns:
12531                 a created field
12532             """
12533             if isinstance( type, int ):
12534                 if type < 0 or type > 3:
12535                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
12536                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
12537
12538             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
12539             RaiseIfFailed("CreateField", self.FieldOp)
12540             global geom
12541             geom._autoPublish( f, "", name)
12542             return f
12543
12544         ## Removes a field from the GEOM component
12545         #  @param field the field to remove
12546         def RemoveField(self, field):
12547             "Removes a field from the GEOM component"
12548             global geom
12549             if isinstance( field, GEOM._objref_GEOM_Field ):
12550                 geom.RemoveObject( field )
12551             elif isinstance( field, geomField ):
12552                 geom.RemoveObject( field.field )
12553             else:
12554                 raise RuntimeError, "RemoveField() : the object is not a field"
12555             return
12556
12557         ## Returns number of fields on a shape
12558         def CountFields(self, shape):
12559             "Returns number of fields on a shape"
12560             nb = self.FieldOp.CountFields( shape )
12561             RaiseIfFailed("CountFields", self.FieldOp)
12562             return nb
12563
12564         ## Returns all fields on a shape
12565         def GetFields(self, shape):
12566             "Returns all fields on a shape"
12567             ff = self.FieldOp.GetFields( shape )
12568             RaiseIfFailed("GetFields", self.FieldOp)
12569             return ff
12570
12571         ## Returns a field on a shape by its name
12572         def GetField(self, shape, name):
12573             "Returns a field on a shape by its name"
12574             f = self.FieldOp.GetField( shape, name )
12575             RaiseIfFailed("GetField", self.FieldOp)
12576             return f
12577
12578         # end of l2_field
12579         ## @}
12580
12581
12582 import omniORB
12583 # Register the new proxy for GEOM_Gen
12584 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
12585
12586
12587 ## Field on Geometry
12588 #  @ingroup l2_field
12589 class geomField( GEOM._objref_GEOM_Field ):
12590
12591     def __init__(self):
12592         GEOM._objref_GEOM_Field.__init__(self)
12593         self.field = GEOM._objref_GEOM_Field
12594         return
12595
12596     ## Returns the shape the field lies on
12597     def getShape(self):
12598         "Returns the shape the field lies on"
12599         return self.field.GetShape(self)
12600
12601     ## Returns the field name
12602     def getName(self):
12603         "Returns the field name"
12604         return self.field.GetName(self)
12605
12606     ## Returns type of field data as integer [0-3]
12607     def getType(self):
12608         "Returns type of field data"
12609         return self.field.GetDataType(self)._v
12610
12611     ## Returns type of field data:
12612     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
12613     def getTypeEnum(self):
12614         "Returns type of field data"
12615         return self.field.GetDataType(self)
12616
12617     ## Returns dimension of the shape the field lies on:
12618     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12619     def getDimension(self):
12620         """Returns dimension of the shape the field lies on:
12621         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
12622         return self.field.GetDimension(self)
12623
12624     ## Returns names of components
12625     def getComponents(self):
12626         "Returns names of components"
12627         return self.field.GetComponents(self)
12628
12629     ## Adds a time step to the field
12630     #  @param step the time step number futher used as the step identifier
12631     #  @param stamp the time step time
12632     #  @param values the values of the time step
12633     def addStep(self, step, stamp, values):
12634         "Adds a time step to the field"
12635         stp = self.field.AddStep( self, step, stamp )
12636         if not stp:
12637             raise RuntimeError, \
12638                   "Field.addStep() : Error: step %s already exists in this field"%step
12639         global geom
12640         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
12641         self.setValues( step, values )
12642         return stp
12643
12644     ## Remove a time step from the field
12645     def removeStep(self,step):
12646         "Remove a time step from the field"
12647         self.field.RemoveStep( self, step )
12648         return
12649
12650     ## Returns number of time steps in the field
12651     def countSteps(self):
12652         "Returns number of time steps in the field"
12653         return self.field.CountSteps(self)
12654
12655     ## Returns a list of time step IDs in the field
12656     def getSteps(self):
12657         "Returns a list of time step IDs in the field"
12658         return self.field.GetSteps(self)
12659
12660     ## Returns a time step by its ID
12661     def getStep(self,step):
12662         "Returns a time step by its ID"
12663         stp = self.field.GetStep(self, step)
12664         if not stp:
12665             raise RuntimeError, "Step %s is missing from this field"%step
12666         return stp
12667
12668     ## Returns the time of the field step
12669     def getStamp(self,step):
12670         "Returns the time of the field step"
12671         return self.getStep(step).GetStamp()
12672
12673     ## Changes the time of the field step
12674     def setStamp(self, step, stamp):
12675         "Changes the time of the field step"
12676         return self.getStep(step).SetStamp(stamp)
12677
12678     ## Returns values of the field step
12679     def getValues(self, step):
12680         "Returns values of the field step"
12681         return self.getStep(step).GetValues()
12682
12683     ## Changes values of the field step
12684     def setValues(self, step, values):
12685         "Changes values of the field step"
12686         stp = self.getStep(step)
12687         errBeg = "Field.setValues(values) : Error: "
12688         try:
12689             ok = stp.SetValues( values )
12690         except Exception, e:
12691             excStr = str(e)
12692             if excStr.find("WrongPythonType") > 0:
12693                 raise RuntimeError, errBeg +\
12694                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
12695             raise RuntimeError, errBeg + str(e)
12696         if not ok:
12697             nbOK = self.field.GetArraySize(self)
12698             nbKO = len(values)
12699             if nbOK != nbKO:
12700                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
12701             else:
12702                 raise RuntimeError, errBeg + "failed"
12703         return
12704
12705     pass # end of class geomField
12706
12707 # Register the new proxy for GEOM_Field
12708 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
12709
12710
12711 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
12712 #  interface to GEOM operations.
12713 #
12714 #  Typical use is:
12715 #  \code
12716 #    import salome
12717 #    salome.salome_init()
12718 #    from salome.geom import geomBuilder
12719 #    geompy = geomBuilder.New(salome.myStudy)
12720 #  \endcode
12721 #  @param  study     SALOME study, generally obtained by salome.myStudy.
12722 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12723 #  @return geomBuilder instance
12724 def New( study, instance=None):
12725     """
12726     Create a new geomBuilder instance.The geomBuilder class provides the Python
12727     interface to GEOM operations.
12728
12729     Typical use is:
12730         import salome
12731         salome.salome_init()
12732         from salome.geom import geomBuilder
12733         geompy = geomBuilder.New(salome.myStudy)
12734
12735     Parameters:
12736         study     SALOME study, generally obtained by salome.myStudy.
12737         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12738     Returns:
12739         geomBuilder instance
12740     """
12741     #print "New geomBuilder ", study, instance
12742     global engine
12743     global geom
12744     global doLcc
12745     engine = instance
12746     if engine is None:
12747       doLcc = True
12748     geom = geomBuilder()
12749     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
12750     geom.init_geom(study)
12751     return geom